Show / Hide Table of Contents

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" },
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Namespace
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Gcp.ServiceDirectory
Assembly: Pulumi.Gcp.dll
Syntax
public class Namespace : CustomResource

Constructors

View Source

Namespace(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 Source

Labels

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>>
View Source

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>
View Source

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>
View Source

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>
View Source

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 Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.