Show / Hide Table of Contents

Namespace Pulumi.Gcp.ServiceDirectory

Classes

Endpoint

An individual endpoint that provides a service.

To get more information about Endpoint, see:

  • API documentation
  • How-to Guides
  • Configuring an endpoint

Example Usage - Service Directory Endpoint Basic

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var exampleNamespace = new Gcp.ServiceDirectory.Namespace("exampleNamespace", new Gcp.ServiceDirectory.NamespaceArgs
    {
        NamespaceId = "example-namespace",
        Location = "us-central1",
    });
    var exampleService = new Gcp.ServiceDirectory.Service("exampleService", new Gcp.ServiceDirectory.ServiceArgs
    {
        ServiceId = "example-service",
        Namespace = exampleNamespace.Id,
    });
    var exampleEndpoint = new Gcp.ServiceDirectory.Endpoint("exampleEndpoint", new Gcp.ServiceDirectory.EndpointArgs
    {
        EndpointId = "example-endpoint",
        Service = exampleService.Id,
        Metadata = 
        {
            { "stage", "prod" },
            { "region", "us-central1" },
        },
        Address = "1.2.3.4",
        Port = 5353,
    });
}

}

EndpointArgs

EndpointState

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

}

NamespaceArgs

NamespaceIamBinding

Three different resources help you manage your IAM policy for Service Directory Namespace. Each of these resources serves a different use case:

  • gcp.servicedirectory.NamespaceIamPolicy: Authoritative. Sets the IAM policy for the namespace and replaces any existing policy already attached.
  • gcp.servicedirectory.NamespaceIamBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the namespace are preserved.
  • gcp.servicedirectory.NamespaceIamMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the namespace are preserved.

Note: gcp.servicedirectory.NamespaceIamPolicy cannot be used in conjunction with gcp.servicedirectory.NamespaceIamBinding and gcp.servicedirectory.NamespaceIamMember or they will fight over what your policy should be.

Note: gcp.servicedirectory.NamespaceIamBinding resources can be used in conjunction with gcp.servicedirectory.NamespaceIamMember resources only if they do not grant privilege to the same role.

google_service_directory_namespace_iam_policy

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var admin = Output.Create(Gcp.Organizations.GetIAMPolicy.InvokeAsync(new Gcp.Organizations.GetIAMPolicyArgs
    {
        Binding = 
        {

            {
                { "role", "roles/viewer" },
                { "members", 
                {
                    "user:jane@example.com",
                } },
            },
        },
    }));
    var policy = new Gcp.ServiceDirectory.NamespaceIamPolicy("policy", new Gcp.ServiceDirectory.NamespaceIamPolicyArgs
    {
        PolicyData = admin.Apply(admin => admin.PolicyData),
    });
}

}

google_service_directory_namespace_iam_binding

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var binding = new Gcp.ServiceDirectory.NamespaceIamBinding("binding", new Gcp.ServiceDirectory.NamespaceIamBindingArgs
    {
        Role = "roles/viewer",
        Members = 
        {
            "user:jane@example.com",
        },
    });
}

}

google_service_directory_namespace_iam_member

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var member = new Gcp.ServiceDirectory.NamespaceIamMember("member", new Gcp.ServiceDirectory.NamespaceIamMemberArgs
    {
        Role = "roles/viewer",
        Member = "user:jane@example.com",
    });
}

}

NamespaceIamBindingArgs

NamespaceIamBindingState

NamespaceIamMember

Three different resources help you manage your IAM policy for Service Directory Namespace. Each of these resources serves a different use case:

  • gcp.servicedirectory.NamespaceIamPolicy: Authoritative. Sets the IAM policy for the namespace and replaces any existing policy already attached.
  • gcp.servicedirectory.NamespaceIamBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the namespace are preserved.
  • gcp.servicedirectory.NamespaceIamMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the namespace are preserved.

Note: gcp.servicedirectory.NamespaceIamPolicy cannot be used in conjunction with gcp.servicedirectory.NamespaceIamBinding and gcp.servicedirectory.NamespaceIamMember or they will fight over what your policy should be.

Note: gcp.servicedirectory.NamespaceIamBinding resources can be used in conjunction with gcp.servicedirectory.NamespaceIamMember resources only if they do not grant privilege to the same role.

google_service_directory_namespace_iam_policy

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var admin = Output.Create(Gcp.Organizations.GetIAMPolicy.InvokeAsync(new Gcp.Organizations.GetIAMPolicyArgs
    {
        Binding = 
        {

            {
                { "role", "roles/viewer" },
                { "members", 
                {
                    "user:jane@example.com",
                } },
            },
        },
    }));
    var policy = new Gcp.ServiceDirectory.NamespaceIamPolicy("policy", new Gcp.ServiceDirectory.NamespaceIamPolicyArgs
    {
        PolicyData = admin.Apply(admin => admin.PolicyData),
    });
}

}

google_service_directory_namespace_iam_binding

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var binding = new Gcp.ServiceDirectory.NamespaceIamBinding("binding", new Gcp.ServiceDirectory.NamespaceIamBindingArgs
    {
        Role = "roles/viewer",
        Members = 
        {
            "user:jane@example.com",
        },
    });
}

}

google_service_directory_namespace_iam_member

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var member = new Gcp.ServiceDirectory.NamespaceIamMember("member", new Gcp.ServiceDirectory.NamespaceIamMemberArgs
    {
        Role = "roles/viewer",
        Member = "user:jane@example.com",
    });
}

}

NamespaceIamMemberArgs

NamespaceIamMemberState

NamespaceIamPolicy

Three different resources help you manage your IAM policy for Service Directory Namespace. Each of these resources serves a different use case:

  • gcp.servicedirectory.NamespaceIamPolicy: Authoritative. Sets the IAM policy for the namespace and replaces any existing policy already attached.
  • gcp.servicedirectory.NamespaceIamBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the namespace are preserved.
  • gcp.servicedirectory.NamespaceIamMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the namespace are preserved.

Note: gcp.servicedirectory.NamespaceIamPolicy cannot be used in conjunction with gcp.servicedirectory.NamespaceIamBinding and gcp.servicedirectory.NamespaceIamMember or they will fight over what your policy should be.

Note: gcp.servicedirectory.NamespaceIamBinding resources can be used in conjunction with gcp.servicedirectory.NamespaceIamMember resources only if they do not grant privilege to the same role.

google_service_directory_namespace_iam_policy

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var admin = Output.Create(Gcp.Organizations.GetIAMPolicy.InvokeAsync(new Gcp.Organizations.GetIAMPolicyArgs
    {
        Binding = 
        {

            {
                { "role", "roles/viewer" },
                { "members", 
                {
                    "user:jane@example.com",
                } },
            },
        },
    }));
    var policy = new Gcp.ServiceDirectory.NamespaceIamPolicy("policy", new Gcp.ServiceDirectory.NamespaceIamPolicyArgs
    {
        PolicyData = admin.Apply(admin => admin.PolicyData),
    });
}

}

google_service_directory_namespace_iam_binding

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var binding = new Gcp.ServiceDirectory.NamespaceIamBinding("binding", new Gcp.ServiceDirectory.NamespaceIamBindingArgs
    {
        Role = "roles/viewer",
        Members = 
        {
            "user:jane@example.com",
        },
    });
}

}

google_service_directory_namespace_iam_member

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var member = new Gcp.ServiceDirectory.NamespaceIamMember("member", new Gcp.ServiceDirectory.NamespaceIamMemberArgs
    {
        Role = "roles/viewer",
        Member = "user:jane@example.com",
    });
}

}

NamespaceIamPolicyArgs

NamespaceIamPolicyState

NamespaceState

Service

An individual service. A service contains a name and optional metadata.

To get more information about Service, see:

  • API documentation
  • How-to Guides
  • Configuring a service

Example Usage - Service Directory Service Basic

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var exampleNamespace = new Gcp.ServiceDirectory.Namespace("exampleNamespace", new Gcp.ServiceDirectory.NamespaceArgs
    {
        NamespaceId = "example-namespace",
        Location = "us-central1",
    });
    var exampleService = new Gcp.ServiceDirectory.Service("exampleService", new Gcp.ServiceDirectory.ServiceArgs
    {
        ServiceId = "example-service",
        Namespace = exampleNamespace.Id,
        Metadata = 
        {
            { "stage", "prod" },
            { "region", "us-central1" },
        },
    });
}

}

ServiceArgs

ServiceIamBinding

Three different resources help you manage your IAM policy for Service Directory Service. Each of these resources serves a different use case:

  • gcp.servicedirectory.ServiceIamPolicy: Authoritative. Sets the IAM policy for the service and replaces any existing policy already attached.
  • gcp.servicedirectory.ServiceIamBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the service are preserved.
  • gcp.servicedirectory.ServiceIamMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the service are preserved.

Note: gcp.servicedirectory.ServiceIamPolicy cannot be used in conjunction with gcp.servicedirectory.ServiceIamBinding and gcp.servicedirectory.ServiceIamMember or they will fight over what your policy should be.

Note: gcp.servicedirectory.ServiceIamBinding resources can be used in conjunction with gcp.servicedirectory.ServiceIamMember resources only if they do not grant privilege to the same role.

google_service_directory_service_iam_policy

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var admin = Output.Create(Gcp.Organizations.GetIAMPolicy.InvokeAsync(new Gcp.Organizations.GetIAMPolicyArgs
    {
        Binding = 
        {

            {
                { "role", "roles/viewer" },
                { "members", 
                {
                    "user:jane@example.com",
                } },
            },
        },
    }));
    var policy = new Gcp.ServiceDirectory.ServiceIamPolicy("policy", new Gcp.ServiceDirectory.ServiceIamPolicyArgs
    {
        PolicyData = admin.Apply(admin => admin.PolicyData),
    });
}

}

google_service_directory_service_iam_binding

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var binding = new Gcp.ServiceDirectory.ServiceIamBinding("binding", new Gcp.ServiceDirectory.ServiceIamBindingArgs
    {
        Role = "roles/viewer",
        Members = 
        {
            "user:jane@example.com",
        },
    });
}

}

google_service_directory_service_iam_member

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var member = new Gcp.ServiceDirectory.ServiceIamMember("member", new Gcp.ServiceDirectory.ServiceIamMemberArgs
    {
        Role = "roles/viewer",
        Member = "user:jane@example.com",
    });
}

}

ServiceIamBindingArgs

ServiceIamBindingState

ServiceIamMember

Three different resources help you manage your IAM policy for Service Directory Service. Each of these resources serves a different use case:

  • gcp.servicedirectory.ServiceIamPolicy: Authoritative. Sets the IAM policy for the service and replaces any existing policy already attached.
  • gcp.servicedirectory.ServiceIamBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the service are preserved.
  • gcp.servicedirectory.ServiceIamMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the service are preserved.

Note: gcp.servicedirectory.ServiceIamPolicy cannot be used in conjunction with gcp.servicedirectory.ServiceIamBinding and gcp.servicedirectory.ServiceIamMember or they will fight over what your policy should be.

Note: gcp.servicedirectory.ServiceIamBinding resources can be used in conjunction with gcp.servicedirectory.ServiceIamMember resources only if they do not grant privilege to the same role.

google_service_directory_service_iam_policy

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var admin = Output.Create(Gcp.Organizations.GetIAMPolicy.InvokeAsync(new Gcp.Organizations.GetIAMPolicyArgs
    {
        Binding = 
        {

            {
                { "role", "roles/viewer" },
                { "members", 
                {
                    "user:jane@example.com",
                } },
            },
        },
    }));
    var policy = new Gcp.ServiceDirectory.ServiceIamPolicy("policy", new Gcp.ServiceDirectory.ServiceIamPolicyArgs
    {
        PolicyData = admin.Apply(admin => admin.PolicyData),
    });
}

}

google_service_directory_service_iam_binding

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var binding = new Gcp.ServiceDirectory.ServiceIamBinding("binding", new Gcp.ServiceDirectory.ServiceIamBindingArgs
    {
        Role = "roles/viewer",
        Members = 
        {
            "user:jane@example.com",
        },
    });
}

}

google_service_directory_service_iam_member

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var member = new Gcp.ServiceDirectory.ServiceIamMember("member", new Gcp.ServiceDirectory.ServiceIamMemberArgs
    {
        Role = "roles/viewer",
        Member = "user:jane@example.com",
    });
}

}

ServiceIamMemberArgs

ServiceIamMemberState

ServiceIamPolicy

Three different resources help you manage your IAM policy for Service Directory Service. Each of these resources serves a different use case:

  • gcp.servicedirectory.ServiceIamPolicy: Authoritative. Sets the IAM policy for the service and replaces any existing policy already attached.
  • gcp.servicedirectory.ServiceIamBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the service are preserved.
  • gcp.servicedirectory.ServiceIamMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the service are preserved.

Note: gcp.servicedirectory.ServiceIamPolicy cannot be used in conjunction with gcp.servicedirectory.ServiceIamBinding and gcp.servicedirectory.ServiceIamMember or they will fight over what your policy should be.

Note: gcp.servicedirectory.ServiceIamBinding resources can be used in conjunction with gcp.servicedirectory.ServiceIamMember resources only if they do not grant privilege to the same role.

google_service_directory_service_iam_policy

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var admin = Output.Create(Gcp.Organizations.GetIAMPolicy.InvokeAsync(new Gcp.Organizations.GetIAMPolicyArgs
    {
        Binding = 
        {

            {
                { "role", "roles/viewer" },
                { "members", 
                {
                    "user:jane@example.com",
                } },
            },
        },
    }));
    var policy = new Gcp.ServiceDirectory.ServiceIamPolicy("policy", new Gcp.ServiceDirectory.ServiceIamPolicyArgs
    {
        PolicyData = admin.Apply(admin => admin.PolicyData),
    });
}

}

google_service_directory_service_iam_binding

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var binding = new Gcp.ServiceDirectory.ServiceIamBinding("binding", new Gcp.ServiceDirectory.ServiceIamBindingArgs
    {
        Role = "roles/viewer",
        Members = 
        {
            "user:jane@example.com",
        },
    });
}

}

google_service_directory_service_iam_member

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var member = new Gcp.ServiceDirectory.ServiceIamMember("member", new Gcp.ServiceDirectory.ServiceIamMemberArgs
    {
        Role = "roles/viewer",
        Member = "user:jane@example.com",
    });
}

}

ServiceIamPolicyArgs

ServiceIamPolicyState

ServiceState

Back to top Copyright 2016-2020, Pulumi Corporation.