scaleway.MnqNatsCredentials
Explore with Pulumi AI
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 mainMnqNatsAccount = new scaleway.MnqNatsAccount("mainMnqNatsAccount", {});
const mainMnqNatsCredentials = new scaleway.MnqNatsCredentials("mainMnqNatsCredentials", {accountId: mainMnqNatsAccount.id});
import pulumi
import pulumiverse_scaleway as scaleway
main_mnq_nats_account = scaleway.MnqNatsAccount("mainMnqNatsAccount")
main_mnq_nats_credentials = scaleway.MnqNatsCredentials("mainMnqNatsCredentials", account_id=main_mnq_nats_account.id)
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
mainMnqNatsAccount, err := scaleway.NewMnqNatsAccount(ctx, "mainMnqNatsAccount", nil)
if err != nil {
return err
}
_, err = scaleway.NewMnqNatsCredentials(ctx, "mainMnqNatsCredentials", &scaleway.MnqNatsCredentialsArgs{
AccountId: mainMnqNatsAccount.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 mainMnqNatsAccount = new Scaleway.MnqNatsAccount("mainMnqNatsAccount");
var mainMnqNatsCredentials = new Scaleway.MnqNatsCredentials("mainMnqNatsCredentials", new()
{
AccountId = mainMnqNatsAccount.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.MnqNatsAccount;
import com.pulumi.scaleway.MnqNatsCredentials;
import com.pulumi.scaleway.MnqNatsCredentialsArgs;
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 mainMnqNatsAccount = new MnqNatsAccount("mainMnqNatsAccount");
var mainMnqNatsCredentials = new MnqNatsCredentials("mainMnqNatsCredentials", MnqNatsCredentialsArgs.builder()
.accountId(mainMnqNatsAccount.id())
.build());
}
}
resources:
mainMnqNatsAccount:
type: scaleway:MnqNatsAccount
mainMnqNatsCredentials:
type: scaleway:MnqNatsCredentials
properties:
accountId: ${mainMnqNatsAccount.id}
Create MnqNatsCredentials Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MnqNatsCredentials(name: string, args: MnqNatsCredentialsArgs, opts?: CustomResourceOptions);
@overload
def MnqNatsCredentials(resource_name: str,
args: MnqNatsCredentialsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MnqNatsCredentials(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None)
func NewMnqNatsCredentials(ctx *Context, name string, args MnqNatsCredentialsArgs, opts ...ResourceOption) (*MnqNatsCredentials, error)
public MnqNatsCredentials(string name, MnqNatsCredentialsArgs args, CustomResourceOptions? opts = null)
public MnqNatsCredentials(String name, MnqNatsCredentialsArgs args)
public MnqNatsCredentials(String name, MnqNatsCredentialsArgs args, CustomResourceOptions options)
type: scaleway:MnqNatsCredentials
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 MnqNatsCredentialsArgs
- 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 MnqNatsCredentialsArgs
- 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 MnqNatsCredentialsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MnqNatsCredentialsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MnqNatsCredentialsArgs
- 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 mnqNatsCredentialsResource = new Scaleway.MnqNatsCredentials("mnqNatsCredentialsResource", new()
{
AccountId = "string",
Name = "string",
Region = "string",
});
example, err := scaleway.NewMnqNatsCredentials(ctx, "mnqNatsCredentialsResource", &scaleway.MnqNatsCredentialsArgs{
AccountId: pulumi.String("string"),
Name: pulumi.String("string"),
Region: pulumi.String("string"),
})
var mnqNatsCredentialsResource = new MnqNatsCredentials("mnqNatsCredentialsResource", MnqNatsCredentialsArgs.builder()
.accountId("string")
.name("string")
.region("string")
.build());
mnq_nats_credentials_resource = scaleway.MnqNatsCredentials("mnqNatsCredentialsResource",
account_id="string",
name="string",
region="string")
const mnqNatsCredentialsResource = new scaleway.MnqNatsCredentials("mnqNatsCredentialsResource", {
accountId: "string",
name: "string",
region: "string",
});
type: scaleway:MnqNatsCredentials
properties:
accountId: string
name: string
region: string
MnqNatsCredentials Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The MnqNatsCredentials resource accepts the following input properties:
- 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the MnqNatsCredentials resource produces the following output properties:
Look up Existing MnqNatsCredentials Resource
Get an existing MnqNatsCredentials 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?: MnqNatsCredentialsState, opts?: CustomResourceOptions): MnqNatsCredentials
@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) -> MnqNatsCredentials
func GetMnqNatsCredentials(ctx *Context, name string, id IDInput, state *MnqNatsCredentialsState, opts ...ResourceOption) (*MnqNatsCredentials, error)
public static MnqNatsCredentials Get(string name, Input<string> id, MnqNatsCredentialsState? state, CustomResourceOptions? opts = null)
public static MnqNatsCredentials get(String name, Output<String> id, MnqNatsCredentialsState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- 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.
Import
Namespaces can be imported using {region}/{id}
, e.g.
bash
$ pulumi import scaleway:index/mnqNatsCredentials:MnqNatsCredentials 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.