servicedirectory

package
v4.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoint

type Endpoint struct {
	pulumi.CustomResourceState

	// IPv4 or IPv6 address of the endpoint.
	Address pulumi.StringPtrOutput `pulumi:"address"`
	// The Resource ID must be 1-63 characters long, including digits,
	// lowercase letters or the hyphen character.
	EndpointId pulumi.StringOutput `pulumi:"endpointId"`
	// Metadata for the endpoint. This data can be consumed
	// by service clients. The entire metadata dictionary may contain
	// up to 512 characters, spread across all key-value pairs.
	// Metadata that goes beyond any these limits will be rejected.
	Metadata pulumi.StringMapOutput `pulumi:"metadata"`
	// The resource name for the endpoint in the format 'projects/*/locations/*/namespaces/*/services/*/endpoints/*'.
	Name pulumi.StringOutput `pulumi:"name"`
	// Port that the endpoint is running on, must be in the
	// range of [0, 65535]. If unspecified, the default is 0.
	Port pulumi.IntPtrOutput `pulumi:"port"`
	// The resource name of the service that this endpoint provides.
	Service pulumi.StringOutput `pulumi:"service"`
}

An individual endpoint that provides a service.

To get more information about Endpoint, see:

* [API documentation](https://cloud.google.com/service-directory/docs/reference/rest/v1beta1/projects.locations.namespaces.services.endpoints) * How-to Guides

## Example Usage ### Service Directory Endpoint Basic

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleNamespace, err := servicedirectory.NewNamespace(ctx, "exampleNamespace", &servicedirectory.NamespaceArgs{
			NamespaceId: pulumi.String("example-namespace"),
			Location:    pulumi.String("us-central1"),
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		exampleService, err := servicedirectory.NewService(ctx, "exampleService", &servicedirectory.ServiceArgs{
			ServiceId: pulumi.String("example-service"),
			Namespace: exampleNamespace.ID(),
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		_, err = servicedirectory.NewEndpoint(ctx, "exampleEndpoint", &servicedirectory.EndpointArgs{
			EndpointId: pulumi.String("example-endpoint"),
			Service:    exampleService.ID(),
			Metadata: pulumi.StringMap{
				"stage":  pulumi.String("prod"),
				"region": pulumi.String("us-central1"),
			},
			Address: pulumi.String("1.2.3.4"),
			Port:    pulumi.Int(5353),
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Endpoint can be imported using any of these accepted formats

```sh

$ pulumi import gcp:servicedirectory/endpoint:Endpoint default projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}}/services/{{service_id}}/endpoints/{{endpoint_id}}

```

```sh

$ pulumi import gcp:servicedirectory/endpoint:Endpoint default {{project}}/{{location}}/{{namespace_id}}/{{service_id}}/{{endpoint_id}}

```

```sh

$ pulumi import gcp:servicedirectory/endpoint:Endpoint default {{location}}/{{namespace_id}}/{{service_id}}/{{endpoint_id}}

```

func GetEndpoint

func GetEndpoint(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *EndpointState, opts ...pulumi.ResourceOption) (*Endpoint, error)

GetEndpoint gets an existing Endpoint resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewEndpoint

func NewEndpoint(ctx *pulumi.Context,
	name string, args *EndpointArgs, opts ...pulumi.ResourceOption) (*Endpoint, error)

NewEndpoint registers a new resource with the given unique name, arguments, and options.

func (*Endpoint) ElementType added in v4.4.0

func (*Endpoint) ElementType() reflect.Type

func (*Endpoint) ToEndpointOutput added in v4.4.0

func (i *Endpoint) ToEndpointOutput() EndpointOutput

func (*Endpoint) ToEndpointOutputWithContext added in v4.4.0

func (i *Endpoint) ToEndpointOutputWithContext(ctx context.Context) EndpointOutput

func (*Endpoint) ToEndpointPtrOutput added in v4.11.1

func (i *Endpoint) ToEndpointPtrOutput() EndpointPtrOutput

func (*Endpoint) ToEndpointPtrOutputWithContext added in v4.11.1

func (i *Endpoint) ToEndpointPtrOutputWithContext(ctx context.Context) EndpointPtrOutput

type EndpointArgs

type EndpointArgs struct {
	// IPv4 or IPv6 address of the endpoint.
	Address pulumi.StringPtrInput
	// The Resource ID must be 1-63 characters long, including digits,
	// lowercase letters or the hyphen character.
	EndpointId pulumi.StringInput
	// Metadata for the endpoint. This data can be consumed
	// by service clients. The entire metadata dictionary may contain
	// up to 512 characters, spread across all key-value pairs.
	// Metadata that goes beyond any these limits will be rejected.
	Metadata pulumi.StringMapInput
	// Port that the endpoint is running on, must be in the
	// range of [0, 65535]. If unspecified, the default is 0.
	Port pulumi.IntPtrInput
	// The resource name of the service that this endpoint provides.
	Service pulumi.StringInput
}

The set of arguments for constructing a Endpoint resource.

func (EndpointArgs) ElementType

func (EndpointArgs) ElementType() reflect.Type

type EndpointArray added in v4.11.1

type EndpointArray []EndpointInput

func (EndpointArray) ElementType added in v4.11.1

func (EndpointArray) ElementType() reflect.Type

func (EndpointArray) ToEndpointArrayOutput added in v4.11.1

func (i EndpointArray) ToEndpointArrayOutput() EndpointArrayOutput

func (EndpointArray) ToEndpointArrayOutputWithContext added in v4.11.1

func (i EndpointArray) ToEndpointArrayOutputWithContext(ctx context.Context) EndpointArrayOutput

type EndpointArrayInput added in v4.11.1

type EndpointArrayInput interface {
	pulumi.Input

	ToEndpointArrayOutput() EndpointArrayOutput
	ToEndpointArrayOutputWithContext(context.Context) EndpointArrayOutput
}

EndpointArrayInput is an input type that accepts EndpointArray and EndpointArrayOutput values. You can construct a concrete instance of `EndpointArrayInput` via:

EndpointArray{ EndpointArgs{...} }

type EndpointArrayOutput added in v4.11.1

type EndpointArrayOutput struct{ *pulumi.OutputState }

func (EndpointArrayOutput) ElementType added in v4.11.1

func (EndpointArrayOutput) ElementType() reflect.Type

func (EndpointArrayOutput) Index added in v4.11.1

func (EndpointArrayOutput) ToEndpointArrayOutput added in v4.11.1

func (o EndpointArrayOutput) ToEndpointArrayOutput() EndpointArrayOutput

func (EndpointArrayOutput) ToEndpointArrayOutputWithContext added in v4.11.1

func (o EndpointArrayOutput) ToEndpointArrayOutputWithContext(ctx context.Context) EndpointArrayOutput

type EndpointInput added in v4.4.0

type EndpointInput interface {
	pulumi.Input

	ToEndpointOutput() EndpointOutput
	ToEndpointOutputWithContext(ctx context.Context) EndpointOutput
}

type EndpointMap added in v4.11.1

type EndpointMap map[string]EndpointInput

func (EndpointMap) ElementType added in v4.11.1

func (EndpointMap) ElementType() reflect.Type

func (EndpointMap) ToEndpointMapOutput added in v4.11.1

func (i EndpointMap) ToEndpointMapOutput() EndpointMapOutput

func (EndpointMap) ToEndpointMapOutputWithContext added in v4.11.1

func (i EndpointMap) ToEndpointMapOutputWithContext(ctx context.Context) EndpointMapOutput

type EndpointMapInput added in v4.11.1

type EndpointMapInput interface {
	pulumi.Input

	ToEndpointMapOutput() EndpointMapOutput
	ToEndpointMapOutputWithContext(context.Context) EndpointMapOutput
}

EndpointMapInput is an input type that accepts EndpointMap and EndpointMapOutput values. You can construct a concrete instance of `EndpointMapInput` via:

EndpointMap{ "key": EndpointArgs{...} }

type EndpointMapOutput added in v4.11.1

type EndpointMapOutput struct{ *pulumi.OutputState }

func (EndpointMapOutput) ElementType added in v4.11.1

func (EndpointMapOutput) ElementType() reflect.Type

func (EndpointMapOutput) MapIndex added in v4.11.1

func (EndpointMapOutput) ToEndpointMapOutput added in v4.11.1

func (o EndpointMapOutput) ToEndpointMapOutput() EndpointMapOutput

func (EndpointMapOutput) ToEndpointMapOutputWithContext added in v4.11.1

func (o EndpointMapOutput) ToEndpointMapOutputWithContext(ctx context.Context) EndpointMapOutput

type EndpointOutput added in v4.4.0

type EndpointOutput struct {
	*pulumi.OutputState
}

func (EndpointOutput) ElementType added in v4.4.0

func (EndpointOutput) ElementType() reflect.Type

func (EndpointOutput) ToEndpointOutput added in v4.4.0

func (o EndpointOutput) ToEndpointOutput() EndpointOutput

func (EndpointOutput) ToEndpointOutputWithContext added in v4.4.0

func (o EndpointOutput) ToEndpointOutputWithContext(ctx context.Context) EndpointOutput

func (EndpointOutput) ToEndpointPtrOutput added in v4.11.1

func (o EndpointOutput) ToEndpointPtrOutput() EndpointPtrOutput

func (EndpointOutput) ToEndpointPtrOutputWithContext added in v4.11.1

func (o EndpointOutput) ToEndpointPtrOutputWithContext(ctx context.Context) EndpointPtrOutput

type EndpointPtrInput added in v4.11.1

type EndpointPtrInput interface {
	pulumi.Input

	ToEndpointPtrOutput() EndpointPtrOutput
	ToEndpointPtrOutputWithContext(ctx context.Context) EndpointPtrOutput
}

type EndpointPtrOutput added in v4.11.1

type EndpointPtrOutput struct {
	*pulumi.OutputState
}

func (EndpointPtrOutput) ElementType added in v4.11.1

func (EndpointPtrOutput) ElementType() reflect.Type

func (EndpointPtrOutput) ToEndpointPtrOutput added in v4.11.1

func (o EndpointPtrOutput) ToEndpointPtrOutput() EndpointPtrOutput

func (EndpointPtrOutput) ToEndpointPtrOutputWithContext added in v4.11.1

func (o EndpointPtrOutput) ToEndpointPtrOutputWithContext(ctx context.Context) EndpointPtrOutput

type EndpointState

type EndpointState struct {
	// IPv4 or IPv6 address of the endpoint.
	Address pulumi.StringPtrInput
	// The Resource ID must be 1-63 characters long, including digits,
	// lowercase letters or the hyphen character.
	EndpointId pulumi.StringPtrInput
	// Metadata for the endpoint. This data can be consumed
	// by service clients. The entire metadata dictionary may contain
	// up to 512 characters, spread across all key-value pairs.
	// Metadata that goes beyond any these limits will be rejected.
	Metadata pulumi.StringMapInput
	// The resource name for the endpoint in the format 'projects/*/locations/*/namespaces/*/services/*/endpoints/*'.
	Name pulumi.StringPtrInput
	// Port that the endpoint is running on, must be in the
	// range of [0, 65535]. If unspecified, the default is 0.
	Port pulumi.IntPtrInput
	// The resource name of the service that this endpoint provides.
	Service pulumi.StringPtrInput
}

func (EndpointState) ElementType

func (EndpointState) ElementType() reflect.Type

type Namespace

type Namespace struct {
	pulumi.CustomResourceState

	// 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.
	Labels pulumi.StringMapOutput `pulumi:"labels"`
	// The location for the Namespace.
	// A full list of valid locations can be found by running
	// `gcloud beta service-directory locations list`.
	Location pulumi.StringOutput `pulumi:"location"`
	// The resource name for the namespace in the format 'projects/*/locations/*/namespaces/*'.
	Name pulumi.StringOutput `pulumi:"name"`
	// The Resource ID must be 1-63 characters long, including digits,
	// lowercase letters or the hyphen character.
	NamespaceId pulumi.StringOutput `pulumi:"namespaceId"`
	// The ID of the project in which the resource belongs.
	// If it is not provided, the provider project is used.
	Project pulumi.StringOutput `pulumi:"project"`
}

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](https://cloud.google.com/service-directory/docs/reference/rest/v1beta1/projects.locations.namespaces) * How-to Guides

## Example Usage ### Service Directory Namespace Basic

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := servicedirectory.NewNamespace(ctx, "example", &servicedirectory.NamespaceArgs{
			NamespaceId: pulumi.String("example-namespace"),
			Location:    pulumi.String("us-central1"),
			Labels: pulumi.StringMap{
				"key": pulumi.String("value"),
				"foo": pulumi.String("bar"),
			},
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Namespace can be imported using any of these accepted formats

```sh

$ pulumi import gcp:servicedirectory/namespace:Namespace default projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}}

```

```sh

$ pulumi import gcp:servicedirectory/namespace:Namespace default {{project}}/{{location}}/{{namespace_id}}

```

```sh

$ pulumi import gcp:servicedirectory/namespace:Namespace default {{location}}/{{namespace_id}}

```

func GetNamespace

func GetNamespace(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *NamespaceState, opts ...pulumi.ResourceOption) (*Namespace, error)

GetNamespace gets an existing Namespace resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewNamespace

func NewNamespace(ctx *pulumi.Context,
	name string, args *NamespaceArgs, opts ...pulumi.ResourceOption) (*Namespace, error)

NewNamespace registers a new resource with the given unique name, arguments, and options.

func (*Namespace) ElementType added in v4.4.0

func (*Namespace) ElementType() reflect.Type

func (*Namespace) ToNamespaceOutput added in v4.4.0

func (i *Namespace) ToNamespaceOutput() NamespaceOutput

func (*Namespace) ToNamespaceOutputWithContext added in v4.4.0

func (i *Namespace) ToNamespaceOutputWithContext(ctx context.Context) NamespaceOutput

func (*Namespace) ToNamespacePtrOutput added in v4.11.1

func (i *Namespace) ToNamespacePtrOutput() NamespacePtrOutput

func (*Namespace) ToNamespacePtrOutputWithContext added in v4.11.1

func (i *Namespace) ToNamespacePtrOutputWithContext(ctx context.Context) NamespacePtrOutput

type NamespaceArgs

type NamespaceArgs struct {
	// 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.
	Labels pulumi.StringMapInput
	// The location for the Namespace.
	// A full list of valid locations can be found by running
	// `gcloud beta service-directory locations list`.
	Location pulumi.StringInput
	// The Resource ID must be 1-63 characters long, including digits,
	// lowercase letters or the hyphen character.
	NamespaceId pulumi.StringInput
	// The ID of the project in which the resource belongs.
	// If it is not provided, the provider project is used.
	Project pulumi.StringPtrInput
}

The set of arguments for constructing a Namespace resource.

func (NamespaceArgs) ElementType

func (NamespaceArgs) ElementType() reflect.Type

type NamespaceArray added in v4.11.1

type NamespaceArray []NamespaceInput

func (NamespaceArray) ElementType added in v4.11.1

func (NamespaceArray) ElementType() reflect.Type

func (NamespaceArray) ToNamespaceArrayOutput added in v4.11.1

func (i NamespaceArray) ToNamespaceArrayOutput() NamespaceArrayOutput

func (NamespaceArray) ToNamespaceArrayOutputWithContext added in v4.11.1

func (i NamespaceArray) ToNamespaceArrayOutputWithContext(ctx context.Context) NamespaceArrayOutput

type NamespaceArrayInput added in v4.11.1

type NamespaceArrayInput interface {
	pulumi.Input

	ToNamespaceArrayOutput() NamespaceArrayOutput
	ToNamespaceArrayOutputWithContext(context.Context) NamespaceArrayOutput
}

NamespaceArrayInput is an input type that accepts NamespaceArray and NamespaceArrayOutput values. You can construct a concrete instance of `NamespaceArrayInput` via:

NamespaceArray{ NamespaceArgs{...} }

type NamespaceArrayOutput added in v4.11.1

type NamespaceArrayOutput struct{ *pulumi.OutputState }

func (NamespaceArrayOutput) ElementType added in v4.11.1

func (NamespaceArrayOutput) ElementType() reflect.Type

func (NamespaceArrayOutput) Index added in v4.11.1

func (NamespaceArrayOutput) ToNamespaceArrayOutput added in v4.11.1

func (o NamespaceArrayOutput) ToNamespaceArrayOutput() NamespaceArrayOutput

func (NamespaceArrayOutput) ToNamespaceArrayOutputWithContext added in v4.11.1

func (o NamespaceArrayOutput) ToNamespaceArrayOutputWithContext(ctx context.Context) NamespaceArrayOutput

type NamespaceIamBinding

type NamespaceIamBinding struct {
	pulumi.CustomResourceState

	Condition NamespaceIamBindingConditionPtrOutput `pulumi:"condition"`
	// (Computed) The etag of the IAM policy.
	Etag    pulumi.StringOutput      `pulumi:"etag"`
	Members pulumi.StringArrayOutput `pulumi:"members"`
	// Used to find the parent resource to bind the IAM policy to
	Name pulumi.StringOutput `pulumi:"name"`
	// The role that should be applied. Only one
	// `servicedirectory.NamespaceIamBinding` can be used per role. Note that custom roles must be of the format
	// `[projects|organizations]/{parent-name}/roles/{role-name}`.
	Role pulumi.StringOutput `pulumi:"role"`
}

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

* `servicedirectory.NamespaceIamPolicy`: Authoritative. Sets the IAM policy for the namespace and replaces any existing policy already attached. * `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. * `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:** `servicedirectory.NamespaceIamPolicy` **cannot** be used in conjunction with `servicedirectory.NamespaceIamBinding` and `servicedirectory.NamespaceIamMember` or they will fight over what your policy should be.

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

## google\_service\_directory\_namespace\_iam\_policy

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		admin, err := organizations.LookupIAMPolicy(ctx, &organizations.LookupIAMPolicyArgs{
			Bindings: []organizations.GetIAMPolicyBinding{
				organizations.GetIAMPolicyBinding{
					Role: "roles/viewer",
					Members: []string{
						"user:jane@example.com",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		_, err = servicedirectory.NewNamespaceIamPolicy(ctx, "policy", &servicedirectory.NamespaceIamPolicyArgs{
			PolicyData: pulumi.String(admin.PolicyData),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## google\_service\_directory\_namespace\_iam\_binding

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := servicedirectory.NewNamespaceIamBinding(ctx, "binding", &servicedirectory.NamespaceIamBindingArgs{
			Role: pulumi.String("roles/viewer"),
			Members: pulumi.StringArray{
				pulumi.String("user:jane@example.com"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## google\_service\_directory\_namespace\_iam\_member

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := servicedirectory.NewNamespaceIamMember(ctx, "member", &servicedirectory.NamespaceIamMemberArgs{
			Role:   pulumi.String("roles/viewer"),
			Member: pulumi.String("user:jane@example.com"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

For all import syntaxes, the "resource in question" can take any of the following forms* projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}} * {{project}}/{{location}}/{{namespace_id}} * {{location}}/{{namespace_id}} Any variables not passed in the import command will be taken from the provider configuration. Service Directory namespace IAM resources can be imported using the resource identifiers, role, and member. IAM member imports use space-delimited identifiersthe resource in question, the role, and the member identity, e.g.

```sh

$ pulumi import gcp:servicedirectory/namespaceIamBinding:NamespaceIamBinding editor "projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}} roles/viewer user:jane@example.com"

```

IAM binding imports use space-delimited identifiersthe resource in question and the role, e.g.

```sh

$ pulumi import gcp:servicedirectory/namespaceIamBinding:NamespaceIamBinding editor "projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}} roles/viewer"

```

IAM policy imports use the identifier of the resource in question, e.g.

```sh

$ pulumi import gcp:servicedirectory/namespaceIamBinding:NamespaceIamBinding editor projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}}

```

-> **Custom Roles**If you're importing a IAM resource with a custom role, make sure to use the

full name of the custom role, e.g. `[projects/my-project|organizations/my-org]/roles/my-custom-role`.

func GetNamespaceIamBinding

func GetNamespaceIamBinding(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *NamespaceIamBindingState, opts ...pulumi.ResourceOption) (*NamespaceIamBinding, error)

GetNamespaceIamBinding gets an existing NamespaceIamBinding resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewNamespaceIamBinding

func NewNamespaceIamBinding(ctx *pulumi.Context,
	name string, args *NamespaceIamBindingArgs, opts ...pulumi.ResourceOption) (*NamespaceIamBinding, error)

NewNamespaceIamBinding registers a new resource with the given unique name, arguments, and options.

func (*NamespaceIamBinding) ElementType added in v4.4.0

func (*NamespaceIamBinding) ElementType() reflect.Type

func (*NamespaceIamBinding) ToNamespaceIamBindingOutput added in v4.4.0

func (i *NamespaceIamBinding) ToNamespaceIamBindingOutput() NamespaceIamBindingOutput

func (*NamespaceIamBinding) ToNamespaceIamBindingOutputWithContext added in v4.4.0

func (i *NamespaceIamBinding) ToNamespaceIamBindingOutputWithContext(ctx context.Context) NamespaceIamBindingOutput

func (*NamespaceIamBinding) ToNamespaceIamBindingPtrOutput added in v4.11.1

func (i *NamespaceIamBinding) ToNamespaceIamBindingPtrOutput() NamespaceIamBindingPtrOutput

func (*NamespaceIamBinding) ToNamespaceIamBindingPtrOutputWithContext added in v4.11.1

func (i *NamespaceIamBinding) ToNamespaceIamBindingPtrOutputWithContext(ctx context.Context) NamespaceIamBindingPtrOutput

type NamespaceIamBindingArgs

type NamespaceIamBindingArgs struct {
	Condition NamespaceIamBindingConditionPtrInput
	Members   pulumi.StringArrayInput
	// Used to find the parent resource to bind the IAM policy to
	Name pulumi.StringPtrInput
	// The role that should be applied. Only one
	// `servicedirectory.NamespaceIamBinding` can be used per role. Note that custom roles must be of the format
	// `[projects|organizations]/{parent-name}/roles/{role-name}`.
	Role pulumi.StringInput
}

The set of arguments for constructing a NamespaceIamBinding resource.

func (NamespaceIamBindingArgs) ElementType

func (NamespaceIamBindingArgs) ElementType() reflect.Type

type NamespaceIamBindingArray added in v4.11.1

type NamespaceIamBindingArray []NamespaceIamBindingInput

func (NamespaceIamBindingArray) ElementType added in v4.11.1

func (NamespaceIamBindingArray) ElementType() reflect.Type

func (NamespaceIamBindingArray) ToNamespaceIamBindingArrayOutput added in v4.11.1

func (i NamespaceIamBindingArray) ToNamespaceIamBindingArrayOutput() NamespaceIamBindingArrayOutput

func (NamespaceIamBindingArray) ToNamespaceIamBindingArrayOutputWithContext added in v4.11.1

func (i NamespaceIamBindingArray) ToNamespaceIamBindingArrayOutputWithContext(ctx context.Context) NamespaceIamBindingArrayOutput

type NamespaceIamBindingArrayInput added in v4.11.1

type NamespaceIamBindingArrayInput interface {
	pulumi.Input

	ToNamespaceIamBindingArrayOutput() NamespaceIamBindingArrayOutput
	ToNamespaceIamBindingArrayOutputWithContext(context.Context) NamespaceIamBindingArrayOutput
}

NamespaceIamBindingArrayInput is an input type that accepts NamespaceIamBindingArray and NamespaceIamBindingArrayOutput values. You can construct a concrete instance of `NamespaceIamBindingArrayInput` via:

NamespaceIamBindingArray{ NamespaceIamBindingArgs{...} }

type NamespaceIamBindingArrayOutput added in v4.11.1

type NamespaceIamBindingArrayOutput struct{ *pulumi.OutputState }

func (NamespaceIamBindingArrayOutput) ElementType added in v4.11.1

func (NamespaceIamBindingArrayOutput) Index added in v4.11.1

func (NamespaceIamBindingArrayOutput) ToNamespaceIamBindingArrayOutput added in v4.11.1

func (o NamespaceIamBindingArrayOutput) ToNamespaceIamBindingArrayOutput() NamespaceIamBindingArrayOutput

func (NamespaceIamBindingArrayOutput) ToNamespaceIamBindingArrayOutputWithContext added in v4.11.1

func (o NamespaceIamBindingArrayOutput) ToNamespaceIamBindingArrayOutputWithContext(ctx context.Context) NamespaceIamBindingArrayOutput

type NamespaceIamBindingCondition

type NamespaceIamBindingCondition struct {
	Description *string `pulumi:"description"`
	Expression  string  `pulumi:"expression"`
	Title       string  `pulumi:"title"`
}

type NamespaceIamBindingConditionArgs

type NamespaceIamBindingConditionArgs struct {
	Description pulumi.StringPtrInput `pulumi:"description"`
	Expression  pulumi.StringInput    `pulumi:"expression"`
	Title       pulumi.StringInput    `pulumi:"title"`
}

func (NamespaceIamBindingConditionArgs) ElementType

func (NamespaceIamBindingConditionArgs) ToNamespaceIamBindingConditionOutput

func (i NamespaceIamBindingConditionArgs) ToNamespaceIamBindingConditionOutput() NamespaceIamBindingConditionOutput

func (NamespaceIamBindingConditionArgs) ToNamespaceIamBindingConditionOutputWithContext

func (i NamespaceIamBindingConditionArgs) ToNamespaceIamBindingConditionOutputWithContext(ctx context.Context) NamespaceIamBindingConditionOutput

func (NamespaceIamBindingConditionArgs) ToNamespaceIamBindingConditionPtrOutput

func (i NamespaceIamBindingConditionArgs) ToNamespaceIamBindingConditionPtrOutput() NamespaceIamBindingConditionPtrOutput

func (NamespaceIamBindingConditionArgs) ToNamespaceIamBindingConditionPtrOutputWithContext

func (i NamespaceIamBindingConditionArgs) ToNamespaceIamBindingConditionPtrOutputWithContext(ctx context.Context) NamespaceIamBindingConditionPtrOutput

type NamespaceIamBindingConditionInput

type NamespaceIamBindingConditionInput interface {
	pulumi.Input

	ToNamespaceIamBindingConditionOutput() NamespaceIamBindingConditionOutput
	ToNamespaceIamBindingConditionOutputWithContext(context.Context) NamespaceIamBindingConditionOutput
}

NamespaceIamBindingConditionInput is an input type that accepts NamespaceIamBindingConditionArgs and NamespaceIamBindingConditionOutput values. You can construct a concrete instance of `NamespaceIamBindingConditionInput` via:

NamespaceIamBindingConditionArgs{...}

type NamespaceIamBindingConditionOutput

type NamespaceIamBindingConditionOutput struct{ *pulumi.OutputState }

func (NamespaceIamBindingConditionOutput) Description

func (NamespaceIamBindingConditionOutput) ElementType

func (NamespaceIamBindingConditionOutput) Expression

func (NamespaceIamBindingConditionOutput) Title

func (NamespaceIamBindingConditionOutput) ToNamespaceIamBindingConditionOutput

func (o NamespaceIamBindingConditionOutput) ToNamespaceIamBindingConditionOutput() NamespaceIamBindingConditionOutput

func (NamespaceIamBindingConditionOutput) ToNamespaceIamBindingConditionOutputWithContext

func (o NamespaceIamBindingConditionOutput) ToNamespaceIamBindingConditionOutputWithContext(ctx context.Context) NamespaceIamBindingConditionOutput

func (NamespaceIamBindingConditionOutput) ToNamespaceIamBindingConditionPtrOutput

func (o NamespaceIamBindingConditionOutput) ToNamespaceIamBindingConditionPtrOutput() NamespaceIamBindingConditionPtrOutput

func (NamespaceIamBindingConditionOutput) ToNamespaceIamBindingConditionPtrOutputWithContext

func (o NamespaceIamBindingConditionOutput) ToNamespaceIamBindingConditionPtrOutputWithContext(ctx context.Context) NamespaceIamBindingConditionPtrOutput

type NamespaceIamBindingConditionPtrInput

type NamespaceIamBindingConditionPtrInput interface {
	pulumi.Input

	ToNamespaceIamBindingConditionPtrOutput() NamespaceIamBindingConditionPtrOutput
	ToNamespaceIamBindingConditionPtrOutputWithContext(context.Context) NamespaceIamBindingConditionPtrOutput
}

NamespaceIamBindingConditionPtrInput is an input type that accepts NamespaceIamBindingConditionArgs, NamespaceIamBindingConditionPtr and NamespaceIamBindingConditionPtrOutput values. You can construct a concrete instance of `NamespaceIamBindingConditionPtrInput` via:

        NamespaceIamBindingConditionArgs{...}

or:

        nil

type NamespaceIamBindingConditionPtrOutput

type NamespaceIamBindingConditionPtrOutput struct{ *pulumi.OutputState }

func (NamespaceIamBindingConditionPtrOutput) Description

func (NamespaceIamBindingConditionPtrOutput) Elem

func (NamespaceIamBindingConditionPtrOutput) ElementType

func (NamespaceIamBindingConditionPtrOutput) Expression

func (NamespaceIamBindingConditionPtrOutput) Title

func (NamespaceIamBindingConditionPtrOutput) ToNamespaceIamBindingConditionPtrOutput

func (o NamespaceIamBindingConditionPtrOutput) ToNamespaceIamBindingConditionPtrOutput() NamespaceIamBindingConditionPtrOutput

func (NamespaceIamBindingConditionPtrOutput) ToNamespaceIamBindingConditionPtrOutputWithContext

func (o NamespaceIamBindingConditionPtrOutput) ToNamespaceIamBindingConditionPtrOutputWithContext(ctx context.Context) NamespaceIamBindingConditionPtrOutput

type NamespaceIamBindingInput added in v4.4.0

type NamespaceIamBindingInput interface {
	pulumi.Input

	ToNamespaceIamBindingOutput() NamespaceIamBindingOutput
	ToNamespaceIamBindingOutputWithContext(ctx context.Context) NamespaceIamBindingOutput
}

type NamespaceIamBindingMap added in v4.11.1

type NamespaceIamBindingMap map[string]NamespaceIamBindingInput

func (NamespaceIamBindingMap) ElementType added in v4.11.1

func (NamespaceIamBindingMap) ElementType() reflect.Type

func (NamespaceIamBindingMap) ToNamespaceIamBindingMapOutput added in v4.11.1

func (i NamespaceIamBindingMap) ToNamespaceIamBindingMapOutput() NamespaceIamBindingMapOutput

func (NamespaceIamBindingMap) ToNamespaceIamBindingMapOutputWithContext added in v4.11.1

func (i NamespaceIamBindingMap) ToNamespaceIamBindingMapOutputWithContext(ctx context.Context) NamespaceIamBindingMapOutput

type NamespaceIamBindingMapInput added in v4.11.1

type NamespaceIamBindingMapInput interface {
	pulumi.Input

	ToNamespaceIamBindingMapOutput() NamespaceIamBindingMapOutput
	ToNamespaceIamBindingMapOutputWithContext(context.Context) NamespaceIamBindingMapOutput
}

NamespaceIamBindingMapInput is an input type that accepts NamespaceIamBindingMap and NamespaceIamBindingMapOutput values. You can construct a concrete instance of `NamespaceIamBindingMapInput` via:

NamespaceIamBindingMap{ "key": NamespaceIamBindingArgs{...} }

type NamespaceIamBindingMapOutput added in v4.11.1

type NamespaceIamBindingMapOutput struct{ *pulumi.OutputState }

func (NamespaceIamBindingMapOutput) ElementType added in v4.11.1

func (NamespaceIamBindingMapOutput) MapIndex added in v4.11.1

func (NamespaceIamBindingMapOutput) ToNamespaceIamBindingMapOutput added in v4.11.1

func (o NamespaceIamBindingMapOutput) ToNamespaceIamBindingMapOutput() NamespaceIamBindingMapOutput

func (NamespaceIamBindingMapOutput) ToNamespaceIamBindingMapOutputWithContext added in v4.11.1

func (o NamespaceIamBindingMapOutput) ToNamespaceIamBindingMapOutputWithContext(ctx context.Context) NamespaceIamBindingMapOutput

type NamespaceIamBindingOutput added in v4.4.0

type NamespaceIamBindingOutput struct {
	*pulumi.OutputState
}

func (NamespaceIamBindingOutput) ElementType added in v4.4.0

func (NamespaceIamBindingOutput) ElementType() reflect.Type

func (NamespaceIamBindingOutput) ToNamespaceIamBindingOutput added in v4.4.0

func (o NamespaceIamBindingOutput) ToNamespaceIamBindingOutput() NamespaceIamBindingOutput

func (NamespaceIamBindingOutput) ToNamespaceIamBindingOutputWithContext added in v4.4.0

func (o NamespaceIamBindingOutput) ToNamespaceIamBindingOutputWithContext(ctx context.Context) NamespaceIamBindingOutput

func (NamespaceIamBindingOutput) ToNamespaceIamBindingPtrOutput added in v4.11.1

func (o NamespaceIamBindingOutput) ToNamespaceIamBindingPtrOutput() NamespaceIamBindingPtrOutput

func (NamespaceIamBindingOutput) ToNamespaceIamBindingPtrOutputWithContext added in v4.11.1

func (o NamespaceIamBindingOutput) ToNamespaceIamBindingPtrOutputWithContext(ctx context.Context) NamespaceIamBindingPtrOutput

type NamespaceIamBindingPtrInput added in v4.11.1

type NamespaceIamBindingPtrInput interface {
	pulumi.Input

	ToNamespaceIamBindingPtrOutput() NamespaceIamBindingPtrOutput
	ToNamespaceIamBindingPtrOutputWithContext(ctx context.Context) NamespaceIamBindingPtrOutput
}

type NamespaceIamBindingPtrOutput added in v4.11.1

type NamespaceIamBindingPtrOutput struct {
	*pulumi.OutputState
}

func (NamespaceIamBindingPtrOutput) ElementType added in v4.11.1

func (NamespaceIamBindingPtrOutput) ToNamespaceIamBindingPtrOutput added in v4.11.1

func (o NamespaceIamBindingPtrOutput) ToNamespaceIamBindingPtrOutput() NamespaceIamBindingPtrOutput

func (NamespaceIamBindingPtrOutput) ToNamespaceIamBindingPtrOutputWithContext added in v4.11.1

func (o NamespaceIamBindingPtrOutput) ToNamespaceIamBindingPtrOutputWithContext(ctx context.Context) NamespaceIamBindingPtrOutput

type NamespaceIamBindingState

type NamespaceIamBindingState struct {
	Condition NamespaceIamBindingConditionPtrInput
	// (Computed) The etag of the IAM policy.
	Etag    pulumi.StringPtrInput
	Members pulumi.StringArrayInput
	// Used to find the parent resource to bind the IAM policy to
	Name pulumi.StringPtrInput
	// The role that should be applied. Only one
	// `servicedirectory.NamespaceIamBinding` can be used per role. Note that custom roles must be of the format
	// `[projects|organizations]/{parent-name}/roles/{role-name}`.
	Role pulumi.StringPtrInput
}

func (NamespaceIamBindingState) ElementType

func (NamespaceIamBindingState) ElementType() reflect.Type

type NamespaceIamMember

type NamespaceIamMember struct {
	pulumi.CustomResourceState

	Condition NamespaceIamMemberConditionPtrOutput `pulumi:"condition"`
	// (Computed) The etag of the IAM policy.
	Etag   pulumi.StringOutput `pulumi:"etag"`
	Member pulumi.StringOutput `pulumi:"member"`
	// Used to find the parent resource to bind the IAM policy to
	Name pulumi.StringOutput `pulumi:"name"`
	// The role that should be applied. Only one
	// `servicedirectory.NamespaceIamBinding` can be used per role. Note that custom roles must be of the format
	// `[projects|organizations]/{parent-name}/roles/{role-name}`.
	Role pulumi.StringOutput `pulumi:"role"`
}

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

* `servicedirectory.NamespaceIamPolicy`: Authoritative. Sets the IAM policy for the namespace and replaces any existing policy already attached. * `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. * `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:** `servicedirectory.NamespaceIamPolicy` **cannot** be used in conjunction with `servicedirectory.NamespaceIamBinding` and `servicedirectory.NamespaceIamMember` or they will fight over what your policy should be.

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

## google\_service\_directory\_namespace\_iam\_policy

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		admin, err := organizations.LookupIAMPolicy(ctx, &organizations.LookupIAMPolicyArgs{
			Bindings: []organizations.GetIAMPolicyBinding{
				organizations.GetIAMPolicyBinding{
					Role: "roles/viewer",
					Members: []string{
						"user:jane@example.com",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		_, err = servicedirectory.NewNamespaceIamPolicy(ctx, "policy", &servicedirectory.NamespaceIamPolicyArgs{
			PolicyData: pulumi.String(admin.PolicyData),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## google\_service\_directory\_namespace\_iam\_binding

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := servicedirectory.NewNamespaceIamBinding(ctx, "binding", &servicedirectory.NamespaceIamBindingArgs{
			Role: pulumi.String("roles/viewer"),
			Members: pulumi.StringArray{
				pulumi.String("user:jane@example.com"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## google\_service\_directory\_namespace\_iam\_member

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := servicedirectory.NewNamespaceIamMember(ctx, "member", &servicedirectory.NamespaceIamMemberArgs{
			Role:   pulumi.String("roles/viewer"),
			Member: pulumi.String("user:jane@example.com"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

For all import syntaxes, the "resource in question" can take any of the following forms* projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}} * {{project}}/{{location}}/{{namespace_id}} * {{location}}/{{namespace_id}} Any variables not passed in the import command will be taken from the provider configuration. Service Directory namespace IAM resources can be imported using the resource identifiers, role, and member. IAM member imports use space-delimited identifiersthe resource in question, the role, and the member identity, e.g.

```sh

$ pulumi import gcp:servicedirectory/namespaceIamMember:NamespaceIamMember editor "projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}} roles/viewer user:jane@example.com"

```

IAM binding imports use space-delimited identifiersthe resource in question and the role, e.g.

```sh

$ pulumi import gcp:servicedirectory/namespaceIamMember:NamespaceIamMember editor "projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}} roles/viewer"

```

IAM policy imports use the identifier of the resource in question, e.g.

```sh

$ pulumi import gcp:servicedirectory/namespaceIamMember:NamespaceIamMember editor projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}}

```

-> **Custom Roles**If you're importing a IAM resource with a custom role, make sure to use the

full name of the custom role, e.g. `[projects/my-project|organizations/my-org]/roles/my-custom-role`.

func GetNamespaceIamMember

func GetNamespaceIamMember(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *NamespaceIamMemberState, opts ...pulumi.ResourceOption) (*NamespaceIamMember, error)

GetNamespaceIamMember gets an existing NamespaceIamMember resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewNamespaceIamMember

func NewNamespaceIamMember(ctx *pulumi.Context,
	name string, args *NamespaceIamMemberArgs, opts ...pulumi.ResourceOption) (*NamespaceIamMember, error)

NewNamespaceIamMember registers a new resource with the given unique name, arguments, and options.

func (*NamespaceIamMember) ElementType added in v4.4.0

func (*NamespaceIamMember) ElementType() reflect.Type

func (*NamespaceIamMember) ToNamespaceIamMemberOutput added in v4.4.0

func (i *NamespaceIamMember) ToNamespaceIamMemberOutput() NamespaceIamMemberOutput

func (*NamespaceIamMember) ToNamespaceIamMemberOutputWithContext added in v4.4.0

func (i *NamespaceIamMember) ToNamespaceIamMemberOutputWithContext(ctx context.Context) NamespaceIamMemberOutput

func (*NamespaceIamMember) ToNamespaceIamMemberPtrOutput added in v4.11.1

func (i *NamespaceIamMember) ToNamespaceIamMemberPtrOutput() NamespaceIamMemberPtrOutput

func (*NamespaceIamMember) ToNamespaceIamMemberPtrOutputWithContext added in v4.11.1

func (i *NamespaceIamMember) ToNamespaceIamMemberPtrOutputWithContext(ctx context.Context) NamespaceIamMemberPtrOutput

type NamespaceIamMemberArgs

type NamespaceIamMemberArgs struct {
	Condition NamespaceIamMemberConditionPtrInput
	Member    pulumi.StringInput
	// Used to find the parent resource to bind the IAM policy to
	Name pulumi.StringPtrInput
	// The role that should be applied. Only one
	// `servicedirectory.NamespaceIamBinding` can be used per role. Note that custom roles must be of the format
	// `[projects|organizations]/{parent-name}/roles/{role-name}`.
	Role pulumi.StringInput
}

The set of arguments for constructing a NamespaceIamMember resource.

func (NamespaceIamMemberArgs) ElementType

func (NamespaceIamMemberArgs) ElementType() reflect.Type

type NamespaceIamMemberArray added in v4.11.1

type NamespaceIamMemberArray []NamespaceIamMemberInput

func (NamespaceIamMemberArray) ElementType added in v4.11.1

func (NamespaceIamMemberArray) ElementType() reflect.Type

func (NamespaceIamMemberArray) ToNamespaceIamMemberArrayOutput added in v4.11.1

func (i NamespaceIamMemberArray) ToNamespaceIamMemberArrayOutput() NamespaceIamMemberArrayOutput

func (NamespaceIamMemberArray) ToNamespaceIamMemberArrayOutputWithContext added in v4.11.1

func (i NamespaceIamMemberArray) ToNamespaceIamMemberArrayOutputWithContext(ctx context.Context) NamespaceIamMemberArrayOutput

type NamespaceIamMemberArrayInput added in v4.11.1

type NamespaceIamMemberArrayInput interface {
	pulumi.Input

	ToNamespaceIamMemberArrayOutput() NamespaceIamMemberArrayOutput
	ToNamespaceIamMemberArrayOutputWithContext(context.Context) NamespaceIamMemberArrayOutput
}

NamespaceIamMemberArrayInput is an input type that accepts NamespaceIamMemberArray and NamespaceIamMemberArrayOutput values. You can construct a concrete instance of `NamespaceIamMemberArrayInput` via:

NamespaceIamMemberArray{ NamespaceIamMemberArgs{...} }

type NamespaceIamMemberArrayOutput added in v4.11.1

type NamespaceIamMemberArrayOutput struct{ *pulumi.OutputState }

func (NamespaceIamMemberArrayOutput) ElementType added in v4.11.1

func (NamespaceIamMemberArrayOutput) Index added in v4.11.1

func (NamespaceIamMemberArrayOutput) ToNamespaceIamMemberArrayOutput added in v4.11.1

func (o NamespaceIamMemberArrayOutput) ToNamespaceIamMemberArrayOutput() NamespaceIamMemberArrayOutput

func (NamespaceIamMemberArrayOutput) ToNamespaceIamMemberArrayOutputWithContext added in v4.11.1

func (o NamespaceIamMemberArrayOutput) ToNamespaceIamMemberArrayOutputWithContext(ctx context.Context) NamespaceIamMemberArrayOutput

type NamespaceIamMemberCondition

type NamespaceIamMemberCondition struct {
	Description *string `pulumi:"description"`
	Expression  string  `pulumi:"expression"`
	Title       string  `pulumi:"title"`
}

type NamespaceIamMemberConditionArgs

type NamespaceIamMemberConditionArgs struct {
	Description pulumi.StringPtrInput `pulumi:"description"`
	Expression  pulumi.StringInput    `pulumi:"expression"`
	Title       pulumi.StringInput    `pulumi:"title"`
}

func (NamespaceIamMemberConditionArgs) ElementType

func (NamespaceIamMemberConditionArgs) ToNamespaceIamMemberConditionOutput

func (i NamespaceIamMemberConditionArgs) ToNamespaceIamMemberConditionOutput() NamespaceIamMemberConditionOutput

func (NamespaceIamMemberConditionArgs) ToNamespaceIamMemberConditionOutputWithContext

func (i NamespaceIamMemberConditionArgs) ToNamespaceIamMemberConditionOutputWithContext(ctx context.Context) NamespaceIamMemberConditionOutput

func (NamespaceIamMemberConditionArgs) ToNamespaceIamMemberConditionPtrOutput

func (i NamespaceIamMemberConditionArgs) ToNamespaceIamMemberConditionPtrOutput() NamespaceIamMemberConditionPtrOutput

func (NamespaceIamMemberConditionArgs) ToNamespaceIamMemberConditionPtrOutputWithContext

func (i NamespaceIamMemberConditionArgs) ToNamespaceIamMemberConditionPtrOutputWithContext(ctx context.Context) NamespaceIamMemberConditionPtrOutput

type NamespaceIamMemberConditionInput

type NamespaceIamMemberConditionInput interface {
	pulumi.Input

	ToNamespaceIamMemberConditionOutput() NamespaceIamMemberConditionOutput
	ToNamespaceIamMemberConditionOutputWithContext(context.Context) NamespaceIamMemberConditionOutput
}

NamespaceIamMemberConditionInput is an input type that accepts NamespaceIamMemberConditionArgs and NamespaceIamMemberConditionOutput values. You can construct a concrete instance of `NamespaceIamMemberConditionInput` via:

NamespaceIamMemberConditionArgs{...}

type NamespaceIamMemberConditionOutput

type NamespaceIamMemberConditionOutput struct{ *pulumi.OutputState }

func (NamespaceIamMemberConditionOutput) Description

func (NamespaceIamMemberConditionOutput) ElementType

func (NamespaceIamMemberConditionOutput) Expression

func (NamespaceIamMemberConditionOutput) Title

func (NamespaceIamMemberConditionOutput) ToNamespaceIamMemberConditionOutput

func (o NamespaceIamMemberConditionOutput) ToNamespaceIamMemberConditionOutput() NamespaceIamMemberConditionOutput

func (NamespaceIamMemberConditionOutput) ToNamespaceIamMemberConditionOutputWithContext

func (o NamespaceIamMemberConditionOutput) ToNamespaceIamMemberConditionOutputWithContext(ctx context.Context) NamespaceIamMemberConditionOutput

func (NamespaceIamMemberConditionOutput) ToNamespaceIamMemberConditionPtrOutput

func (o NamespaceIamMemberConditionOutput) ToNamespaceIamMemberConditionPtrOutput() NamespaceIamMemberConditionPtrOutput

func (NamespaceIamMemberConditionOutput) ToNamespaceIamMemberConditionPtrOutputWithContext

func (o NamespaceIamMemberConditionOutput) ToNamespaceIamMemberConditionPtrOutputWithContext(ctx context.Context) NamespaceIamMemberConditionPtrOutput

type NamespaceIamMemberConditionPtrInput

type NamespaceIamMemberConditionPtrInput interface {
	pulumi.Input

	ToNamespaceIamMemberConditionPtrOutput() NamespaceIamMemberConditionPtrOutput
	ToNamespaceIamMemberConditionPtrOutputWithContext(context.Context) NamespaceIamMemberConditionPtrOutput
}

NamespaceIamMemberConditionPtrInput is an input type that accepts NamespaceIamMemberConditionArgs, NamespaceIamMemberConditionPtr and NamespaceIamMemberConditionPtrOutput values. You can construct a concrete instance of `NamespaceIamMemberConditionPtrInput` via:

        NamespaceIamMemberConditionArgs{...}

or:

        nil

type NamespaceIamMemberConditionPtrOutput

type NamespaceIamMemberConditionPtrOutput struct{ *pulumi.OutputState }

func (NamespaceIamMemberConditionPtrOutput) Description

func (NamespaceIamMemberConditionPtrOutput) Elem

func (NamespaceIamMemberConditionPtrOutput) ElementType

func (NamespaceIamMemberConditionPtrOutput) Expression

func (NamespaceIamMemberConditionPtrOutput) Title

func (NamespaceIamMemberConditionPtrOutput) ToNamespaceIamMemberConditionPtrOutput

func (o NamespaceIamMemberConditionPtrOutput) ToNamespaceIamMemberConditionPtrOutput() NamespaceIamMemberConditionPtrOutput

func (NamespaceIamMemberConditionPtrOutput) ToNamespaceIamMemberConditionPtrOutputWithContext

func (o NamespaceIamMemberConditionPtrOutput) ToNamespaceIamMemberConditionPtrOutputWithContext(ctx context.Context) NamespaceIamMemberConditionPtrOutput

type NamespaceIamMemberInput added in v4.4.0

type NamespaceIamMemberInput interface {
	pulumi.Input

	ToNamespaceIamMemberOutput() NamespaceIamMemberOutput
	ToNamespaceIamMemberOutputWithContext(ctx context.Context) NamespaceIamMemberOutput
}

type NamespaceIamMemberMap added in v4.11.1

type NamespaceIamMemberMap map[string]NamespaceIamMemberInput

func (NamespaceIamMemberMap) ElementType added in v4.11.1

func (NamespaceIamMemberMap) ElementType() reflect.Type

func (NamespaceIamMemberMap) ToNamespaceIamMemberMapOutput added in v4.11.1

func (i NamespaceIamMemberMap) ToNamespaceIamMemberMapOutput() NamespaceIamMemberMapOutput

func (NamespaceIamMemberMap) ToNamespaceIamMemberMapOutputWithContext added in v4.11.1

func (i NamespaceIamMemberMap) ToNamespaceIamMemberMapOutputWithContext(ctx context.Context) NamespaceIamMemberMapOutput

type NamespaceIamMemberMapInput added in v4.11.1

type NamespaceIamMemberMapInput interface {
	pulumi.Input

	ToNamespaceIamMemberMapOutput() NamespaceIamMemberMapOutput
	ToNamespaceIamMemberMapOutputWithContext(context.Context) NamespaceIamMemberMapOutput
}

NamespaceIamMemberMapInput is an input type that accepts NamespaceIamMemberMap and NamespaceIamMemberMapOutput values. You can construct a concrete instance of `NamespaceIamMemberMapInput` via:

NamespaceIamMemberMap{ "key": NamespaceIamMemberArgs{...} }

type NamespaceIamMemberMapOutput added in v4.11.1

type NamespaceIamMemberMapOutput struct{ *pulumi.OutputState }

func (NamespaceIamMemberMapOutput) ElementType added in v4.11.1

func (NamespaceIamMemberMapOutput) MapIndex added in v4.11.1

func (NamespaceIamMemberMapOutput) ToNamespaceIamMemberMapOutput added in v4.11.1

func (o NamespaceIamMemberMapOutput) ToNamespaceIamMemberMapOutput() NamespaceIamMemberMapOutput

func (NamespaceIamMemberMapOutput) ToNamespaceIamMemberMapOutputWithContext added in v4.11.1

func (o NamespaceIamMemberMapOutput) ToNamespaceIamMemberMapOutputWithContext(ctx context.Context) NamespaceIamMemberMapOutput

type NamespaceIamMemberOutput added in v4.4.0

type NamespaceIamMemberOutput struct {
	*pulumi.OutputState
}

func (NamespaceIamMemberOutput) ElementType added in v4.4.0

func (NamespaceIamMemberOutput) ElementType() reflect.Type

func (NamespaceIamMemberOutput) ToNamespaceIamMemberOutput added in v4.4.0

func (o NamespaceIamMemberOutput) ToNamespaceIamMemberOutput() NamespaceIamMemberOutput

func (NamespaceIamMemberOutput) ToNamespaceIamMemberOutputWithContext added in v4.4.0

func (o NamespaceIamMemberOutput) ToNamespaceIamMemberOutputWithContext(ctx context.Context) NamespaceIamMemberOutput

func (NamespaceIamMemberOutput) ToNamespaceIamMemberPtrOutput added in v4.11.1

func (o NamespaceIamMemberOutput) ToNamespaceIamMemberPtrOutput() NamespaceIamMemberPtrOutput

func (NamespaceIamMemberOutput) ToNamespaceIamMemberPtrOutputWithContext added in v4.11.1

func (o NamespaceIamMemberOutput) ToNamespaceIamMemberPtrOutputWithContext(ctx context.Context) NamespaceIamMemberPtrOutput

type NamespaceIamMemberPtrInput added in v4.11.1

type NamespaceIamMemberPtrInput interface {
	pulumi.Input

	ToNamespaceIamMemberPtrOutput() NamespaceIamMemberPtrOutput
	ToNamespaceIamMemberPtrOutputWithContext(ctx context.Context) NamespaceIamMemberPtrOutput
}

type NamespaceIamMemberPtrOutput added in v4.11.1

type NamespaceIamMemberPtrOutput struct {
	*pulumi.OutputState
}

func (NamespaceIamMemberPtrOutput) ElementType added in v4.11.1

func (NamespaceIamMemberPtrOutput) ToNamespaceIamMemberPtrOutput added in v4.11.1

func (o NamespaceIamMemberPtrOutput) ToNamespaceIamMemberPtrOutput() NamespaceIamMemberPtrOutput

func (NamespaceIamMemberPtrOutput) ToNamespaceIamMemberPtrOutputWithContext added in v4.11.1

func (o NamespaceIamMemberPtrOutput) ToNamespaceIamMemberPtrOutputWithContext(ctx context.Context) NamespaceIamMemberPtrOutput

type NamespaceIamMemberState

type NamespaceIamMemberState struct {
	Condition NamespaceIamMemberConditionPtrInput
	// (Computed) The etag of the IAM policy.
	Etag   pulumi.StringPtrInput
	Member pulumi.StringPtrInput
	// Used to find the parent resource to bind the IAM policy to
	Name pulumi.StringPtrInput
	// The role that should be applied. Only one
	// `servicedirectory.NamespaceIamBinding` can be used per role. Note that custom roles must be of the format
	// `[projects|organizations]/{parent-name}/roles/{role-name}`.
	Role pulumi.StringPtrInput
}

func (NamespaceIamMemberState) ElementType

func (NamespaceIamMemberState) ElementType() reflect.Type

type NamespaceIamPolicy

type NamespaceIamPolicy struct {
	pulumi.CustomResourceState

	// (Computed) The etag of the IAM policy.
	Etag pulumi.StringOutput `pulumi:"etag"`
	// Used to find the parent resource to bind the IAM policy to
	Name pulumi.StringOutput `pulumi:"name"`
	// The policy data generated by
	// a `organizations.getIAMPolicy` data source.
	PolicyData pulumi.StringOutput `pulumi:"policyData"`
}

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

* `servicedirectory.NamespaceIamPolicy`: Authoritative. Sets the IAM policy for the namespace and replaces any existing policy already attached. * `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. * `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:** `servicedirectory.NamespaceIamPolicy` **cannot** be used in conjunction with `servicedirectory.NamespaceIamBinding` and `servicedirectory.NamespaceIamMember` or they will fight over what your policy should be.

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

## google\_service\_directory\_namespace\_iam\_policy

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		admin, err := organizations.LookupIAMPolicy(ctx, &organizations.LookupIAMPolicyArgs{
			Bindings: []organizations.GetIAMPolicyBinding{
				organizations.GetIAMPolicyBinding{
					Role: "roles/viewer",
					Members: []string{
						"user:jane@example.com",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		_, err = servicedirectory.NewNamespaceIamPolicy(ctx, "policy", &servicedirectory.NamespaceIamPolicyArgs{
			PolicyData: pulumi.String(admin.PolicyData),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## google\_service\_directory\_namespace\_iam\_binding

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := servicedirectory.NewNamespaceIamBinding(ctx, "binding", &servicedirectory.NamespaceIamBindingArgs{
			Role: pulumi.String("roles/viewer"),
			Members: pulumi.StringArray{
				pulumi.String("user:jane@example.com"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## google\_service\_directory\_namespace\_iam\_member

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := servicedirectory.NewNamespaceIamMember(ctx, "member", &servicedirectory.NamespaceIamMemberArgs{
			Role:   pulumi.String("roles/viewer"),
			Member: pulumi.String("user:jane@example.com"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

For all import syntaxes, the "resource in question" can take any of the following forms* projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}} * {{project}}/{{location}}/{{namespace_id}} * {{location}}/{{namespace_id}} Any variables not passed in the import command will be taken from the provider configuration. Service Directory namespace IAM resources can be imported using the resource identifiers, role, and member. IAM member imports use space-delimited identifiersthe resource in question, the role, and the member identity, e.g.

```sh

$ pulumi import gcp:servicedirectory/namespaceIamPolicy:NamespaceIamPolicy editor "projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}} roles/viewer user:jane@example.com"

```

IAM binding imports use space-delimited identifiersthe resource in question and the role, e.g.

```sh

$ pulumi import gcp:servicedirectory/namespaceIamPolicy:NamespaceIamPolicy editor "projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}} roles/viewer"

```

IAM policy imports use the identifier of the resource in question, e.g.

```sh

$ pulumi import gcp:servicedirectory/namespaceIamPolicy:NamespaceIamPolicy editor projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}}

```

-> **Custom Roles**If you're importing a IAM resource with a custom role, make sure to use the

full name of the custom role, e.g. `[projects/my-project|organizations/my-org]/roles/my-custom-role`.

func GetNamespaceIamPolicy

func GetNamespaceIamPolicy(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *NamespaceIamPolicyState, opts ...pulumi.ResourceOption) (*NamespaceIamPolicy, error)

GetNamespaceIamPolicy gets an existing NamespaceIamPolicy resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewNamespaceIamPolicy

func NewNamespaceIamPolicy(ctx *pulumi.Context,
	name string, args *NamespaceIamPolicyArgs, opts ...pulumi.ResourceOption) (*NamespaceIamPolicy, error)

NewNamespaceIamPolicy registers a new resource with the given unique name, arguments, and options.

func (*NamespaceIamPolicy) ElementType added in v4.4.0

func (*NamespaceIamPolicy) ElementType() reflect.Type

func (*NamespaceIamPolicy) ToNamespaceIamPolicyOutput added in v4.4.0

func (i *NamespaceIamPolicy) ToNamespaceIamPolicyOutput() NamespaceIamPolicyOutput

func (*NamespaceIamPolicy) ToNamespaceIamPolicyOutputWithContext added in v4.4.0

func (i *NamespaceIamPolicy) ToNamespaceIamPolicyOutputWithContext(ctx context.Context) NamespaceIamPolicyOutput

func (*NamespaceIamPolicy) ToNamespaceIamPolicyPtrOutput added in v4.11.1

func (i *NamespaceIamPolicy) ToNamespaceIamPolicyPtrOutput() NamespaceIamPolicyPtrOutput

func (*NamespaceIamPolicy) ToNamespaceIamPolicyPtrOutputWithContext added in v4.11.1

func (i *NamespaceIamPolicy) ToNamespaceIamPolicyPtrOutputWithContext(ctx context.Context) NamespaceIamPolicyPtrOutput

type NamespaceIamPolicyArgs

type NamespaceIamPolicyArgs struct {
	// Used to find the parent resource to bind the IAM policy to
	Name pulumi.StringPtrInput
	// The policy data generated by
	// a `organizations.getIAMPolicy` data source.
	PolicyData pulumi.StringInput
}

The set of arguments for constructing a NamespaceIamPolicy resource.

func (NamespaceIamPolicyArgs) ElementType

func (NamespaceIamPolicyArgs) ElementType() reflect.Type

type NamespaceIamPolicyArray added in v4.11.1

type NamespaceIamPolicyArray []NamespaceIamPolicyInput

func (NamespaceIamPolicyArray) ElementType added in v4.11.1

func (NamespaceIamPolicyArray) ElementType() reflect.Type

func (NamespaceIamPolicyArray) ToNamespaceIamPolicyArrayOutput added in v4.11.1

func (i NamespaceIamPolicyArray) ToNamespaceIamPolicyArrayOutput() NamespaceIamPolicyArrayOutput

func (NamespaceIamPolicyArray) ToNamespaceIamPolicyArrayOutputWithContext added in v4.11.1

func (i NamespaceIamPolicyArray) ToNamespaceIamPolicyArrayOutputWithContext(ctx context.Context) NamespaceIamPolicyArrayOutput

type NamespaceIamPolicyArrayInput added in v4.11.1

type NamespaceIamPolicyArrayInput interface {
	pulumi.Input

	ToNamespaceIamPolicyArrayOutput() NamespaceIamPolicyArrayOutput
	ToNamespaceIamPolicyArrayOutputWithContext(context.Context) NamespaceIamPolicyArrayOutput
}

NamespaceIamPolicyArrayInput is an input type that accepts NamespaceIamPolicyArray and NamespaceIamPolicyArrayOutput values. You can construct a concrete instance of `NamespaceIamPolicyArrayInput` via:

NamespaceIamPolicyArray{ NamespaceIamPolicyArgs{...} }

type NamespaceIamPolicyArrayOutput added in v4.11.1

type NamespaceIamPolicyArrayOutput struct{ *pulumi.OutputState }

func (NamespaceIamPolicyArrayOutput) ElementType added in v4.11.1

func (NamespaceIamPolicyArrayOutput) Index added in v4.11.1

func (NamespaceIamPolicyArrayOutput) ToNamespaceIamPolicyArrayOutput added in v4.11.1

func (o NamespaceIamPolicyArrayOutput) ToNamespaceIamPolicyArrayOutput() NamespaceIamPolicyArrayOutput

func (NamespaceIamPolicyArrayOutput) ToNamespaceIamPolicyArrayOutputWithContext added in v4.11.1

func (o NamespaceIamPolicyArrayOutput) ToNamespaceIamPolicyArrayOutputWithContext(ctx context.Context) NamespaceIamPolicyArrayOutput

type NamespaceIamPolicyInput added in v4.4.0

type NamespaceIamPolicyInput interface {
	pulumi.Input

	ToNamespaceIamPolicyOutput() NamespaceIamPolicyOutput
	ToNamespaceIamPolicyOutputWithContext(ctx context.Context) NamespaceIamPolicyOutput
}

type NamespaceIamPolicyMap added in v4.11.1

type NamespaceIamPolicyMap map[string]NamespaceIamPolicyInput

func (NamespaceIamPolicyMap) ElementType added in v4.11.1

func (NamespaceIamPolicyMap) ElementType() reflect.Type

func (NamespaceIamPolicyMap) ToNamespaceIamPolicyMapOutput added in v4.11.1

func (i NamespaceIamPolicyMap) ToNamespaceIamPolicyMapOutput() NamespaceIamPolicyMapOutput

func (NamespaceIamPolicyMap) ToNamespaceIamPolicyMapOutputWithContext added in v4.11.1

func (i NamespaceIamPolicyMap) ToNamespaceIamPolicyMapOutputWithContext(ctx context.Context) NamespaceIamPolicyMapOutput

type NamespaceIamPolicyMapInput added in v4.11.1

type NamespaceIamPolicyMapInput interface {
	pulumi.Input

	ToNamespaceIamPolicyMapOutput() NamespaceIamPolicyMapOutput
	ToNamespaceIamPolicyMapOutputWithContext(context.Context) NamespaceIamPolicyMapOutput
}

NamespaceIamPolicyMapInput is an input type that accepts NamespaceIamPolicyMap and NamespaceIamPolicyMapOutput values. You can construct a concrete instance of `NamespaceIamPolicyMapInput` via:

NamespaceIamPolicyMap{ "key": NamespaceIamPolicyArgs{...} }

type NamespaceIamPolicyMapOutput added in v4.11.1

type NamespaceIamPolicyMapOutput struct{ *pulumi.OutputState }

func (NamespaceIamPolicyMapOutput) ElementType added in v4.11.1

func (NamespaceIamPolicyMapOutput) MapIndex added in v4.11.1

func (NamespaceIamPolicyMapOutput) ToNamespaceIamPolicyMapOutput added in v4.11.1

func (o NamespaceIamPolicyMapOutput) ToNamespaceIamPolicyMapOutput() NamespaceIamPolicyMapOutput

func (NamespaceIamPolicyMapOutput) ToNamespaceIamPolicyMapOutputWithContext added in v4.11.1

func (o NamespaceIamPolicyMapOutput) ToNamespaceIamPolicyMapOutputWithContext(ctx context.Context) NamespaceIamPolicyMapOutput

type NamespaceIamPolicyOutput added in v4.4.0

type NamespaceIamPolicyOutput struct {
	*pulumi.OutputState
}

func (NamespaceIamPolicyOutput) ElementType added in v4.4.0

func (NamespaceIamPolicyOutput) ElementType() reflect.Type

func (NamespaceIamPolicyOutput) ToNamespaceIamPolicyOutput added in v4.4.0

func (o NamespaceIamPolicyOutput) ToNamespaceIamPolicyOutput() NamespaceIamPolicyOutput

func (NamespaceIamPolicyOutput) ToNamespaceIamPolicyOutputWithContext added in v4.4.0

func (o NamespaceIamPolicyOutput) ToNamespaceIamPolicyOutputWithContext(ctx context.Context) NamespaceIamPolicyOutput

func (NamespaceIamPolicyOutput) ToNamespaceIamPolicyPtrOutput added in v4.11.1

func (o NamespaceIamPolicyOutput) ToNamespaceIamPolicyPtrOutput() NamespaceIamPolicyPtrOutput

func (NamespaceIamPolicyOutput) ToNamespaceIamPolicyPtrOutputWithContext added in v4.11.1

func (o NamespaceIamPolicyOutput) ToNamespaceIamPolicyPtrOutputWithContext(ctx context.Context) NamespaceIamPolicyPtrOutput

type NamespaceIamPolicyPtrInput added in v4.11.1

type NamespaceIamPolicyPtrInput interface {
	pulumi.Input

	ToNamespaceIamPolicyPtrOutput() NamespaceIamPolicyPtrOutput
	ToNamespaceIamPolicyPtrOutputWithContext(ctx context.Context) NamespaceIamPolicyPtrOutput
}

type NamespaceIamPolicyPtrOutput added in v4.11.1

type NamespaceIamPolicyPtrOutput struct {
	*pulumi.OutputState
}

func (NamespaceIamPolicyPtrOutput) ElementType added in v4.11.1

func (NamespaceIamPolicyPtrOutput) ToNamespaceIamPolicyPtrOutput added in v4.11.1

func (o NamespaceIamPolicyPtrOutput) ToNamespaceIamPolicyPtrOutput() NamespaceIamPolicyPtrOutput

func (NamespaceIamPolicyPtrOutput) ToNamespaceIamPolicyPtrOutputWithContext added in v4.11.1

func (o NamespaceIamPolicyPtrOutput) ToNamespaceIamPolicyPtrOutputWithContext(ctx context.Context) NamespaceIamPolicyPtrOutput

type NamespaceIamPolicyState

type NamespaceIamPolicyState struct {
	// (Computed) The etag of the IAM policy.
	Etag pulumi.StringPtrInput
	// Used to find the parent resource to bind the IAM policy to
	Name pulumi.StringPtrInput
	// The policy data generated by
	// a `organizations.getIAMPolicy` data source.
	PolicyData pulumi.StringPtrInput
}

func (NamespaceIamPolicyState) ElementType

func (NamespaceIamPolicyState) ElementType() reflect.Type

type NamespaceInput added in v4.4.0

type NamespaceInput interface {
	pulumi.Input

	ToNamespaceOutput() NamespaceOutput
	ToNamespaceOutputWithContext(ctx context.Context) NamespaceOutput
}

type NamespaceMap added in v4.11.1

type NamespaceMap map[string]NamespaceInput

func (NamespaceMap) ElementType added in v4.11.1

func (NamespaceMap) ElementType() reflect.Type

func (NamespaceMap) ToNamespaceMapOutput added in v4.11.1

func (i NamespaceMap) ToNamespaceMapOutput() NamespaceMapOutput

func (NamespaceMap) ToNamespaceMapOutputWithContext added in v4.11.1

func (i NamespaceMap) ToNamespaceMapOutputWithContext(ctx context.Context) NamespaceMapOutput

type NamespaceMapInput added in v4.11.1

type NamespaceMapInput interface {
	pulumi.Input

	ToNamespaceMapOutput() NamespaceMapOutput
	ToNamespaceMapOutputWithContext(context.Context) NamespaceMapOutput
}

NamespaceMapInput is an input type that accepts NamespaceMap and NamespaceMapOutput values. You can construct a concrete instance of `NamespaceMapInput` via:

NamespaceMap{ "key": NamespaceArgs{...} }

type NamespaceMapOutput added in v4.11.1

type NamespaceMapOutput struct{ *pulumi.OutputState }

func (NamespaceMapOutput) ElementType added in v4.11.1

func (NamespaceMapOutput) ElementType() reflect.Type

func (NamespaceMapOutput) MapIndex added in v4.11.1

func (NamespaceMapOutput) ToNamespaceMapOutput added in v4.11.1

func (o NamespaceMapOutput) ToNamespaceMapOutput() NamespaceMapOutput

func (NamespaceMapOutput) ToNamespaceMapOutputWithContext added in v4.11.1

func (o NamespaceMapOutput) ToNamespaceMapOutputWithContext(ctx context.Context) NamespaceMapOutput

type NamespaceOutput added in v4.4.0

type NamespaceOutput struct {
	*pulumi.OutputState
}

func (NamespaceOutput) ElementType added in v4.4.0

func (NamespaceOutput) ElementType() reflect.Type

func (NamespaceOutput) ToNamespaceOutput added in v4.4.0

func (o NamespaceOutput) ToNamespaceOutput() NamespaceOutput

func (NamespaceOutput) ToNamespaceOutputWithContext added in v4.4.0

func (o NamespaceOutput) ToNamespaceOutputWithContext(ctx context.Context) NamespaceOutput

func (NamespaceOutput) ToNamespacePtrOutput added in v4.11.1

func (o NamespaceOutput) ToNamespacePtrOutput() NamespacePtrOutput

func (NamespaceOutput) ToNamespacePtrOutputWithContext added in v4.11.1

func (o NamespaceOutput) ToNamespacePtrOutputWithContext(ctx context.Context) NamespacePtrOutput

type NamespacePtrInput added in v4.11.1

type NamespacePtrInput interface {
	pulumi.Input

	ToNamespacePtrOutput() NamespacePtrOutput
	ToNamespacePtrOutputWithContext(ctx context.Context) NamespacePtrOutput
}

type NamespacePtrOutput added in v4.11.1

type NamespacePtrOutput struct {
	*pulumi.OutputState
}

func (NamespacePtrOutput) ElementType added in v4.11.1

func (NamespacePtrOutput) ElementType() reflect.Type

func (NamespacePtrOutput) ToNamespacePtrOutput added in v4.11.1

func (o NamespacePtrOutput) ToNamespacePtrOutput() NamespacePtrOutput

func (NamespacePtrOutput) ToNamespacePtrOutputWithContext added in v4.11.1

func (o NamespacePtrOutput) ToNamespacePtrOutputWithContext(ctx context.Context) NamespacePtrOutput

type NamespaceState

type NamespaceState struct {
	// 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.
	Labels pulumi.StringMapInput
	// The location for the Namespace.
	// A full list of valid locations can be found by running
	// `gcloud beta service-directory locations list`.
	Location pulumi.StringPtrInput
	// The resource name for the namespace in the format 'projects/*/locations/*/namespaces/*'.
	Name pulumi.StringPtrInput
	// The Resource ID must be 1-63 characters long, including digits,
	// lowercase letters or the hyphen character.
	NamespaceId pulumi.StringPtrInput
	// The ID of the project in which the resource belongs.
	// If it is not provided, the provider project is used.
	Project pulumi.StringPtrInput
}

func (NamespaceState) ElementType

func (NamespaceState) ElementType() reflect.Type

type Service

type Service struct {
	pulumi.CustomResourceState

	// Metadata for the service. This data can be consumed
	// by service clients. The entire metadata dictionary may contain
	// up to 2000 characters, spread across all key-value pairs.
	// Metadata that goes beyond any these limits will be rejected.
	Metadata pulumi.StringMapOutput `pulumi:"metadata"`
	// The resource name for the service in the format 'projects/*/locations/*/namespaces/*/services/*'.
	Name pulumi.StringOutput `pulumi:"name"`
	// The resource name of the namespace this service will belong to.
	Namespace pulumi.StringOutput `pulumi:"namespace"`
	// The Resource ID must be 1-63 characters long, including digits,
	// lowercase letters or the hyphen character.
	ServiceId pulumi.StringOutput `pulumi:"serviceId"`
}

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

To get more information about Service, see:

* [API documentation](https://cloud.google.com/service-directory/docs/reference/rest/v1beta1/projects.locations.namespaces.services) * How-to Guides

## Example Usage ### Service Directory Service Basic

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleNamespace, err := servicedirectory.NewNamespace(ctx, "exampleNamespace", &servicedirectory.NamespaceArgs{
			NamespaceId: pulumi.String("example-namespace"),
			Location:    pulumi.String("us-central1"),
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		_, err = servicedirectory.NewService(ctx, "exampleService", &servicedirectory.ServiceArgs{
			ServiceId: pulumi.String("example-service"),
			Namespace: exampleNamespace.ID(),
			Metadata: pulumi.StringMap{
				"stage":  pulumi.String("prod"),
				"region": pulumi.String("us-central1"),
			},
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Service can be imported using any of these accepted formats

```sh

$ pulumi import gcp:servicedirectory/service:Service default projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}}/services/{{service_id}}

```

```sh

$ pulumi import gcp:servicedirectory/service:Service default {{project}}/{{location}}/{{namespace_id}}/{{service_id}}

```

```sh

$ pulumi import gcp:servicedirectory/service:Service default {{location}}/{{namespace_id}}/{{service_id}}

```

func GetService

func GetService(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ServiceState, opts ...pulumi.ResourceOption) (*Service, error)

GetService gets an existing Service resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewService

func NewService(ctx *pulumi.Context,
	name string, args *ServiceArgs, opts ...pulumi.ResourceOption) (*Service, error)

NewService registers a new resource with the given unique name, arguments, and options.

func (*Service) ElementType added in v4.4.0

func (*Service) ElementType() reflect.Type

func (*Service) ToServiceOutput added in v4.4.0

func (i *Service) ToServiceOutput() ServiceOutput

func (*Service) ToServiceOutputWithContext added in v4.4.0

func (i *Service) ToServiceOutputWithContext(ctx context.Context) ServiceOutput

func (*Service) ToServicePtrOutput added in v4.11.1

func (i *Service) ToServicePtrOutput() ServicePtrOutput

func (*Service) ToServicePtrOutputWithContext added in v4.11.1

func (i *Service) ToServicePtrOutputWithContext(ctx context.Context) ServicePtrOutput

type ServiceArgs

type ServiceArgs struct {
	// Metadata for the service. This data can be consumed
	// by service clients. The entire metadata dictionary may contain
	// up to 2000 characters, spread across all key-value pairs.
	// Metadata that goes beyond any these limits will be rejected.
	Metadata pulumi.StringMapInput
	// The resource name of the namespace this service will belong to.
	Namespace pulumi.StringInput
	// The Resource ID must be 1-63 characters long, including digits,
	// lowercase letters or the hyphen character.
	ServiceId pulumi.StringInput
}

The set of arguments for constructing a Service resource.

func (ServiceArgs) ElementType

func (ServiceArgs) ElementType() reflect.Type

type ServiceArray added in v4.11.1

type ServiceArray []ServiceInput

func (ServiceArray) ElementType added in v4.11.1

func (ServiceArray) ElementType() reflect.Type

func (ServiceArray) ToServiceArrayOutput added in v4.11.1

func (i ServiceArray) ToServiceArrayOutput() ServiceArrayOutput

func (ServiceArray) ToServiceArrayOutputWithContext added in v4.11.1

func (i ServiceArray) ToServiceArrayOutputWithContext(ctx context.Context) ServiceArrayOutput

type ServiceArrayInput added in v4.11.1

type ServiceArrayInput interface {
	pulumi.Input

	ToServiceArrayOutput() ServiceArrayOutput
	ToServiceArrayOutputWithContext(context.Context) ServiceArrayOutput
}

ServiceArrayInput is an input type that accepts ServiceArray and ServiceArrayOutput values. You can construct a concrete instance of `ServiceArrayInput` via:

ServiceArray{ ServiceArgs{...} }

type ServiceArrayOutput added in v4.11.1

type ServiceArrayOutput struct{ *pulumi.OutputState }

func (ServiceArrayOutput) ElementType added in v4.11.1

func (ServiceArrayOutput) ElementType() reflect.Type

func (ServiceArrayOutput) Index added in v4.11.1

func (ServiceArrayOutput) ToServiceArrayOutput added in v4.11.1

func (o ServiceArrayOutput) ToServiceArrayOutput() ServiceArrayOutput

func (ServiceArrayOutput) ToServiceArrayOutputWithContext added in v4.11.1

func (o ServiceArrayOutput) ToServiceArrayOutputWithContext(ctx context.Context) ServiceArrayOutput

type ServiceIamBinding

type ServiceIamBinding struct {
	pulumi.CustomResourceState

	Condition ServiceIamBindingConditionPtrOutput `pulumi:"condition"`
	// (Computed) The etag of the IAM policy.
	Etag    pulumi.StringOutput      `pulumi:"etag"`
	Members pulumi.StringArrayOutput `pulumi:"members"`
	// Used to find the parent resource to bind the IAM policy to
	Name pulumi.StringOutput `pulumi:"name"`
	// The role that should be applied. Only one
	// `servicedirectory.ServiceIamBinding` can be used per role. Note that custom roles must be of the format
	// `[projects|organizations]/{parent-name}/roles/{role-name}`.
	Role pulumi.StringOutput `pulumi:"role"`
}

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

* `servicedirectory.ServiceIamPolicy`: Authoritative. Sets the IAM policy for the service and replaces any existing policy already attached. * `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. * `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:** `servicedirectory.ServiceIamPolicy` **cannot** be used in conjunction with `servicedirectory.ServiceIamBinding` and `servicedirectory.ServiceIamMember` or they will fight over what your policy should be.

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

## google\_service\_directory\_service\_iam\_policy

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		admin, err := organizations.LookupIAMPolicy(ctx, &organizations.LookupIAMPolicyArgs{
			Bindings: []organizations.GetIAMPolicyBinding{
				organizations.GetIAMPolicyBinding{
					Role: "roles/viewer",
					Members: []string{
						"user:jane@example.com",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		_, err = servicedirectory.NewServiceIamPolicy(ctx, "policy", &servicedirectory.ServiceIamPolicyArgs{
			PolicyData: pulumi.String(admin.PolicyData),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## google\_service\_directory\_service\_iam\_binding

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := servicedirectory.NewServiceIamBinding(ctx, "binding", &servicedirectory.ServiceIamBindingArgs{
			Role: pulumi.String("roles/viewer"),
			Members: pulumi.StringArray{
				pulumi.String("user:jane@example.com"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## google\_service\_directory\_service\_iam\_member

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := servicedirectory.NewServiceIamMember(ctx, "member", &servicedirectory.ServiceIamMemberArgs{
			Role:   pulumi.String("roles/viewer"),
			Member: pulumi.String("user:jane@example.com"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

For all import syntaxes, the "resource in question" can take any of the following forms* projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}}/services/{{service_id}} * {{project}}/{{location}}/{{namespace_id}}/{{service_id}} * {{location}}/{{namespace_id}}/{{service_id}} Any variables not passed in the import command will be taken from the provider configuration. Service Directory service IAM resources can be imported using the resource identifiers, role, and member. IAM member imports use space-delimited identifiersthe resource in question, the role, and the member identity, e.g.

```sh

$ pulumi import gcp:servicedirectory/serviceIamBinding:ServiceIamBinding editor "projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}}/services/{{service_id}} roles/viewer user:jane@example.com"

```

IAM binding imports use space-delimited identifiersthe resource in question and the role, e.g.

```sh

$ pulumi import gcp:servicedirectory/serviceIamBinding:ServiceIamBinding editor "projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}}/services/{{service_id}} roles/viewer"

```

IAM policy imports use the identifier of the resource in question, e.g.

```sh

$ pulumi import gcp:servicedirectory/serviceIamBinding:ServiceIamBinding editor projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}}/services/{{service_id}}

```

-> **Custom Roles**If you're importing a IAM resource with a custom role, make sure to use the

full name of the custom role, e.g. `[projects/my-project|organizations/my-org]/roles/my-custom-role`.

func GetServiceIamBinding

func GetServiceIamBinding(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ServiceIamBindingState, opts ...pulumi.ResourceOption) (*ServiceIamBinding, error)

GetServiceIamBinding gets an existing ServiceIamBinding resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewServiceIamBinding

func NewServiceIamBinding(ctx *pulumi.Context,
	name string, args *ServiceIamBindingArgs, opts ...pulumi.ResourceOption) (*ServiceIamBinding, error)

NewServiceIamBinding registers a new resource with the given unique name, arguments, and options.

func (*ServiceIamBinding) ElementType added in v4.4.0

func (*ServiceIamBinding) ElementType() reflect.Type

func (*ServiceIamBinding) ToServiceIamBindingOutput added in v4.4.0

func (i *ServiceIamBinding) ToServiceIamBindingOutput() ServiceIamBindingOutput

func (*ServiceIamBinding) ToServiceIamBindingOutputWithContext added in v4.4.0

func (i *ServiceIamBinding) ToServiceIamBindingOutputWithContext(ctx context.Context) ServiceIamBindingOutput

func (*ServiceIamBinding) ToServiceIamBindingPtrOutput added in v4.11.1

func (i *ServiceIamBinding) ToServiceIamBindingPtrOutput() ServiceIamBindingPtrOutput

func (*ServiceIamBinding) ToServiceIamBindingPtrOutputWithContext added in v4.11.1

func (i *ServiceIamBinding) ToServiceIamBindingPtrOutputWithContext(ctx context.Context) ServiceIamBindingPtrOutput

type ServiceIamBindingArgs

type ServiceIamBindingArgs struct {
	Condition ServiceIamBindingConditionPtrInput
	Members   pulumi.StringArrayInput
	// Used to find the parent resource to bind the IAM policy to
	Name pulumi.StringPtrInput
	// The role that should be applied. Only one
	// `servicedirectory.ServiceIamBinding` can be used per role. Note that custom roles must be of the format
	// `[projects|organizations]/{parent-name}/roles/{role-name}`.
	Role pulumi.StringInput
}

The set of arguments for constructing a ServiceIamBinding resource.

func (ServiceIamBindingArgs) ElementType

func (ServiceIamBindingArgs) ElementType() reflect.Type

type ServiceIamBindingArray added in v4.11.1

type ServiceIamBindingArray []ServiceIamBindingInput

func (ServiceIamBindingArray) ElementType added in v4.11.1

func (ServiceIamBindingArray) ElementType() reflect.Type

func (ServiceIamBindingArray) ToServiceIamBindingArrayOutput added in v4.11.1

func (i ServiceIamBindingArray) ToServiceIamBindingArrayOutput() ServiceIamBindingArrayOutput

func (ServiceIamBindingArray) ToServiceIamBindingArrayOutputWithContext added in v4.11.1

func (i ServiceIamBindingArray) ToServiceIamBindingArrayOutputWithContext(ctx context.Context) ServiceIamBindingArrayOutput

type ServiceIamBindingArrayInput added in v4.11.1

type ServiceIamBindingArrayInput interface {
	pulumi.Input

	ToServiceIamBindingArrayOutput() ServiceIamBindingArrayOutput
	ToServiceIamBindingArrayOutputWithContext(context.Context) ServiceIamBindingArrayOutput
}

ServiceIamBindingArrayInput is an input type that accepts ServiceIamBindingArray and ServiceIamBindingArrayOutput values. You can construct a concrete instance of `ServiceIamBindingArrayInput` via:

ServiceIamBindingArray{ ServiceIamBindingArgs{...} }

type ServiceIamBindingArrayOutput added in v4.11.1

type ServiceIamBindingArrayOutput struct{ *pulumi.OutputState }

func (ServiceIamBindingArrayOutput) ElementType added in v4.11.1

func (ServiceIamBindingArrayOutput) Index added in v4.11.1

func (ServiceIamBindingArrayOutput) ToServiceIamBindingArrayOutput added in v4.11.1

func (o ServiceIamBindingArrayOutput) ToServiceIamBindingArrayOutput() ServiceIamBindingArrayOutput

func (ServiceIamBindingArrayOutput) ToServiceIamBindingArrayOutputWithContext added in v4.11.1

func (o ServiceIamBindingArrayOutput) ToServiceIamBindingArrayOutputWithContext(ctx context.Context) ServiceIamBindingArrayOutput

type ServiceIamBindingCondition

type ServiceIamBindingCondition struct {
	Description *string `pulumi:"description"`
	Expression  string  `pulumi:"expression"`
	Title       string  `pulumi:"title"`
}

type ServiceIamBindingConditionArgs

type ServiceIamBindingConditionArgs struct {
	Description pulumi.StringPtrInput `pulumi:"description"`
	Expression  pulumi.StringInput    `pulumi:"expression"`
	Title       pulumi.StringInput    `pulumi:"title"`
}

func (ServiceIamBindingConditionArgs) ElementType

func (ServiceIamBindingConditionArgs) ToServiceIamBindingConditionOutput

func (i ServiceIamBindingConditionArgs) ToServiceIamBindingConditionOutput() ServiceIamBindingConditionOutput

func (ServiceIamBindingConditionArgs) ToServiceIamBindingConditionOutputWithContext

func (i ServiceIamBindingConditionArgs) ToServiceIamBindingConditionOutputWithContext(ctx context.Context) ServiceIamBindingConditionOutput

func (ServiceIamBindingConditionArgs) ToServiceIamBindingConditionPtrOutput

func (i ServiceIamBindingConditionArgs) ToServiceIamBindingConditionPtrOutput() ServiceIamBindingConditionPtrOutput

func (ServiceIamBindingConditionArgs) ToServiceIamBindingConditionPtrOutputWithContext

func (i ServiceIamBindingConditionArgs) ToServiceIamBindingConditionPtrOutputWithContext(ctx context.Context) ServiceIamBindingConditionPtrOutput

type ServiceIamBindingConditionInput

type ServiceIamBindingConditionInput interface {
	pulumi.Input

	ToServiceIamBindingConditionOutput() ServiceIamBindingConditionOutput
	ToServiceIamBindingConditionOutputWithContext(context.Context) ServiceIamBindingConditionOutput
}

ServiceIamBindingConditionInput is an input type that accepts ServiceIamBindingConditionArgs and ServiceIamBindingConditionOutput values. You can construct a concrete instance of `ServiceIamBindingConditionInput` via:

ServiceIamBindingConditionArgs{...}

type ServiceIamBindingConditionOutput

type ServiceIamBindingConditionOutput struct{ *pulumi.OutputState }

func (ServiceIamBindingConditionOutput) Description

func (ServiceIamBindingConditionOutput) ElementType

func (ServiceIamBindingConditionOutput) Expression

func (ServiceIamBindingConditionOutput) Title

func (ServiceIamBindingConditionOutput) ToServiceIamBindingConditionOutput

func (o ServiceIamBindingConditionOutput) ToServiceIamBindingConditionOutput() ServiceIamBindingConditionOutput

func (ServiceIamBindingConditionOutput) ToServiceIamBindingConditionOutputWithContext

func (o ServiceIamBindingConditionOutput) ToServiceIamBindingConditionOutputWithContext(ctx context.Context) ServiceIamBindingConditionOutput

func (ServiceIamBindingConditionOutput) ToServiceIamBindingConditionPtrOutput

func (o ServiceIamBindingConditionOutput) ToServiceIamBindingConditionPtrOutput() ServiceIamBindingConditionPtrOutput

func (ServiceIamBindingConditionOutput) ToServiceIamBindingConditionPtrOutputWithContext

func (o ServiceIamBindingConditionOutput) ToServiceIamBindingConditionPtrOutputWithContext(ctx context.Context) ServiceIamBindingConditionPtrOutput

type ServiceIamBindingConditionPtrInput

type ServiceIamBindingConditionPtrInput interface {
	pulumi.Input

	ToServiceIamBindingConditionPtrOutput() ServiceIamBindingConditionPtrOutput
	ToServiceIamBindingConditionPtrOutputWithContext(context.Context) ServiceIamBindingConditionPtrOutput
}

ServiceIamBindingConditionPtrInput is an input type that accepts ServiceIamBindingConditionArgs, ServiceIamBindingConditionPtr and ServiceIamBindingConditionPtrOutput values. You can construct a concrete instance of `ServiceIamBindingConditionPtrInput` via:

        ServiceIamBindingConditionArgs{...}

or:

        nil

type ServiceIamBindingConditionPtrOutput

type ServiceIamBindingConditionPtrOutput struct{ *pulumi.OutputState }

func (ServiceIamBindingConditionPtrOutput) Description

func (ServiceIamBindingConditionPtrOutput) Elem

func (ServiceIamBindingConditionPtrOutput) ElementType

func (ServiceIamBindingConditionPtrOutput) Expression

func (ServiceIamBindingConditionPtrOutput) Title

func (ServiceIamBindingConditionPtrOutput) ToServiceIamBindingConditionPtrOutput

func (o ServiceIamBindingConditionPtrOutput) ToServiceIamBindingConditionPtrOutput() ServiceIamBindingConditionPtrOutput

func (ServiceIamBindingConditionPtrOutput) ToServiceIamBindingConditionPtrOutputWithContext

func (o ServiceIamBindingConditionPtrOutput) ToServiceIamBindingConditionPtrOutputWithContext(ctx context.Context) ServiceIamBindingConditionPtrOutput

type ServiceIamBindingInput added in v4.4.0

type ServiceIamBindingInput interface {
	pulumi.Input

	ToServiceIamBindingOutput() ServiceIamBindingOutput
	ToServiceIamBindingOutputWithContext(ctx context.Context) ServiceIamBindingOutput
}

type ServiceIamBindingMap added in v4.11.1

type ServiceIamBindingMap map[string]ServiceIamBindingInput

func (ServiceIamBindingMap) ElementType added in v4.11.1

func (ServiceIamBindingMap) ElementType() reflect.Type

func (ServiceIamBindingMap) ToServiceIamBindingMapOutput added in v4.11.1

func (i ServiceIamBindingMap) ToServiceIamBindingMapOutput() ServiceIamBindingMapOutput

func (ServiceIamBindingMap) ToServiceIamBindingMapOutputWithContext added in v4.11.1

func (i ServiceIamBindingMap) ToServiceIamBindingMapOutputWithContext(ctx context.Context) ServiceIamBindingMapOutput

type ServiceIamBindingMapInput added in v4.11.1

type ServiceIamBindingMapInput interface {
	pulumi.Input

	ToServiceIamBindingMapOutput() ServiceIamBindingMapOutput
	ToServiceIamBindingMapOutputWithContext(context.Context) ServiceIamBindingMapOutput
}

ServiceIamBindingMapInput is an input type that accepts ServiceIamBindingMap and ServiceIamBindingMapOutput values. You can construct a concrete instance of `ServiceIamBindingMapInput` via:

ServiceIamBindingMap{ "key": ServiceIamBindingArgs{...} }

type ServiceIamBindingMapOutput added in v4.11.1

type ServiceIamBindingMapOutput struct{ *pulumi.OutputState }

func (ServiceIamBindingMapOutput) ElementType added in v4.11.1

func (ServiceIamBindingMapOutput) ElementType() reflect.Type

func (ServiceIamBindingMapOutput) MapIndex added in v4.11.1

func (ServiceIamBindingMapOutput) ToServiceIamBindingMapOutput added in v4.11.1

func (o ServiceIamBindingMapOutput) ToServiceIamBindingMapOutput() ServiceIamBindingMapOutput

func (ServiceIamBindingMapOutput) ToServiceIamBindingMapOutputWithContext added in v4.11.1

func (o ServiceIamBindingMapOutput) ToServiceIamBindingMapOutputWithContext(ctx context.Context) ServiceIamBindingMapOutput

type ServiceIamBindingOutput added in v4.4.0

type ServiceIamBindingOutput struct {
	*pulumi.OutputState
}

func (ServiceIamBindingOutput) ElementType added in v4.4.0

func (ServiceIamBindingOutput) ElementType() reflect.Type

func (ServiceIamBindingOutput) ToServiceIamBindingOutput added in v4.4.0

func (o ServiceIamBindingOutput) ToServiceIamBindingOutput() ServiceIamBindingOutput

func (ServiceIamBindingOutput) ToServiceIamBindingOutputWithContext added in v4.4.0

func (o ServiceIamBindingOutput) ToServiceIamBindingOutputWithContext(ctx context.Context) ServiceIamBindingOutput

func (ServiceIamBindingOutput) ToServiceIamBindingPtrOutput added in v4.11.1

func (o ServiceIamBindingOutput) ToServiceIamBindingPtrOutput() ServiceIamBindingPtrOutput

func (ServiceIamBindingOutput) ToServiceIamBindingPtrOutputWithContext added in v4.11.1

func (o ServiceIamBindingOutput) ToServiceIamBindingPtrOutputWithContext(ctx context.Context) ServiceIamBindingPtrOutput

type ServiceIamBindingPtrInput added in v4.11.1

type ServiceIamBindingPtrInput interface {
	pulumi.Input

	ToServiceIamBindingPtrOutput() ServiceIamBindingPtrOutput
	ToServiceIamBindingPtrOutputWithContext(ctx context.Context) ServiceIamBindingPtrOutput
}

type ServiceIamBindingPtrOutput added in v4.11.1

type ServiceIamBindingPtrOutput struct {
	*pulumi.OutputState
}

func (ServiceIamBindingPtrOutput) ElementType added in v4.11.1

func (ServiceIamBindingPtrOutput) ElementType() reflect.Type

func (ServiceIamBindingPtrOutput) ToServiceIamBindingPtrOutput added in v4.11.1

func (o ServiceIamBindingPtrOutput) ToServiceIamBindingPtrOutput() ServiceIamBindingPtrOutput

func (ServiceIamBindingPtrOutput) ToServiceIamBindingPtrOutputWithContext added in v4.11.1

func (o ServiceIamBindingPtrOutput) ToServiceIamBindingPtrOutputWithContext(ctx context.Context) ServiceIamBindingPtrOutput

type ServiceIamBindingState

type ServiceIamBindingState struct {
	Condition ServiceIamBindingConditionPtrInput
	// (Computed) The etag of the IAM policy.
	Etag    pulumi.StringPtrInput
	Members pulumi.StringArrayInput
	// Used to find the parent resource to bind the IAM policy to
	Name pulumi.StringPtrInput
	// The role that should be applied. Only one
	// `servicedirectory.ServiceIamBinding` can be used per role. Note that custom roles must be of the format
	// `[projects|organizations]/{parent-name}/roles/{role-name}`.
	Role pulumi.StringPtrInput
}

func (ServiceIamBindingState) ElementType

func (ServiceIamBindingState) ElementType() reflect.Type

type ServiceIamMember

type ServiceIamMember struct {
	pulumi.CustomResourceState

	Condition ServiceIamMemberConditionPtrOutput `pulumi:"condition"`
	// (Computed) The etag of the IAM policy.
	Etag   pulumi.StringOutput `pulumi:"etag"`
	Member pulumi.StringOutput `pulumi:"member"`
	// Used to find the parent resource to bind the IAM policy to
	Name pulumi.StringOutput `pulumi:"name"`
	// The role that should be applied. Only one
	// `servicedirectory.ServiceIamBinding` can be used per role. Note that custom roles must be of the format
	// `[projects|organizations]/{parent-name}/roles/{role-name}`.
	Role pulumi.StringOutput `pulumi:"role"`
}

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

* `servicedirectory.ServiceIamPolicy`: Authoritative. Sets the IAM policy for the service and replaces any existing policy already attached. * `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. * `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:** `servicedirectory.ServiceIamPolicy` **cannot** be used in conjunction with `servicedirectory.ServiceIamBinding` and `servicedirectory.ServiceIamMember` or they will fight over what your policy should be.

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

## google\_service\_directory\_service\_iam\_policy

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		admin, err := organizations.LookupIAMPolicy(ctx, &organizations.LookupIAMPolicyArgs{
			Bindings: []organizations.GetIAMPolicyBinding{
				organizations.GetIAMPolicyBinding{
					Role: "roles/viewer",
					Members: []string{
						"user:jane@example.com",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		_, err = servicedirectory.NewServiceIamPolicy(ctx, "policy", &servicedirectory.ServiceIamPolicyArgs{
			PolicyData: pulumi.String(admin.PolicyData),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## google\_service\_directory\_service\_iam\_binding

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := servicedirectory.NewServiceIamBinding(ctx, "binding", &servicedirectory.ServiceIamBindingArgs{
			Role: pulumi.String("roles/viewer"),
			Members: pulumi.StringArray{
				pulumi.String("user:jane@example.com"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## google\_service\_directory\_service\_iam\_member

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := servicedirectory.NewServiceIamMember(ctx, "member", &servicedirectory.ServiceIamMemberArgs{
			Role:   pulumi.String("roles/viewer"),
			Member: pulumi.String("user:jane@example.com"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

For all import syntaxes, the "resource in question" can take any of the following forms* projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}}/services/{{service_id}} * {{project}}/{{location}}/{{namespace_id}}/{{service_id}} * {{location}}/{{namespace_id}}/{{service_id}} Any variables not passed in the import command will be taken from the provider configuration. Service Directory service IAM resources can be imported using the resource identifiers, role, and member. IAM member imports use space-delimited identifiersthe resource in question, the role, and the member identity, e.g.

```sh

$ pulumi import gcp:servicedirectory/serviceIamMember:ServiceIamMember editor "projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}}/services/{{service_id}} roles/viewer user:jane@example.com"

```

IAM binding imports use space-delimited identifiersthe resource in question and the role, e.g.

```sh

$ pulumi import gcp:servicedirectory/serviceIamMember:ServiceIamMember editor "projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}}/services/{{service_id}} roles/viewer"

```

IAM policy imports use the identifier of the resource in question, e.g.

```sh

$ pulumi import gcp:servicedirectory/serviceIamMember:ServiceIamMember editor projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}}/services/{{service_id}}

```

-> **Custom Roles**If you're importing a IAM resource with a custom role, make sure to use the

full name of the custom role, e.g. `[projects/my-project|organizations/my-org]/roles/my-custom-role`.

func GetServiceIamMember

func GetServiceIamMember(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ServiceIamMemberState, opts ...pulumi.ResourceOption) (*ServiceIamMember, error)

GetServiceIamMember gets an existing ServiceIamMember resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewServiceIamMember

func NewServiceIamMember(ctx *pulumi.Context,
	name string, args *ServiceIamMemberArgs, opts ...pulumi.ResourceOption) (*ServiceIamMember, error)

NewServiceIamMember registers a new resource with the given unique name, arguments, and options.

func (*ServiceIamMember) ElementType added in v4.4.0

func (*ServiceIamMember) ElementType() reflect.Type

func (*ServiceIamMember) ToServiceIamMemberOutput added in v4.4.0

func (i *ServiceIamMember) ToServiceIamMemberOutput() ServiceIamMemberOutput

func (*ServiceIamMember) ToServiceIamMemberOutputWithContext added in v4.4.0

func (i *ServiceIamMember) ToServiceIamMemberOutputWithContext(ctx context.Context) ServiceIamMemberOutput

func (*ServiceIamMember) ToServiceIamMemberPtrOutput added in v4.11.1

func (i *ServiceIamMember) ToServiceIamMemberPtrOutput() ServiceIamMemberPtrOutput

func (*ServiceIamMember) ToServiceIamMemberPtrOutputWithContext added in v4.11.1

func (i *ServiceIamMember) ToServiceIamMemberPtrOutputWithContext(ctx context.Context) ServiceIamMemberPtrOutput

type ServiceIamMemberArgs

type ServiceIamMemberArgs struct {
	Condition ServiceIamMemberConditionPtrInput
	Member    pulumi.StringInput
	// Used to find the parent resource to bind the IAM policy to
	Name pulumi.StringPtrInput
	// The role that should be applied. Only one
	// `servicedirectory.ServiceIamBinding` can be used per role. Note that custom roles must be of the format
	// `[projects|organizations]/{parent-name}/roles/{role-name}`.
	Role pulumi.StringInput
}

The set of arguments for constructing a ServiceIamMember resource.

func (ServiceIamMemberArgs) ElementType

func (ServiceIamMemberArgs) ElementType() reflect.Type

type ServiceIamMemberArray added in v4.11.1

type ServiceIamMemberArray []ServiceIamMemberInput

func (ServiceIamMemberArray) ElementType added in v4.11.1

func (ServiceIamMemberArray) ElementType() reflect.Type

func (ServiceIamMemberArray) ToServiceIamMemberArrayOutput added in v4.11.1

func (i ServiceIamMemberArray) ToServiceIamMemberArrayOutput() ServiceIamMemberArrayOutput

func (ServiceIamMemberArray) ToServiceIamMemberArrayOutputWithContext added in v4.11.1

func (i ServiceIamMemberArray) ToServiceIamMemberArrayOutputWithContext(ctx context.Context) ServiceIamMemberArrayOutput

type ServiceIamMemberArrayInput added in v4.11.1

type ServiceIamMemberArrayInput interface {
	pulumi.Input

	ToServiceIamMemberArrayOutput() ServiceIamMemberArrayOutput
	ToServiceIamMemberArrayOutputWithContext(context.Context) ServiceIamMemberArrayOutput
}

ServiceIamMemberArrayInput is an input type that accepts ServiceIamMemberArray and ServiceIamMemberArrayOutput values. You can construct a concrete instance of `ServiceIamMemberArrayInput` via:

ServiceIamMemberArray{ ServiceIamMemberArgs{...} }

type ServiceIamMemberArrayOutput added in v4.11.1

type ServiceIamMemberArrayOutput struct{ *pulumi.OutputState }

func (ServiceIamMemberArrayOutput) ElementType added in v4.11.1

func (ServiceIamMemberArrayOutput) Index added in v4.11.1

func (ServiceIamMemberArrayOutput) ToServiceIamMemberArrayOutput added in v4.11.1

func (o ServiceIamMemberArrayOutput) ToServiceIamMemberArrayOutput() ServiceIamMemberArrayOutput

func (ServiceIamMemberArrayOutput) ToServiceIamMemberArrayOutputWithContext added in v4.11.1

func (o ServiceIamMemberArrayOutput) ToServiceIamMemberArrayOutputWithContext(ctx context.Context) ServiceIamMemberArrayOutput

type ServiceIamMemberCondition

type ServiceIamMemberCondition struct {
	Description *string `pulumi:"description"`
	Expression  string  `pulumi:"expression"`
	Title       string  `pulumi:"title"`
}

type ServiceIamMemberConditionArgs

type ServiceIamMemberConditionArgs struct {
	Description pulumi.StringPtrInput `pulumi:"description"`
	Expression  pulumi.StringInput    `pulumi:"expression"`
	Title       pulumi.StringInput    `pulumi:"title"`
}

func (ServiceIamMemberConditionArgs) ElementType

func (ServiceIamMemberConditionArgs) ToServiceIamMemberConditionOutput

func (i ServiceIamMemberConditionArgs) ToServiceIamMemberConditionOutput() ServiceIamMemberConditionOutput

func (ServiceIamMemberConditionArgs) ToServiceIamMemberConditionOutputWithContext

func (i ServiceIamMemberConditionArgs) ToServiceIamMemberConditionOutputWithContext(ctx context.Context) ServiceIamMemberConditionOutput

func (ServiceIamMemberConditionArgs) ToServiceIamMemberConditionPtrOutput

func (i ServiceIamMemberConditionArgs) ToServiceIamMemberConditionPtrOutput() ServiceIamMemberConditionPtrOutput

func (ServiceIamMemberConditionArgs) ToServiceIamMemberConditionPtrOutputWithContext

func (i ServiceIamMemberConditionArgs) ToServiceIamMemberConditionPtrOutputWithContext(ctx context.Context) ServiceIamMemberConditionPtrOutput

type ServiceIamMemberConditionInput

type ServiceIamMemberConditionInput interface {
	pulumi.Input

	ToServiceIamMemberConditionOutput() ServiceIamMemberConditionOutput
	ToServiceIamMemberConditionOutputWithContext(context.Context) ServiceIamMemberConditionOutput
}

ServiceIamMemberConditionInput is an input type that accepts ServiceIamMemberConditionArgs and ServiceIamMemberConditionOutput values. You can construct a concrete instance of `ServiceIamMemberConditionInput` via:

ServiceIamMemberConditionArgs{...}

type ServiceIamMemberConditionOutput

type ServiceIamMemberConditionOutput struct{ *pulumi.OutputState }

func (ServiceIamMemberConditionOutput) Description

func (ServiceIamMemberConditionOutput) ElementType

func (ServiceIamMemberConditionOutput) Expression

func (ServiceIamMemberConditionOutput) Title

func (ServiceIamMemberConditionOutput) ToServiceIamMemberConditionOutput

func (o ServiceIamMemberConditionOutput) ToServiceIamMemberConditionOutput() ServiceIamMemberConditionOutput

func (ServiceIamMemberConditionOutput) ToServiceIamMemberConditionOutputWithContext

func (o ServiceIamMemberConditionOutput) ToServiceIamMemberConditionOutputWithContext(ctx context.Context) ServiceIamMemberConditionOutput

func (ServiceIamMemberConditionOutput) ToServiceIamMemberConditionPtrOutput

func (o ServiceIamMemberConditionOutput) ToServiceIamMemberConditionPtrOutput() ServiceIamMemberConditionPtrOutput

func (ServiceIamMemberConditionOutput) ToServiceIamMemberConditionPtrOutputWithContext

func (o ServiceIamMemberConditionOutput) ToServiceIamMemberConditionPtrOutputWithContext(ctx context.Context) ServiceIamMemberConditionPtrOutput

type ServiceIamMemberConditionPtrInput

type ServiceIamMemberConditionPtrInput interface {
	pulumi.Input

	ToServiceIamMemberConditionPtrOutput() ServiceIamMemberConditionPtrOutput
	ToServiceIamMemberConditionPtrOutputWithContext(context.Context) ServiceIamMemberConditionPtrOutput
}

ServiceIamMemberConditionPtrInput is an input type that accepts ServiceIamMemberConditionArgs, ServiceIamMemberConditionPtr and ServiceIamMemberConditionPtrOutput values. You can construct a concrete instance of `ServiceIamMemberConditionPtrInput` via:

        ServiceIamMemberConditionArgs{...}

or:

        nil

type ServiceIamMemberConditionPtrOutput

type ServiceIamMemberConditionPtrOutput struct{ *pulumi.OutputState }

func (ServiceIamMemberConditionPtrOutput) Description

func (ServiceIamMemberConditionPtrOutput) Elem

func (ServiceIamMemberConditionPtrOutput) ElementType

func (ServiceIamMemberConditionPtrOutput) Expression

func (ServiceIamMemberConditionPtrOutput) Title

func (ServiceIamMemberConditionPtrOutput) ToServiceIamMemberConditionPtrOutput

func (o ServiceIamMemberConditionPtrOutput) ToServiceIamMemberConditionPtrOutput() ServiceIamMemberConditionPtrOutput

func (ServiceIamMemberConditionPtrOutput) ToServiceIamMemberConditionPtrOutputWithContext

func (o ServiceIamMemberConditionPtrOutput) ToServiceIamMemberConditionPtrOutputWithContext(ctx context.Context) ServiceIamMemberConditionPtrOutput

type ServiceIamMemberInput added in v4.4.0

type ServiceIamMemberInput interface {
	pulumi.Input

	ToServiceIamMemberOutput() ServiceIamMemberOutput
	ToServiceIamMemberOutputWithContext(ctx context.Context) ServiceIamMemberOutput
}

type ServiceIamMemberMap added in v4.11.1

type ServiceIamMemberMap map[string]ServiceIamMemberInput

func (ServiceIamMemberMap) ElementType added in v4.11.1

func (ServiceIamMemberMap) ElementType() reflect.Type

func (ServiceIamMemberMap) ToServiceIamMemberMapOutput added in v4.11.1

func (i ServiceIamMemberMap) ToServiceIamMemberMapOutput() ServiceIamMemberMapOutput

func (ServiceIamMemberMap) ToServiceIamMemberMapOutputWithContext added in v4.11.1

func (i ServiceIamMemberMap) ToServiceIamMemberMapOutputWithContext(ctx context.Context) ServiceIamMemberMapOutput

type ServiceIamMemberMapInput added in v4.11.1

type ServiceIamMemberMapInput interface {
	pulumi.Input

	ToServiceIamMemberMapOutput() ServiceIamMemberMapOutput
	ToServiceIamMemberMapOutputWithContext(context.Context) ServiceIamMemberMapOutput
}

ServiceIamMemberMapInput is an input type that accepts ServiceIamMemberMap and ServiceIamMemberMapOutput values. You can construct a concrete instance of `ServiceIamMemberMapInput` via:

ServiceIamMemberMap{ "key": ServiceIamMemberArgs{...} }

type ServiceIamMemberMapOutput added in v4.11.1

type ServiceIamMemberMapOutput struct{ *pulumi.OutputState }

func (ServiceIamMemberMapOutput) ElementType added in v4.11.1

func (ServiceIamMemberMapOutput) ElementType() reflect.Type

func (ServiceIamMemberMapOutput) MapIndex added in v4.11.1

func (ServiceIamMemberMapOutput) ToServiceIamMemberMapOutput added in v4.11.1

func (o ServiceIamMemberMapOutput) ToServiceIamMemberMapOutput() ServiceIamMemberMapOutput

func (ServiceIamMemberMapOutput) ToServiceIamMemberMapOutputWithContext added in v4.11.1

func (o ServiceIamMemberMapOutput) ToServiceIamMemberMapOutputWithContext(ctx context.Context) ServiceIamMemberMapOutput

type ServiceIamMemberOutput added in v4.4.0

type ServiceIamMemberOutput struct {
	*pulumi.OutputState
}

func (ServiceIamMemberOutput) ElementType added in v4.4.0

func (ServiceIamMemberOutput) ElementType() reflect.Type

func (ServiceIamMemberOutput) ToServiceIamMemberOutput added in v4.4.0

func (o ServiceIamMemberOutput) ToServiceIamMemberOutput() ServiceIamMemberOutput

func (ServiceIamMemberOutput) ToServiceIamMemberOutputWithContext added in v4.4.0

func (o ServiceIamMemberOutput) ToServiceIamMemberOutputWithContext(ctx context.Context) ServiceIamMemberOutput

func (ServiceIamMemberOutput) ToServiceIamMemberPtrOutput added in v4.11.1

func (o ServiceIamMemberOutput) ToServiceIamMemberPtrOutput() ServiceIamMemberPtrOutput

func (ServiceIamMemberOutput) ToServiceIamMemberPtrOutputWithContext added in v4.11.1

func (o ServiceIamMemberOutput) ToServiceIamMemberPtrOutputWithContext(ctx context.Context) ServiceIamMemberPtrOutput

type ServiceIamMemberPtrInput added in v4.11.1

type ServiceIamMemberPtrInput interface {
	pulumi.Input

	ToServiceIamMemberPtrOutput() ServiceIamMemberPtrOutput
	ToServiceIamMemberPtrOutputWithContext(ctx context.Context) ServiceIamMemberPtrOutput
}

type ServiceIamMemberPtrOutput added in v4.11.1

type ServiceIamMemberPtrOutput struct {
	*pulumi.OutputState
}

func (ServiceIamMemberPtrOutput) ElementType added in v4.11.1

func (ServiceIamMemberPtrOutput) ElementType() reflect.Type

func (ServiceIamMemberPtrOutput) ToServiceIamMemberPtrOutput added in v4.11.1

func (o ServiceIamMemberPtrOutput) ToServiceIamMemberPtrOutput() ServiceIamMemberPtrOutput

func (ServiceIamMemberPtrOutput) ToServiceIamMemberPtrOutputWithContext added in v4.11.1

func (o ServiceIamMemberPtrOutput) ToServiceIamMemberPtrOutputWithContext(ctx context.Context) ServiceIamMemberPtrOutput

type ServiceIamMemberState

type ServiceIamMemberState struct {
	Condition ServiceIamMemberConditionPtrInput
	// (Computed) The etag of the IAM policy.
	Etag   pulumi.StringPtrInput
	Member pulumi.StringPtrInput
	// Used to find the parent resource to bind the IAM policy to
	Name pulumi.StringPtrInput
	// The role that should be applied. Only one
	// `servicedirectory.ServiceIamBinding` can be used per role. Note that custom roles must be of the format
	// `[projects|organizations]/{parent-name}/roles/{role-name}`.
	Role pulumi.StringPtrInput
}

func (ServiceIamMemberState) ElementType

func (ServiceIamMemberState) ElementType() reflect.Type

type ServiceIamPolicy

type ServiceIamPolicy struct {
	pulumi.CustomResourceState

	// (Computed) The etag of the IAM policy.
	Etag pulumi.StringOutput `pulumi:"etag"`
	// Used to find the parent resource to bind the IAM policy to
	Name pulumi.StringOutput `pulumi:"name"`
	// The policy data generated by
	// a `organizations.getIAMPolicy` data source.
	PolicyData pulumi.StringOutput `pulumi:"policyData"`
}

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

* `servicedirectory.ServiceIamPolicy`: Authoritative. Sets the IAM policy for the service and replaces any existing policy already attached. * `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. * `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:** `servicedirectory.ServiceIamPolicy` **cannot** be used in conjunction with `servicedirectory.ServiceIamBinding` and `servicedirectory.ServiceIamMember` or they will fight over what your policy should be.

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

## google\_service\_directory\_service\_iam\_policy

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		admin, err := organizations.LookupIAMPolicy(ctx, &organizations.LookupIAMPolicyArgs{
			Bindings: []organizations.GetIAMPolicyBinding{
				organizations.GetIAMPolicyBinding{
					Role: "roles/viewer",
					Members: []string{
						"user:jane@example.com",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		_, err = servicedirectory.NewServiceIamPolicy(ctx, "policy", &servicedirectory.ServiceIamPolicyArgs{
			PolicyData: pulumi.String(admin.PolicyData),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## google\_service\_directory\_service\_iam\_binding

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := servicedirectory.NewServiceIamBinding(ctx, "binding", &servicedirectory.ServiceIamBindingArgs{
			Role: pulumi.String("roles/viewer"),
			Members: pulumi.StringArray{
				pulumi.String("user:jane@example.com"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## google\_service\_directory\_service\_iam\_member

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := servicedirectory.NewServiceIamMember(ctx, "member", &servicedirectory.ServiceIamMemberArgs{
			Role:   pulumi.String("roles/viewer"),
			Member: pulumi.String("user:jane@example.com"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

For all import syntaxes, the "resource in question" can take any of the following forms* projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}}/services/{{service_id}} * {{project}}/{{location}}/{{namespace_id}}/{{service_id}} * {{location}}/{{namespace_id}}/{{service_id}} Any variables not passed in the import command will be taken from the provider configuration. Service Directory service IAM resources can be imported using the resource identifiers, role, and member. IAM member imports use space-delimited identifiersthe resource in question, the role, and the member identity, e.g.

```sh

$ pulumi import gcp:servicedirectory/serviceIamPolicy:ServiceIamPolicy editor "projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}}/services/{{service_id}} roles/viewer user:jane@example.com"

```

IAM binding imports use space-delimited identifiersthe resource in question and the role, e.g.

```sh

$ pulumi import gcp:servicedirectory/serviceIamPolicy:ServiceIamPolicy editor "projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}}/services/{{service_id}} roles/viewer"

```

IAM policy imports use the identifier of the resource in question, e.g.

```sh

$ pulumi import gcp:servicedirectory/serviceIamPolicy:ServiceIamPolicy editor projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}}/services/{{service_id}}

```

-> **Custom Roles**If you're importing a IAM resource with a custom role, make sure to use the

full name of the custom role, e.g. `[projects/my-project|organizations/my-org]/roles/my-custom-role`.

func GetServiceIamPolicy

func GetServiceIamPolicy(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ServiceIamPolicyState, opts ...pulumi.ResourceOption) (*ServiceIamPolicy, error)

GetServiceIamPolicy gets an existing ServiceIamPolicy resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewServiceIamPolicy

func NewServiceIamPolicy(ctx *pulumi.Context,
	name string, args *ServiceIamPolicyArgs, opts ...pulumi.ResourceOption) (*ServiceIamPolicy, error)

NewServiceIamPolicy registers a new resource with the given unique name, arguments, and options.

func (*ServiceIamPolicy) ElementType added in v4.4.0

func (*ServiceIamPolicy) ElementType() reflect.Type

func (*ServiceIamPolicy) ToServiceIamPolicyOutput added in v4.4.0

func (i *ServiceIamPolicy) ToServiceIamPolicyOutput() ServiceIamPolicyOutput

func (*ServiceIamPolicy) ToServiceIamPolicyOutputWithContext added in v4.4.0

func (i *ServiceIamPolicy) ToServiceIamPolicyOutputWithContext(ctx context.Context) ServiceIamPolicyOutput

func (*ServiceIamPolicy) ToServiceIamPolicyPtrOutput added in v4.11.1

func (i *ServiceIamPolicy) ToServiceIamPolicyPtrOutput() ServiceIamPolicyPtrOutput

func (*ServiceIamPolicy) ToServiceIamPolicyPtrOutputWithContext added in v4.11.1

func (i *ServiceIamPolicy) ToServiceIamPolicyPtrOutputWithContext(ctx context.Context) ServiceIamPolicyPtrOutput

type ServiceIamPolicyArgs

type ServiceIamPolicyArgs struct {
	// Used to find the parent resource to bind the IAM policy to
	Name pulumi.StringPtrInput
	// The policy data generated by
	// a `organizations.getIAMPolicy` data source.
	PolicyData pulumi.StringInput
}

The set of arguments for constructing a ServiceIamPolicy resource.

func (ServiceIamPolicyArgs) ElementType

func (ServiceIamPolicyArgs) ElementType() reflect.Type

type ServiceIamPolicyArray added in v4.11.1

type ServiceIamPolicyArray []ServiceIamPolicyInput

func (ServiceIamPolicyArray) ElementType added in v4.11.1

func (ServiceIamPolicyArray) ElementType() reflect.Type

func (ServiceIamPolicyArray) ToServiceIamPolicyArrayOutput added in v4.11.1

func (i ServiceIamPolicyArray) ToServiceIamPolicyArrayOutput() ServiceIamPolicyArrayOutput

func (ServiceIamPolicyArray) ToServiceIamPolicyArrayOutputWithContext added in v4.11.1

func (i ServiceIamPolicyArray) ToServiceIamPolicyArrayOutputWithContext(ctx context.Context) ServiceIamPolicyArrayOutput

type ServiceIamPolicyArrayInput added in v4.11.1

type ServiceIamPolicyArrayInput interface {
	pulumi.Input

	ToServiceIamPolicyArrayOutput() ServiceIamPolicyArrayOutput
	ToServiceIamPolicyArrayOutputWithContext(context.Context) ServiceIamPolicyArrayOutput
}

ServiceIamPolicyArrayInput is an input type that accepts ServiceIamPolicyArray and ServiceIamPolicyArrayOutput values. You can construct a concrete instance of `ServiceIamPolicyArrayInput` via:

ServiceIamPolicyArray{ ServiceIamPolicyArgs{...} }

type ServiceIamPolicyArrayOutput added in v4.11.1

type ServiceIamPolicyArrayOutput struct{ *pulumi.OutputState }

func (ServiceIamPolicyArrayOutput) ElementType added in v4.11.1

func (ServiceIamPolicyArrayOutput) Index added in v4.11.1

func (ServiceIamPolicyArrayOutput) ToServiceIamPolicyArrayOutput added in v4.11.1

func (o ServiceIamPolicyArrayOutput) ToServiceIamPolicyArrayOutput() ServiceIamPolicyArrayOutput

func (ServiceIamPolicyArrayOutput) ToServiceIamPolicyArrayOutputWithContext added in v4.11.1

func (o ServiceIamPolicyArrayOutput) ToServiceIamPolicyArrayOutputWithContext(ctx context.Context) ServiceIamPolicyArrayOutput

type ServiceIamPolicyInput added in v4.4.0

type ServiceIamPolicyInput interface {
	pulumi.Input

	ToServiceIamPolicyOutput() ServiceIamPolicyOutput
	ToServiceIamPolicyOutputWithContext(ctx context.Context) ServiceIamPolicyOutput
}

type ServiceIamPolicyMap added in v4.11.1

type ServiceIamPolicyMap map[string]ServiceIamPolicyInput

func (ServiceIamPolicyMap) ElementType added in v4.11.1

func (ServiceIamPolicyMap) ElementType() reflect.Type

func (ServiceIamPolicyMap) ToServiceIamPolicyMapOutput added in v4.11.1

func (i ServiceIamPolicyMap) ToServiceIamPolicyMapOutput() ServiceIamPolicyMapOutput

func (ServiceIamPolicyMap) ToServiceIamPolicyMapOutputWithContext added in v4.11.1

func (i ServiceIamPolicyMap) ToServiceIamPolicyMapOutputWithContext(ctx context.Context) ServiceIamPolicyMapOutput

type ServiceIamPolicyMapInput added in v4.11.1

type ServiceIamPolicyMapInput interface {
	pulumi.Input

	ToServiceIamPolicyMapOutput() ServiceIamPolicyMapOutput
	ToServiceIamPolicyMapOutputWithContext(context.Context) ServiceIamPolicyMapOutput
}

ServiceIamPolicyMapInput is an input type that accepts ServiceIamPolicyMap and ServiceIamPolicyMapOutput values. You can construct a concrete instance of `ServiceIamPolicyMapInput` via:

ServiceIamPolicyMap{ "key": ServiceIamPolicyArgs{...} }

type ServiceIamPolicyMapOutput added in v4.11.1

type ServiceIamPolicyMapOutput struct{ *pulumi.OutputState }

func (ServiceIamPolicyMapOutput) ElementType added in v4.11.1

func (ServiceIamPolicyMapOutput) ElementType() reflect.Type

func (ServiceIamPolicyMapOutput) MapIndex added in v4.11.1

func (ServiceIamPolicyMapOutput) ToServiceIamPolicyMapOutput added in v4.11.1

func (o ServiceIamPolicyMapOutput) ToServiceIamPolicyMapOutput() ServiceIamPolicyMapOutput

func (ServiceIamPolicyMapOutput) ToServiceIamPolicyMapOutputWithContext added in v4.11.1

func (o ServiceIamPolicyMapOutput) ToServiceIamPolicyMapOutputWithContext(ctx context.Context) ServiceIamPolicyMapOutput

type ServiceIamPolicyOutput added in v4.4.0

type ServiceIamPolicyOutput struct {
	*pulumi.OutputState
}

func (ServiceIamPolicyOutput) ElementType added in v4.4.0

func (ServiceIamPolicyOutput) ElementType() reflect.Type

func (ServiceIamPolicyOutput) ToServiceIamPolicyOutput added in v4.4.0

func (o ServiceIamPolicyOutput) ToServiceIamPolicyOutput() ServiceIamPolicyOutput

func (ServiceIamPolicyOutput) ToServiceIamPolicyOutputWithContext added in v4.4.0

func (o ServiceIamPolicyOutput) ToServiceIamPolicyOutputWithContext(ctx context.Context) ServiceIamPolicyOutput

func (ServiceIamPolicyOutput) ToServiceIamPolicyPtrOutput added in v4.11.1

func (o ServiceIamPolicyOutput) ToServiceIamPolicyPtrOutput() ServiceIamPolicyPtrOutput

func (ServiceIamPolicyOutput) ToServiceIamPolicyPtrOutputWithContext added in v4.11.1

func (o ServiceIamPolicyOutput) ToServiceIamPolicyPtrOutputWithContext(ctx context.Context) ServiceIamPolicyPtrOutput

type ServiceIamPolicyPtrInput added in v4.11.1

type ServiceIamPolicyPtrInput interface {
	pulumi.Input

	ToServiceIamPolicyPtrOutput() ServiceIamPolicyPtrOutput
	ToServiceIamPolicyPtrOutputWithContext(ctx context.Context) ServiceIamPolicyPtrOutput
}

type ServiceIamPolicyPtrOutput added in v4.11.1

type ServiceIamPolicyPtrOutput struct {
	*pulumi.OutputState
}

func (ServiceIamPolicyPtrOutput) ElementType added in v4.11.1

func (ServiceIamPolicyPtrOutput) ElementType() reflect.Type

func (ServiceIamPolicyPtrOutput) ToServiceIamPolicyPtrOutput added in v4.11.1

func (o ServiceIamPolicyPtrOutput) ToServiceIamPolicyPtrOutput() ServiceIamPolicyPtrOutput

func (ServiceIamPolicyPtrOutput) ToServiceIamPolicyPtrOutputWithContext added in v4.11.1

func (o ServiceIamPolicyPtrOutput) ToServiceIamPolicyPtrOutputWithContext(ctx context.Context) ServiceIamPolicyPtrOutput

type ServiceIamPolicyState

type ServiceIamPolicyState struct {
	// (Computed) The etag of the IAM policy.
	Etag pulumi.StringPtrInput
	// Used to find the parent resource to bind the IAM policy to
	Name pulumi.StringPtrInput
	// The policy data generated by
	// a `organizations.getIAMPolicy` data source.
	PolicyData pulumi.StringPtrInput
}

func (ServiceIamPolicyState) ElementType

func (ServiceIamPolicyState) ElementType() reflect.Type

type ServiceInput added in v4.4.0

type ServiceInput interface {
	pulumi.Input

	ToServiceOutput() ServiceOutput
	ToServiceOutputWithContext(ctx context.Context) ServiceOutput
}

type ServiceMap added in v4.11.1

type ServiceMap map[string]ServiceInput

func (ServiceMap) ElementType added in v4.11.1

func (ServiceMap) ElementType() reflect.Type

func (ServiceMap) ToServiceMapOutput added in v4.11.1

func (i ServiceMap) ToServiceMapOutput() ServiceMapOutput

func (ServiceMap) ToServiceMapOutputWithContext added in v4.11.1

func (i ServiceMap) ToServiceMapOutputWithContext(ctx context.Context) ServiceMapOutput

type ServiceMapInput added in v4.11.1

type ServiceMapInput interface {
	pulumi.Input

	ToServiceMapOutput() ServiceMapOutput
	ToServiceMapOutputWithContext(context.Context) ServiceMapOutput
}

ServiceMapInput is an input type that accepts ServiceMap and ServiceMapOutput values. You can construct a concrete instance of `ServiceMapInput` via:

ServiceMap{ "key": ServiceArgs{...} }

type ServiceMapOutput added in v4.11.1

type ServiceMapOutput struct{ *pulumi.OutputState }

func (ServiceMapOutput) ElementType added in v4.11.1

func (ServiceMapOutput) ElementType() reflect.Type

func (ServiceMapOutput) MapIndex added in v4.11.1

func (ServiceMapOutput) ToServiceMapOutput added in v4.11.1

func (o ServiceMapOutput) ToServiceMapOutput() ServiceMapOutput

func (ServiceMapOutput) ToServiceMapOutputWithContext added in v4.11.1

func (o ServiceMapOutput) ToServiceMapOutputWithContext(ctx context.Context) ServiceMapOutput

type ServiceOutput added in v4.4.0

type ServiceOutput struct {
	*pulumi.OutputState
}

func (ServiceOutput) ElementType added in v4.4.0

func (ServiceOutput) ElementType() reflect.Type

func (ServiceOutput) ToServiceOutput added in v4.4.0

func (o ServiceOutput) ToServiceOutput() ServiceOutput

func (ServiceOutput) ToServiceOutputWithContext added in v4.4.0

func (o ServiceOutput) ToServiceOutputWithContext(ctx context.Context) ServiceOutput

func (ServiceOutput) ToServicePtrOutput added in v4.11.1

func (o ServiceOutput) ToServicePtrOutput() ServicePtrOutput

func (ServiceOutput) ToServicePtrOutputWithContext added in v4.11.1

func (o ServiceOutput) ToServicePtrOutputWithContext(ctx context.Context) ServicePtrOutput

type ServicePtrInput added in v4.11.1

type ServicePtrInput interface {
	pulumi.Input

	ToServicePtrOutput() ServicePtrOutput
	ToServicePtrOutputWithContext(ctx context.Context) ServicePtrOutput
}

type ServicePtrOutput added in v4.11.1

type ServicePtrOutput struct {
	*pulumi.OutputState
}

func (ServicePtrOutput) ElementType added in v4.11.1

func (ServicePtrOutput) ElementType() reflect.Type

func (ServicePtrOutput) ToServicePtrOutput added in v4.11.1

func (o ServicePtrOutput) ToServicePtrOutput() ServicePtrOutput

func (ServicePtrOutput) ToServicePtrOutputWithContext added in v4.11.1

func (o ServicePtrOutput) ToServicePtrOutputWithContext(ctx context.Context) ServicePtrOutput

type ServiceState

type ServiceState struct {
	// Metadata for the service. This data can be consumed
	// by service clients. The entire metadata dictionary may contain
	// up to 2000 characters, spread across all key-value pairs.
	// Metadata that goes beyond any these limits will be rejected.
	Metadata pulumi.StringMapInput
	// The resource name for the service in the format 'projects/*/locations/*/namespaces/*/services/*'.
	Name pulumi.StringPtrInput
	// The resource name of the namespace this service will belong to.
	Namespace pulumi.StringPtrInput
	// The Resource ID must be 1-63 characters long, including digits,
	// lowercase letters or the hyphen character.
	ServiceId pulumi.StringPtrInput
}

func (ServiceState) ElementType

func (ServiceState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL