alicloud.dcdn.KvNamespace
Explore with Pulumi AI
Provides a Dcdn Kv Namespace resource.
For information about Dcdn Kv Namespace and how to use it, see What is Kv Namespace.
NOTE: Available since v1.198.0.
Example Usage
Basic Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "tf-example";
var @default = new AliCloud.Dcdn.KvNamespace("default", new()
{
Description = name,
Namespace = name,
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dcdn"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "tf-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_, err := dcdn.NewKvNamespace(ctx, "default", &dcdn.KvNamespaceArgs{
Description: pulumi.String(name),
Namespace: pulumi.String(name),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.dcdn.KvNamespace;
import com.pulumi.alicloud.dcdn.KvNamespaceArgs;
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) {
final var config = ctx.config();
final var name = config.get("name").orElse("tf-example");
var default_ = new KvNamespace("default", KvNamespaceArgs.builder()
.description(name)
.namespace(name)
.build());
}
}
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tf-example"
default = alicloud.dcdn.KvNamespace("default",
description=name,
namespace=name)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "tf-example";
const _default = new alicloud.dcdn.KvNamespace("default", {
description: name,
namespace: name,
});
configuration:
name:
type: string
default: tf-example
resources:
default:
type: alicloud:dcdn:KvNamespace
properties:
description: ${name}
namespace: ${name}
Create KvNamespace Resource
new KvNamespace(name: string, args: KvNamespaceArgs, opts?: CustomResourceOptions);
@overload
def KvNamespace(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
namespace: Optional[str] = None)
@overload
def KvNamespace(resource_name: str,
args: KvNamespaceArgs,
opts: Optional[ResourceOptions] = None)
func NewKvNamespace(ctx *Context, name string, args KvNamespaceArgs, opts ...ResourceOption) (*KvNamespace, error)
public KvNamespace(string name, KvNamespaceArgs args, CustomResourceOptions? opts = null)
public KvNamespace(String name, KvNamespaceArgs args)
public KvNamespace(String name, KvNamespaceArgs args, CustomResourceOptions options)
type: alicloud:dcdn:KvNamespace
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args KvNamespaceArgs
- 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 KvNamespaceArgs
- 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 KvNamespaceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args KvNamespaceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args KvNamespaceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
KvNamespace 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 KvNamespace resource accepts the following input properties:
- Description string
Namespace description information
- Namespace string
Namespace name. The name can contain letters, digits, hyphens (-), and underscores (_).
- Description string
Namespace description information
- Namespace string
Namespace name. The name can contain letters, digits, hyphens (-), and underscores (_).
- description String
Namespace description information
- namespace String
Namespace name. The name can contain letters, digits, hyphens (-), and underscores (_).
- description string
Namespace description information
- namespace string
Namespace name. The name can contain letters, digits, hyphens (-), and underscores (_).
- description str
Namespace description information
- namespace str
Namespace name. The name can contain letters, digits, hyphens (-), and underscores (_).
- description String
Namespace description information
- namespace String
Namespace name. The name can contain letters, digits, hyphens (-), and underscores (_).
Outputs
All input properties are implicitly available as output properties. Additionally, the KvNamespace resource produces the following output properties:
Look up Existing KvNamespace Resource
Get an existing KvNamespace 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?: KvNamespaceState, opts?: CustomResourceOptions): KvNamespace
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
namespace: Optional[str] = None,
status: Optional[str] = None) -> KvNamespace
func GetKvNamespace(ctx *Context, name string, id IDInput, state *KvNamespaceState, opts ...ResourceOption) (*KvNamespace, error)
public static KvNamespace Get(string name, Input<string> id, KvNamespaceState? state, CustomResourceOptions? opts = null)
public static KvNamespace get(String name, Output<String> id, KvNamespaceState 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.
- Description string
Namespace description information
- Namespace string
Namespace name. The name can contain letters, digits, hyphens (-), and underscores (_).
- Status string
The status of the resource
- Description string
Namespace description information
- Namespace string
Namespace name. The name can contain letters, digits, hyphens (-), and underscores (_).
- Status string
The status of the resource
- description String
Namespace description information
- namespace String
Namespace name. The name can contain letters, digits, hyphens (-), and underscores (_).
- status String
The status of the resource
- description string
Namespace description information
- namespace string
Namespace name. The name can contain letters, digits, hyphens (-), and underscores (_).
- status string
The status of the resource
- description str
Namespace description information
- namespace str
Namespace name. The name can contain letters, digits, hyphens (-), and underscores (_).
- status str
The status of the resource
- description String
Namespace description information
- namespace String
Namespace name. The name can contain letters, digits, hyphens (-), and underscores (_).
- status String
The status of the resource
Import
Dcdn Kv Namespace can be imported using the id, e.g.
$ pulumi import alicloud:dcdn/kvNamespace:KvNamespace example
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.