volcengine.cr.Namespace
Explore with Pulumi AI
Provides a resource to manage cr namespace
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var foo = new Volcengine.Cr.Namespace("foo", new()
{
Registry = "tf-2",
});
var foo1 = new Volcengine.Cr.Namespace("foo1", new()
{
Registry = "tf-1",
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/cr"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cr.NewNamespace(ctx, "foo", &cr.NamespaceArgs{
Registry: pulumi.String("tf-2"),
})
if err != nil {
return err
}
_, err = cr.NewNamespace(ctx, "foo1", &cr.NamespaceArgs{
Registry: pulumi.String("tf-1"),
})
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.volcengine.cr.Namespace;
import com.pulumi.volcengine.cr.NamespaceArgs;
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 foo = new Namespace("foo", NamespaceArgs.builder()
.registry("tf-2")
.build());
var foo1 = new Namespace("foo1", NamespaceArgs.builder()
.registry("tf-1")
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo = volcengine.cr.Namespace("foo", registry="tf-2")
foo1 = volcengine.cr.Namespace("foo1", registry="tf-1")
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const foo = new volcengine.cr.Namespace("foo", {registry: "tf-2"});
const foo1 = new volcengine.cr.Namespace("foo1", {registry: "tf-1"});
resources:
foo:
type: volcengine:cr:Namespace
properties:
registry: tf-2
foo1:
type: volcengine:cr:Namespace
properties:
registry: tf-1
Create Namespace Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Namespace(name: string, args: NamespaceArgs, opts?: CustomResourceOptions);
@overload
def Namespace(resource_name: str,
args: NamespaceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Namespace(resource_name: str,
opts: Optional[ResourceOptions] = None,
registry: Optional[str] = None,
name: Optional[str] = None)
func NewNamespace(ctx *Context, name string, args NamespaceArgs, opts ...ResourceOption) (*Namespace, error)
public Namespace(string name, NamespaceArgs args, CustomResourceOptions? opts = null)
public Namespace(String name, NamespaceArgs args)
public Namespace(String name, NamespaceArgs args, CustomResourceOptions options)
type: volcengine:cr:Namespace
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 NamespaceArgs
- 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 NamespaceArgs
- 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 NamespaceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NamespaceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NamespaceArgs
- 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 volcengineNamespaceResource = new Volcengine.Cr.Namespace("volcengineNamespaceResource", new()
{
Registry = "string",
Name = "string",
});
example, err := cr.NewNamespace(ctx, "volcengineNamespaceResource", &cr.NamespaceArgs{
Registry: pulumi.String("string"),
Name: pulumi.String("string"),
})
var volcengineNamespaceResource = new Namespace("volcengineNamespaceResource", NamespaceArgs.builder()
.registry("string")
.name("string")
.build());
volcengine_namespace_resource = volcengine.cr.Namespace("volcengineNamespaceResource",
registry="string",
name="string")
const volcengineNamespaceResource = new volcengine.cr.Namespace("volcengineNamespaceResource", {
registry: "string",
name: "string",
});
type: volcengine:cr:Namespace
properties:
name: string
registry: string
Namespace 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 Namespace resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the Namespace resource produces the following output properties:
- Create
Time string - The time when namespace created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Create
Time string - The time when namespace created.
- Id string
- The provider-assigned unique ID for this managed resource.
- create
Time String - The time when namespace created.
- id String
- The provider-assigned unique ID for this managed resource.
- create
Time string - The time when namespace created.
- id string
- The provider-assigned unique ID for this managed resource.
- create_
time str - The time when namespace created.
- id str
- The provider-assigned unique ID for this managed resource.
- create
Time String - The time when namespace created.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Namespace Resource
Get an existing Namespace 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?: NamespaceState, opts?: CustomResourceOptions): Namespace
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_time: Optional[str] = None,
name: Optional[str] = None,
registry: Optional[str] = None) -> Namespace
func GetNamespace(ctx *Context, name string, id IDInput, state *NamespaceState, opts ...ResourceOption) (*Namespace, error)
public static Namespace Get(string name, Input<string> id, NamespaceState? state, CustomResourceOptions? opts = null)
public static Namespace get(String name, Output<String> id, NamespaceState 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.
- Create
Time string - The time when namespace created.
- Name string
- The name of CrNamespace.
- Registry string
- The registry name.
- Create
Time string - The time when namespace created.
- Name string
- The name of CrNamespace.
- Registry string
- The registry name.
- create
Time String - The time when namespace created.
- name String
- The name of CrNamespace.
- registry String
- The registry name.
- create
Time string - The time when namespace created.
- name string
- The name of CrNamespace.
- registry string
- The registry name.
- create_
time str - The time when namespace created.
- name str
- The name of CrNamespace.
- registry str
- The registry name.
- create
Time String - The time when namespace created.
- name String
- The name of CrNamespace.
- registry String
- The registry name.
Import
CR namespace can be imported using the registry:name, e.g.
$ pulumi import volcengine:cr/namespace:Namespace default cr-basic:namespace-1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.