1. Packages
  2. Scaleway
  3. API Docs
  4. mnq
  5. NatsCredentials
Scaleway v1.25.0 published on Saturday, Mar 22, 2025 by pulumiverse

scaleway.mnq.NatsCredentials

Explore with Pulumi AI

scaleway logo
Scaleway v1.25.0 published on Saturday, Mar 22, 2025 by pulumiverse

    Creates and manages Scaleway Messaging and Queuing NATS credentials. For further information, see our main documentation.

    Example Usage

    Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const main = new scaleway.mnq.NatsAccount("main", {name: "nats-account"});
    const mainNatsCredentials = new scaleway.mnq.NatsCredentials("main", {accountId: main.id});
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    main = scaleway.mnq.NatsAccount("main", name="nats-account")
    main_nats_credentials = scaleway.mnq.NatsCredentials("main", account_id=main.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/mnq"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		main, err := mnq.NewNatsAccount(ctx, "main", &mnq.NatsAccountArgs{
    			Name: pulumi.String("nats-account"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = mnq.NewNatsCredentials(ctx, "main", &mnq.NatsCredentialsArgs{
    			AccountId: main.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var main = new Scaleway.Mnq.NatsAccount("main", new()
        {
            Name = "nats-account",
        });
    
        var mainNatsCredentials = new Scaleway.Mnq.NatsCredentials("main", new()
        {
            AccountId = main.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.mnq.NatsAccount;
    import com.pulumi.scaleway.mnq.NatsAccountArgs;
    import com.pulumi.scaleway.mnq.NatsCredentials;
    import com.pulumi.scaleway.mnq.NatsCredentialsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var main = new NatsAccount("main", NatsAccountArgs.builder()
                .name("nats-account")
                .build());
    
            var mainNatsCredentials = new NatsCredentials("mainNatsCredentials", NatsCredentialsArgs.builder()
                .accountId(main.id())
                .build());
    
        }
    }
    
    resources:
      main:
        type: scaleway:mnq:NatsAccount
        properties:
          name: nats-account
      mainNatsCredentials:
        type: scaleway:mnq:NatsCredentials
        name: main
        properties:
          accountId: ${main.id}
    

    Create NatsCredentials Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new NatsCredentials(name: string, args: NatsCredentialsArgs, opts?: CustomResourceOptions);
    @overload
    def NatsCredentials(resource_name: str,
                        args: NatsCredentialsArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def NatsCredentials(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        account_id: Optional[str] = None,
                        name: Optional[str] = None,
                        region: Optional[str] = None)
    func NewNatsCredentials(ctx *Context, name string, args NatsCredentialsArgs, opts ...ResourceOption) (*NatsCredentials, error)
    public NatsCredentials(string name, NatsCredentialsArgs args, CustomResourceOptions? opts = null)
    public NatsCredentials(String name, NatsCredentialsArgs args)
    public NatsCredentials(String name, NatsCredentialsArgs args, CustomResourceOptions options)
    
    type: scaleway:mnq:NatsCredentials
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args NatsCredentialsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args NatsCredentialsArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args NatsCredentialsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NatsCredentialsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NatsCredentialsArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var natsCredentialsResource = new Scaleway.Mnq.NatsCredentials("natsCredentialsResource", new()
    {
        AccountId = "string",
        Name = "string",
        Region = "string",
    });
    
    example, err := mnq.NewNatsCredentials(ctx, "natsCredentialsResource", &mnq.NatsCredentialsArgs{
    	AccountId: pulumi.String("string"),
    	Name:      pulumi.String("string"),
    	Region:    pulumi.String("string"),
    })
    
    var natsCredentialsResource = new NatsCredentials("natsCredentialsResource", NatsCredentialsArgs.builder()
        .accountId("string")
        .name("string")
        .region("string")
        .build());
    
    nats_credentials_resource = scaleway.mnq.NatsCredentials("natsCredentialsResource",
        account_id="string",
        name="string",
        region="string")
    
    const natsCredentialsResource = new scaleway.mnq.NatsCredentials("natsCredentialsResource", {
        accountId: "string",
        name: "string",
        region: "string",
    });
    
    type: scaleway:mnq:NatsCredentials
    properties:
        accountId: string
        name: string
        region: string
    

    NatsCredentials Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The NatsCredentials resource accepts the following input properties:

    AccountId string
    The ID of the NATS account the credentials are generated from
    Name string
    The unique name of the NATS credentials.
    Region string
    region). The region in which the account exists.
    AccountId string
    The ID of the NATS account the credentials are generated from
    Name string
    The unique name of the NATS credentials.
    Region string
    region). The region in which the account exists.
    accountId String
    The ID of the NATS account the credentials are generated from
    name String
    The unique name of the NATS credentials.
    region String
    region). The region in which the account exists.
    accountId string
    The ID of the NATS account the credentials are generated from
    name string
    The unique name of the NATS credentials.
    region string
    region). The region in which the account exists.
    account_id str
    The ID of the NATS account the credentials are generated from
    name str
    The unique name of the NATS credentials.
    region str
    region). The region in which the account exists.
    accountId String
    The ID of the NATS account the credentials are generated from
    name String
    The unique name of the NATS credentials.
    region String
    region). The region in which the account exists.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the NatsCredentials resource produces the following output properties:

    File string
    The content of the credentials file.
    Id string
    The provider-assigned unique ID for this managed resource.
    File string
    The content of the credentials file.
    Id string
    The provider-assigned unique ID for this managed resource.
    file String
    The content of the credentials file.
    id String
    The provider-assigned unique ID for this managed resource.
    file string
    The content of the credentials file.
    id string
    The provider-assigned unique ID for this managed resource.
    file str
    The content of the credentials file.
    id str
    The provider-assigned unique ID for this managed resource.
    file String
    The content of the credentials file.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing NatsCredentials Resource

    Get an existing NatsCredentials resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: NatsCredentialsState, opts?: CustomResourceOptions): NatsCredentials
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            file: Optional[str] = None,
            name: Optional[str] = None,
            region: Optional[str] = None) -> NatsCredentials
    func GetNatsCredentials(ctx *Context, name string, id IDInput, state *NatsCredentialsState, opts ...ResourceOption) (*NatsCredentials, error)
    public static NatsCredentials Get(string name, Input<string> id, NatsCredentialsState? state, CustomResourceOptions? opts = null)
    public static NatsCredentials get(String name, Output<String> id, NatsCredentialsState state, CustomResourceOptions options)
    resources:  _:    type: scaleway:mnq:NatsCredentials    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AccountId string
    The ID of the NATS account the credentials are generated from
    File string
    The content of the credentials file.
    Name string
    The unique name of the NATS credentials.
    Region string
    region). The region in which the account exists.
    AccountId string
    The ID of the NATS account the credentials are generated from
    File string
    The content of the credentials file.
    Name string
    The unique name of the NATS credentials.
    Region string
    region). The region in which the account exists.
    accountId String
    The ID of the NATS account the credentials are generated from
    file String
    The content of the credentials file.
    name String
    The unique name of the NATS credentials.
    region String
    region). The region in which the account exists.
    accountId string
    The ID of the NATS account the credentials are generated from
    file string
    The content of the credentials file.
    name string
    The unique name of the NATS credentials.
    region string
    region). The region in which the account exists.
    account_id str
    The ID of the NATS account the credentials are generated from
    file str
    The content of the credentials file.
    name str
    The unique name of the NATS credentials.
    region str
    region). The region in which the account exists.
    accountId String
    The ID of the NATS account the credentials are generated from
    file String
    The content of the credentials file.
    name String
    The unique name of the NATS credentials.
    region String
    region). The region in which the account exists.

    Import

    Namespaces can be imported using {region}/{id}, e.g.

    bash

    $ pulumi import scaleway:mnq/natsCredentials:NatsCredentials main fr-par/11111111111111111111111111111111
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Scaleway v1.25.0 published on Saturday, Mar 22, 2025 by pulumiverse