Class Namespace
A container for services. Namespaces allow administrators to group services
together and define permissions for a collection of services.
To get more information about Namespace, see:
- API documentation
- How-to Guides
- Configuring a namespace
Example Usage - Service Directory Namespace Basic
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var example = new Gcp.ServiceDirectory.Namespace("example", new Gcp.ServiceDirectory.NamespaceArgs
{
NamespaceId = "example-namespace",
Location = "us-central1",
Labels =
{
{ "key", "value" },
{ "foo", "bar" },
},
});
}
}
Inherited Members
Namespace: Pulumi.Gcp.ServiceDirectory
Assembly: Pulumi.Gcp.dll
Syntax
public class Namespace : CustomResource
Constructors
View SourceNamespace(String, NamespaceArgs, CustomResourceOptions)
Create a Namespace resource with the given unique name, arguments, and options.
Declaration
public Namespace(string name, NamespaceArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| NamespaceArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceLabels
Resource labels associated with this Namespace. No more than 64 user labels can be associated with a given resource. Label keys and values can be no longer than 63 characters.
Declaration
public Output<ImmutableDictionary<string, string>> Labels { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>> |
Location
The location for the Namespace.
A full list of valid locations can be found by running
gcloud beta service-directory locations list.
Declaration
public Output<string> Location { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The resource name for the namespace in the format 'projects//locations//namespaces/*'.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
NamespaceId
The Resource ID must be 1-63 characters long, including digits, lowercase letters or the hyphen character.
Declaration
public Output<string> NamespaceId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Project
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Declaration
public Output<string> Project { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, NamespaceState, CustomResourceOptions)
Get an existing Namespace resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Namespace Get(string name, Input<string> id, NamespaceState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| NamespaceState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Namespace |