servicedirectory

package
v6.67.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: Apache-2.0 Imports: 8 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"`
	// The URL to the network, such as projects/PROJECT_NUMBER/locations/global/networks/NETWORK_NAME.
	Network pulumi.StringPtrOutput `pulumi:"network"`
	// 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/v6/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v3/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
	})
}

``` ### Service Directory Endpoint With Network

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/compute"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		project, err := organizations.LookupProject(ctx, nil, nil)
		if err != nil {
			return err
		}
		exampleNetwork, err := compute.NewNetwork(ctx, "exampleNetwork", nil, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		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"),
			},
			Network: exampleNetwork.Name.ApplyT(func(name string) (string, error) {
				return fmt.Sprintf("projects/%v/locations/global/networks/%v", project.Number, name), nil
			}).(pulumi.StringOutput),
			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

func (*Endpoint) ElementType() reflect.Type

func (*Endpoint) ToEndpointOutput

func (i *Endpoint) ToEndpointOutput() EndpointOutput

func (*Endpoint) ToEndpointOutputWithContext

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

func (*Endpoint) ToOutput added in v6.65.1

func (i *Endpoint) ToOutput(ctx context.Context) pulumix.Output[*Endpoint]

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
	// The URL to the network, such as projects/PROJECT_NUMBER/locations/global/networks/NETWORK_NAME.
	Network 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.StringInput
}

The set of arguments for constructing a Endpoint resource.

func (EndpointArgs) ElementType

func (EndpointArgs) ElementType() reflect.Type

type EndpointArray

type EndpointArray []EndpointInput

func (EndpointArray) ElementType

func (EndpointArray) ElementType() reflect.Type

func (EndpointArray) ToEndpointArrayOutput

func (i EndpointArray) ToEndpointArrayOutput() EndpointArrayOutput

func (EndpointArray) ToEndpointArrayOutputWithContext

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

func (EndpointArray) ToOutput added in v6.65.1

func (i EndpointArray) ToOutput(ctx context.Context) pulumix.Output[[]*Endpoint]

type EndpointArrayInput

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

type EndpointArrayOutput struct{ *pulumi.OutputState }

func (EndpointArrayOutput) ElementType

func (EndpointArrayOutput) ElementType() reflect.Type

func (EndpointArrayOutput) Index

func (EndpointArrayOutput) ToEndpointArrayOutput

func (o EndpointArrayOutput) ToEndpointArrayOutput() EndpointArrayOutput

func (EndpointArrayOutput) ToEndpointArrayOutputWithContext

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

func (EndpointArrayOutput) ToOutput added in v6.65.1

type EndpointInput

type EndpointInput interface {
	pulumi.Input

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

type EndpointMap

type EndpointMap map[string]EndpointInput

func (EndpointMap) ElementType

func (EndpointMap) ElementType() reflect.Type

func (EndpointMap) ToEndpointMapOutput

func (i EndpointMap) ToEndpointMapOutput() EndpointMapOutput

func (EndpointMap) ToEndpointMapOutputWithContext

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

func (EndpointMap) ToOutput added in v6.65.1

func (i EndpointMap) ToOutput(ctx context.Context) pulumix.Output[map[string]*Endpoint]

type EndpointMapInput

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

type EndpointMapOutput struct{ *pulumi.OutputState }

func (EndpointMapOutput) ElementType

func (EndpointMapOutput) ElementType() reflect.Type

func (EndpointMapOutput) MapIndex

func (EndpointMapOutput) ToEndpointMapOutput

func (o EndpointMapOutput) ToEndpointMapOutput() EndpointMapOutput

func (EndpointMapOutput) ToEndpointMapOutputWithContext

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

func (EndpointMapOutput) ToOutput added in v6.65.1

type EndpointOutput

type EndpointOutput struct{ *pulumi.OutputState }

func (EndpointOutput) Address added in v6.23.0

IPv4 or IPv6 address of the endpoint.

func (EndpointOutput) ElementType

func (EndpointOutput) ElementType() reflect.Type

func (EndpointOutput) EndpointId added in v6.23.0

func (o EndpointOutput) EndpointId() pulumi.StringOutput

The Resource ID must be 1-63 characters long, including digits, lowercase letters or the hyphen character.

***

func (EndpointOutput) Metadata added in v6.23.0

func (o EndpointOutput) Metadata() pulumi.StringMapOutput

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.

func (EndpointOutput) Name added in v6.23.0

The resource name for the endpoint in the format `projects/*/locations/*/namespaces/*/services/*/endpoints/*`.

func (EndpointOutput) Network added in v6.23.0

The URL to the network, such as projects/PROJECT_NUMBER/locations/global/networks/NETWORK_NAME.

func (EndpointOutput) Port added in v6.23.0

Port that the endpoint is running on, must be in the range of [0, 65535]. If unspecified, the default is 0.

func (EndpointOutput) Service added in v6.23.0

func (o EndpointOutput) Service() pulumi.StringOutput

The resource name of the service that this endpoint provides.

func (EndpointOutput) ToEndpointOutput

func (o EndpointOutput) ToEndpointOutput() EndpointOutput

func (EndpointOutput) ToEndpointOutputWithContext

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

func (EndpointOutput) ToOutput added in v6.65.1

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
	// The URL to the network, such as projects/PROJECT_NUMBER/locations/global/networks/NETWORK_NAME.
	Network 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 LookupNamespaceIamPolicyArgs added in v6.59.0

type LookupNamespaceIamPolicyArgs struct {
	// Used to find the parent resource to bind the IAM policy to
	Name string `pulumi:"name"`
}

A collection of arguments for invoking getNamespaceIamPolicy.

type LookupNamespaceIamPolicyOutputArgs added in v6.59.0

type LookupNamespaceIamPolicyOutputArgs struct {
	// Used to find the parent resource to bind the IAM policy to
	Name pulumi.StringInput `pulumi:"name"`
}

A collection of arguments for invoking getNamespaceIamPolicy.

func (LookupNamespaceIamPolicyOutputArgs) ElementType added in v6.59.0

type LookupNamespaceIamPolicyResult added in v6.59.0

type LookupNamespaceIamPolicyResult struct {
	// (Computed) The etag of the IAM policy.
	Etag string `pulumi:"etag"`
	// The provider-assigned unique ID for this managed resource.
	Id   string `pulumi:"id"`
	Name string `pulumi:"name"`
	// (Required only by `servicedirectory.NamespaceIamPolicy`) The policy data generated by
	// a `organizations.getIAMPolicy` data source.
	PolicyData string `pulumi:"policyData"`
}

A collection of values returned by getNamespaceIamPolicy.

func LookupNamespaceIamPolicy added in v6.59.0

func LookupNamespaceIamPolicy(ctx *pulumi.Context, args *LookupNamespaceIamPolicyArgs, opts ...pulumi.InvokeOption) (*LookupNamespaceIamPolicyResult, error)

type LookupNamespaceIamPolicyResultOutput added in v6.59.0

type LookupNamespaceIamPolicyResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getNamespaceIamPolicy.

func (LookupNamespaceIamPolicyResultOutput) ElementType added in v6.59.0

func (LookupNamespaceIamPolicyResultOutput) Etag added in v6.59.0

(Computed) The etag of the IAM policy.

func (LookupNamespaceIamPolicyResultOutput) Id added in v6.59.0

The provider-assigned unique ID for this managed resource.

func (LookupNamespaceIamPolicyResultOutput) Name added in v6.59.0

func (LookupNamespaceIamPolicyResultOutput) PolicyData added in v6.59.0

(Required only by `servicedirectory.NamespaceIamPolicy`) The policy data generated by a `organizations.getIAMPolicy` data source.

func (LookupNamespaceIamPolicyResultOutput) ToLookupNamespaceIamPolicyResultOutput added in v6.59.0

func (o LookupNamespaceIamPolicyResultOutput) ToLookupNamespaceIamPolicyResultOutput() LookupNamespaceIamPolicyResultOutput

func (LookupNamespaceIamPolicyResultOutput) ToLookupNamespaceIamPolicyResultOutputWithContext added in v6.59.0

func (o LookupNamespaceIamPolicyResultOutput) ToLookupNamespaceIamPolicyResultOutputWithContext(ctx context.Context) LookupNamespaceIamPolicyResultOutput

func (LookupNamespaceIamPolicyResultOutput) ToOutput added in v6.65.1

type LookupServiceIamPolicyArgs added in v6.59.0

type LookupServiceIamPolicyArgs struct {
	// Used to find the parent resource to bind the IAM policy to
	Name string `pulumi:"name"`
}

A collection of arguments for invoking getServiceIamPolicy.

type LookupServiceIamPolicyOutputArgs added in v6.59.0

type LookupServiceIamPolicyOutputArgs struct {
	// Used to find the parent resource to bind the IAM policy to
	Name pulumi.StringInput `pulumi:"name"`
}

A collection of arguments for invoking getServiceIamPolicy.

func (LookupServiceIamPolicyOutputArgs) ElementType added in v6.59.0

type LookupServiceIamPolicyResult added in v6.59.0

type LookupServiceIamPolicyResult struct {
	// (Computed) The etag of the IAM policy.
	Etag string `pulumi:"etag"`
	// The provider-assigned unique ID for this managed resource.
	Id   string `pulumi:"id"`
	Name string `pulumi:"name"`
	// (Required only by `servicedirectory.ServiceIamPolicy`) The policy data generated by
	// a `organizations.getIAMPolicy` data source.
	PolicyData string `pulumi:"policyData"`
}

A collection of values returned by getServiceIamPolicy.

func LookupServiceIamPolicy added in v6.59.0

func LookupServiceIamPolicy(ctx *pulumi.Context, args *LookupServiceIamPolicyArgs, opts ...pulumi.InvokeOption) (*LookupServiceIamPolicyResult, error)

type LookupServiceIamPolicyResultOutput added in v6.59.0

type LookupServiceIamPolicyResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getServiceIamPolicy.

func LookupServiceIamPolicyOutput added in v6.59.0

func (LookupServiceIamPolicyResultOutput) ElementType added in v6.59.0

func (LookupServiceIamPolicyResultOutput) Etag added in v6.59.0

(Computed) The etag of the IAM policy.

func (LookupServiceIamPolicyResultOutput) Id added in v6.59.0

The provider-assigned unique ID for this managed resource.

func (LookupServiceIamPolicyResultOutput) Name added in v6.59.0

func (LookupServiceIamPolicyResultOutput) PolicyData added in v6.59.0

(Required only by `servicedirectory.ServiceIamPolicy`) The policy data generated by a `organizations.getIAMPolicy` data source.

func (LookupServiceIamPolicyResultOutput) ToLookupServiceIamPolicyResultOutput added in v6.59.0

func (o LookupServiceIamPolicyResultOutput) ToLookupServiceIamPolicyResultOutput() LookupServiceIamPolicyResultOutput

func (LookupServiceIamPolicyResultOutput) ToLookupServiceIamPolicyResultOutputWithContext added in v6.59.0

func (o LookupServiceIamPolicyResultOutput) ToLookupServiceIamPolicyResultOutputWithContext(ctx context.Context) LookupServiceIamPolicyResultOutput

func (LookupServiceIamPolicyResultOutput) ToOutput added in v6.65.1

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/v6/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v3/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

func (*Namespace) ElementType() reflect.Type

func (*Namespace) ToNamespaceOutput

func (i *Namespace) ToNamespaceOutput() NamespaceOutput

func (*Namespace) ToNamespaceOutputWithContext

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

func (*Namespace) ToOutput added in v6.65.1

func (i *Namespace) ToOutput(ctx context.Context) pulumix.Output[*Namespace]

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

type NamespaceArray []NamespaceInput

func (NamespaceArray) ElementType

func (NamespaceArray) ElementType() reflect.Type

func (NamespaceArray) ToNamespaceArrayOutput

func (i NamespaceArray) ToNamespaceArrayOutput() NamespaceArrayOutput

func (NamespaceArray) ToNamespaceArrayOutputWithContext

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

func (NamespaceArray) ToOutput added in v6.65.1

func (i NamespaceArray) ToOutput(ctx context.Context) pulumix.Output[[]*Namespace]

type NamespaceArrayInput

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

type NamespaceArrayOutput struct{ *pulumi.OutputState }

func (NamespaceArrayOutput) ElementType

func (NamespaceArrayOutput) ElementType() reflect.Type

func (NamespaceArrayOutput) Index

func (NamespaceArrayOutput) ToNamespaceArrayOutput

func (o NamespaceArrayOutput) ToNamespaceArrayOutput() NamespaceArrayOutput

func (NamespaceArrayOutput) ToNamespaceArrayOutputWithContext

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

func (NamespaceArrayOutput) ToOutput added in v6.65.1

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
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	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.

A data source can be used to retrieve policy data in advent you do not need creation

* `servicedirectory.NamespaceIamPolicy`: Retrieves the IAM policy for the namespace

> **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/v6/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		admin, err := organizations.LookupIAMPolicy(ctx, &organizations.LookupIAMPolicyArgs{
			Bindings: []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),
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		return nil
	})
}

```

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

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v3/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"),
			},
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		return nil
	})
}

```

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

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v3/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"),
		}, pulumi.Provider(google_beta))
		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

func (*NamespaceIamBinding) ElementType() reflect.Type

func (*NamespaceIamBinding) ToNamespaceIamBindingOutput

func (i *NamespaceIamBinding) ToNamespaceIamBindingOutput() NamespaceIamBindingOutput

func (*NamespaceIamBinding) ToNamespaceIamBindingOutputWithContext

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

func (*NamespaceIamBinding) ToOutput added in v6.65.1

type NamespaceIamBindingArgs

type NamespaceIamBindingArgs struct {
	Condition NamespaceIamBindingConditionPtrInput
	Members   pulumi.StringArrayInput
	// Used to find the parent resource to bind the IAM policy to
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	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

type NamespaceIamBindingArray []NamespaceIamBindingInput

func (NamespaceIamBindingArray) ElementType

func (NamespaceIamBindingArray) ElementType() reflect.Type

func (NamespaceIamBindingArray) ToNamespaceIamBindingArrayOutput

func (i NamespaceIamBindingArray) ToNamespaceIamBindingArrayOutput() NamespaceIamBindingArrayOutput

func (NamespaceIamBindingArray) ToNamespaceIamBindingArrayOutputWithContext

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

func (NamespaceIamBindingArray) ToOutput added in v6.65.1

type NamespaceIamBindingArrayInput

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

type NamespaceIamBindingArrayOutput struct{ *pulumi.OutputState }

func (NamespaceIamBindingArrayOutput) ElementType

func (NamespaceIamBindingArrayOutput) Index

func (NamespaceIamBindingArrayOutput) ToNamespaceIamBindingArrayOutput

func (o NamespaceIamBindingArrayOutput) ToNamespaceIamBindingArrayOutput() NamespaceIamBindingArrayOutput

func (NamespaceIamBindingArrayOutput) ToNamespaceIamBindingArrayOutputWithContext

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

func (NamespaceIamBindingArrayOutput) ToOutput added in v6.65.1

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

func (NamespaceIamBindingConditionArgs) ToOutput added in v6.65.1

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

func (NamespaceIamBindingConditionOutput) ToOutput added in v6.65.1

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

func (NamespaceIamBindingConditionPtrOutput) ToOutput added in v6.65.1

type NamespaceIamBindingInput

type NamespaceIamBindingInput interface {
	pulumi.Input

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

type NamespaceIamBindingMap

type NamespaceIamBindingMap map[string]NamespaceIamBindingInput

func (NamespaceIamBindingMap) ElementType

func (NamespaceIamBindingMap) ElementType() reflect.Type

func (NamespaceIamBindingMap) ToNamespaceIamBindingMapOutput

func (i NamespaceIamBindingMap) ToNamespaceIamBindingMapOutput() NamespaceIamBindingMapOutput

func (NamespaceIamBindingMap) ToNamespaceIamBindingMapOutputWithContext

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

func (NamespaceIamBindingMap) ToOutput added in v6.65.1

type NamespaceIamBindingMapInput

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

type NamespaceIamBindingMapOutput struct{ *pulumi.OutputState }

func (NamespaceIamBindingMapOutput) ElementType

func (NamespaceIamBindingMapOutput) MapIndex

func (NamespaceIamBindingMapOutput) ToNamespaceIamBindingMapOutput

func (o NamespaceIamBindingMapOutput) ToNamespaceIamBindingMapOutput() NamespaceIamBindingMapOutput

func (NamespaceIamBindingMapOutput) ToNamespaceIamBindingMapOutputWithContext

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

func (NamespaceIamBindingMapOutput) ToOutput added in v6.65.1

type NamespaceIamBindingOutput

type NamespaceIamBindingOutput struct{ *pulumi.OutputState }

func (NamespaceIamBindingOutput) Condition added in v6.23.0

func (NamespaceIamBindingOutput) ElementType

func (NamespaceIamBindingOutput) ElementType() reflect.Type

func (NamespaceIamBindingOutput) Etag added in v6.23.0

(Computed) The etag of the IAM policy.

func (NamespaceIamBindingOutput) Members added in v6.23.0

func (NamespaceIamBindingOutput) Name added in v6.23.0

Used to find the parent resource to bind the IAM policy to

  • `member/members` - (Required) Identities that will be granted the privilege in `role`. Each entry can have one of the following values:
  • **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
  • **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
  • **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
  • **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
  • **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
  • **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
  • **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"

func (NamespaceIamBindingOutput) Role added in v6.23.0

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}`.

func (NamespaceIamBindingOutput) ToNamespaceIamBindingOutput

func (o NamespaceIamBindingOutput) ToNamespaceIamBindingOutput() NamespaceIamBindingOutput

func (NamespaceIamBindingOutput) ToNamespaceIamBindingOutputWithContext

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

func (NamespaceIamBindingOutput) ToOutput added in v6.65.1

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
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	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
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	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.

A data source can be used to retrieve policy data in advent you do not need creation

* `servicedirectory.NamespaceIamPolicy`: Retrieves the IAM policy for the namespace

> **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/v6/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		admin, err := organizations.LookupIAMPolicy(ctx, &organizations.LookupIAMPolicyArgs{
			Bindings: []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),
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		return nil
	})
}

```

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

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v3/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"),
			},
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		return nil
	})
}

```

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

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v3/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"),
		}, pulumi.Provider(google_beta))
		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

func (*NamespaceIamMember) ElementType() reflect.Type

func (*NamespaceIamMember) ToNamespaceIamMemberOutput

func (i *NamespaceIamMember) ToNamespaceIamMemberOutput() NamespaceIamMemberOutput

func (*NamespaceIamMember) ToNamespaceIamMemberOutputWithContext

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

func (*NamespaceIamMember) ToOutput added in v6.65.1

type NamespaceIamMemberArgs

type NamespaceIamMemberArgs struct {
	Condition NamespaceIamMemberConditionPtrInput
	Member    pulumi.StringInput
	// Used to find the parent resource to bind the IAM policy to
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	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

type NamespaceIamMemberArray []NamespaceIamMemberInput

func (NamespaceIamMemberArray) ElementType

func (NamespaceIamMemberArray) ElementType() reflect.Type

func (NamespaceIamMemberArray) ToNamespaceIamMemberArrayOutput

func (i NamespaceIamMemberArray) ToNamespaceIamMemberArrayOutput() NamespaceIamMemberArrayOutput

func (NamespaceIamMemberArray) ToNamespaceIamMemberArrayOutputWithContext

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

func (NamespaceIamMemberArray) ToOutput added in v6.65.1

type NamespaceIamMemberArrayInput

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

type NamespaceIamMemberArrayOutput struct{ *pulumi.OutputState }

func (NamespaceIamMemberArrayOutput) ElementType

func (NamespaceIamMemberArrayOutput) Index

func (NamespaceIamMemberArrayOutput) ToNamespaceIamMemberArrayOutput

func (o NamespaceIamMemberArrayOutput) ToNamespaceIamMemberArrayOutput() NamespaceIamMemberArrayOutput

func (NamespaceIamMemberArrayOutput) ToNamespaceIamMemberArrayOutputWithContext

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

func (NamespaceIamMemberArrayOutput) ToOutput added in v6.65.1

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

func (NamespaceIamMemberConditionArgs) ToOutput added in v6.65.1

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

func (NamespaceIamMemberConditionOutput) ToOutput added in v6.65.1

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

func (NamespaceIamMemberConditionPtrOutput) ToOutput added in v6.65.1

type NamespaceIamMemberInput

type NamespaceIamMemberInput interface {
	pulumi.Input

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

type NamespaceIamMemberMap

type NamespaceIamMemberMap map[string]NamespaceIamMemberInput

func (NamespaceIamMemberMap) ElementType

func (NamespaceIamMemberMap) ElementType() reflect.Type

func (NamespaceIamMemberMap) ToNamespaceIamMemberMapOutput

func (i NamespaceIamMemberMap) ToNamespaceIamMemberMapOutput() NamespaceIamMemberMapOutput

func (NamespaceIamMemberMap) ToNamespaceIamMemberMapOutputWithContext

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

func (NamespaceIamMemberMap) ToOutput added in v6.65.1

type NamespaceIamMemberMapInput

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

type NamespaceIamMemberMapOutput struct{ *pulumi.OutputState }

func (NamespaceIamMemberMapOutput) ElementType

func (NamespaceIamMemberMapOutput) MapIndex

func (NamespaceIamMemberMapOutput) ToNamespaceIamMemberMapOutput

func (o NamespaceIamMemberMapOutput) ToNamespaceIamMemberMapOutput() NamespaceIamMemberMapOutput

func (NamespaceIamMemberMapOutput) ToNamespaceIamMemberMapOutputWithContext

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

func (NamespaceIamMemberMapOutput) ToOutput added in v6.65.1

type NamespaceIamMemberOutput

type NamespaceIamMemberOutput struct{ *pulumi.OutputState }

func (NamespaceIamMemberOutput) Condition added in v6.23.0

func (NamespaceIamMemberOutput) ElementType

func (NamespaceIamMemberOutput) ElementType() reflect.Type

func (NamespaceIamMemberOutput) Etag added in v6.23.0

(Computed) The etag of the IAM policy.

func (NamespaceIamMemberOutput) Member added in v6.23.0

func (NamespaceIamMemberOutput) Name added in v6.23.0

Used to find the parent resource to bind the IAM policy to

  • `member/members` - (Required) Identities that will be granted the privilege in `role`. Each entry can have one of the following values:
  • **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
  • **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
  • **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
  • **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
  • **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
  • **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
  • **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"

func (NamespaceIamMemberOutput) Role added in v6.23.0

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}`.

func (NamespaceIamMemberOutput) ToNamespaceIamMemberOutput

func (o NamespaceIamMemberOutput) ToNamespaceIamMemberOutput() NamespaceIamMemberOutput

func (NamespaceIamMemberOutput) ToNamespaceIamMemberOutputWithContext

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

func (NamespaceIamMemberOutput) ToOutput added in v6.65.1

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
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	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
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	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.

A data source can be used to retrieve policy data in advent you do not need creation

* `servicedirectory.NamespaceIamPolicy`: Retrieves the IAM policy for the namespace

> **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/v6/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		admin, err := organizations.LookupIAMPolicy(ctx, &organizations.LookupIAMPolicyArgs{
			Bindings: []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),
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		return nil
	})
}

```

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

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v3/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"),
			},
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		return nil
	})
}

```

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

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v3/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"),
		}, pulumi.Provider(google_beta))
		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

func (*NamespaceIamPolicy) ElementType() reflect.Type

func (*NamespaceIamPolicy) ToNamespaceIamPolicyOutput

func (i *NamespaceIamPolicy) ToNamespaceIamPolicyOutput() NamespaceIamPolicyOutput

func (*NamespaceIamPolicy) ToNamespaceIamPolicyOutputWithContext

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

func (*NamespaceIamPolicy) ToOutput added in v6.65.1

type NamespaceIamPolicyArgs

type NamespaceIamPolicyArgs struct {
	// Used to find the parent resource to bind the IAM policy to
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	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

type NamespaceIamPolicyArray []NamespaceIamPolicyInput

func (NamespaceIamPolicyArray) ElementType

func (NamespaceIamPolicyArray) ElementType() reflect.Type

func (NamespaceIamPolicyArray) ToNamespaceIamPolicyArrayOutput

func (i NamespaceIamPolicyArray) ToNamespaceIamPolicyArrayOutput() NamespaceIamPolicyArrayOutput

func (NamespaceIamPolicyArray) ToNamespaceIamPolicyArrayOutputWithContext

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

func (NamespaceIamPolicyArray) ToOutput added in v6.65.1

type NamespaceIamPolicyArrayInput

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

type NamespaceIamPolicyArrayOutput struct{ *pulumi.OutputState }

func (NamespaceIamPolicyArrayOutput) ElementType

func (NamespaceIamPolicyArrayOutput) Index

func (NamespaceIamPolicyArrayOutput) ToNamespaceIamPolicyArrayOutput

func (o NamespaceIamPolicyArrayOutput) ToNamespaceIamPolicyArrayOutput() NamespaceIamPolicyArrayOutput

func (NamespaceIamPolicyArrayOutput) ToNamespaceIamPolicyArrayOutputWithContext

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

func (NamespaceIamPolicyArrayOutput) ToOutput added in v6.65.1

type NamespaceIamPolicyInput

type NamespaceIamPolicyInput interface {
	pulumi.Input

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

type NamespaceIamPolicyMap

type NamespaceIamPolicyMap map[string]NamespaceIamPolicyInput

func (NamespaceIamPolicyMap) ElementType

func (NamespaceIamPolicyMap) ElementType() reflect.Type

func (NamespaceIamPolicyMap) ToNamespaceIamPolicyMapOutput

func (i NamespaceIamPolicyMap) ToNamespaceIamPolicyMapOutput() NamespaceIamPolicyMapOutput

func (NamespaceIamPolicyMap) ToNamespaceIamPolicyMapOutputWithContext

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

func (NamespaceIamPolicyMap) ToOutput added in v6.65.1

type NamespaceIamPolicyMapInput

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

type NamespaceIamPolicyMapOutput struct{ *pulumi.OutputState }

func (NamespaceIamPolicyMapOutput) ElementType

func (NamespaceIamPolicyMapOutput) MapIndex

func (NamespaceIamPolicyMapOutput) ToNamespaceIamPolicyMapOutput

func (o NamespaceIamPolicyMapOutput) ToNamespaceIamPolicyMapOutput() NamespaceIamPolicyMapOutput

func (NamespaceIamPolicyMapOutput) ToNamespaceIamPolicyMapOutputWithContext

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

func (NamespaceIamPolicyMapOutput) ToOutput added in v6.65.1

type NamespaceIamPolicyOutput

type NamespaceIamPolicyOutput struct{ *pulumi.OutputState }

func (NamespaceIamPolicyOutput) ElementType

func (NamespaceIamPolicyOutput) ElementType() reflect.Type

func (NamespaceIamPolicyOutput) Etag added in v6.23.0

(Computed) The etag of the IAM policy.

func (NamespaceIamPolicyOutput) Name added in v6.23.0

Used to find the parent resource to bind the IAM policy to

  • `member/members` - (Required) Identities that will be granted the privilege in `role`. Each entry can have one of the following values:
  • **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
  • **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
  • **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
  • **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
  • **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
  • **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
  • **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"

func (NamespaceIamPolicyOutput) PolicyData added in v6.23.0

The policy data generated by a `organizations.getIAMPolicy` data source.

func (NamespaceIamPolicyOutput) ToNamespaceIamPolicyOutput

func (o NamespaceIamPolicyOutput) ToNamespaceIamPolicyOutput() NamespaceIamPolicyOutput

func (NamespaceIamPolicyOutput) ToNamespaceIamPolicyOutputWithContext

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

func (NamespaceIamPolicyOutput) ToOutput added in v6.65.1

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
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	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

type NamespaceInput interface {
	pulumi.Input

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

type NamespaceMap

type NamespaceMap map[string]NamespaceInput

func (NamespaceMap) ElementType

func (NamespaceMap) ElementType() reflect.Type

func (NamespaceMap) ToNamespaceMapOutput

func (i NamespaceMap) ToNamespaceMapOutput() NamespaceMapOutput

func (NamespaceMap) ToNamespaceMapOutputWithContext

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

func (NamespaceMap) ToOutput added in v6.65.1

func (i NamespaceMap) ToOutput(ctx context.Context) pulumix.Output[map[string]*Namespace]

type NamespaceMapInput

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

type NamespaceMapOutput struct{ *pulumi.OutputState }

func (NamespaceMapOutput) ElementType

func (NamespaceMapOutput) ElementType() reflect.Type

func (NamespaceMapOutput) MapIndex

func (NamespaceMapOutput) ToNamespaceMapOutput

func (o NamespaceMapOutput) ToNamespaceMapOutput() NamespaceMapOutput

func (NamespaceMapOutput) ToNamespaceMapOutputWithContext

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

func (NamespaceMapOutput) ToOutput added in v6.65.1

type NamespaceOutput

type NamespaceOutput struct{ *pulumi.OutputState }

func (NamespaceOutput) ElementType

func (NamespaceOutput) ElementType() reflect.Type

func (NamespaceOutput) Labels added in v6.23.0

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.

func (NamespaceOutput) Location added in v6.23.0

func (o NamespaceOutput) Location() pulumi.StringOutput

The location for the Namespace. A full list of valid locations can be found by running `gcloud beta service-directory locations list`.

func (NamespaceOutput) Name added in v6.23.0

The resource name for the namespace in the format `projects/*/locations/*/namespaces/*`.

func (NamespaceOutput) NamespaceId added in v6.23.0

func (o NamespaceOutput) NamespaceId() pulumi.StringOutput

The Resource ID must be 1-63 characters long, including digits, lowercase letters or the hyphen character.

***

func (NamespaceOutput) Project added in v6.23.0

func (o NamespaceOutput) Project() pulumi.StringOutput

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

func (NamespaceOutput) ToNamespaceOutput

func (o NamespaceOutput) ToNamespaceOutput() NamespaceOutput

func (NamespaceOutput) ToNamespaceOutputWithContext

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

func (NamespaceOutput) ToOutput added in v6.65.1

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/v6/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v3/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

func (*Service) ElementType() reflect.Type

func (*Service) ToOutput added in v6.65.1

func (i *Service) ToOutput(ctx context.Context) pulumix.Output[*Service]

func (*Service) ToServiceOutput

func (i *Service) ToServiceOutput() ServiceOutput

func (*Service) ToServiceOutputWithContext

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

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

type ServiceArray []ServiceInput

func (ServiceArray) ElementType

func (ServiceArray) ElementType() reflect.Type

func (ServiceArray) ToOutput added in v6.65.1

func (i ServiceArray) ToOutput(ctx context.Context) pulumix.Output[[]*Service]

func (ServiceArray) ToServiceArrayOutput

func (i ServiceArray) ToServiceArrayOutput() ServiceArrayOutput

func (ServiceArray) ToServiceArrayOutputWithContext

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

type ServiceArrayInput

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

type ServiceArrayOutput struct{ *pulumi.OutputState }

func (ServiceArrayOutput) ElementType

func (ServiceArrayOutput) ElementType() reflect.Type

func (ServiceArrayOutput) Index

func (ServiceArrayOutput) ToOutput added in v6.65.1

func (ServiceArrayOutput) ToServiceArrayOutput

func (o ServiceArrayOutput) ToServiceArrayOutput() ServiceArrayOutput

func (ServiceArrayOutput) ToServiceArrayOutputWithContext

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
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	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.

A data source can be used to retrieve policy data in advent you do not need creation

* `servicedirectory.ServiceIamPolicy`: Retrieves the IAM policy for the service

> **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/v6/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		admin, err := organizations.LookupIAMPolicy(ctx, &organizations.LookupIAMPolicyArgs{
			Bindings: []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),
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		return nil
	})
}

```

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

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v3/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"),
			},
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		return nil
	})
}

```

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

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v3/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"),
		}, pulumi.Provider(google_beta))
		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

func (*ServiceIamBinding) ElementType() reflect.Type

func (*ServiceIamBinding) ToOutput added in v6.65.1

func (*ServiceIamBinding) ToServiceIamBindingOutput

func (i *ServiceIamBinding) ToServiceIamBindingOutput() ServiceIamBindingOutput

func (*ServiceIamBinding) ToServiceIamBindingOutputWithContext

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

type ServiceIamBindingArgs

type ServiceIamBindingArgs struct {
	Condition ServiceIamBindingConditionPtrInput
	Members   pulumi.StringArrayInput
	// Used to find the parent resource to bind the IAM policy to
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	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

type ServiceIamBindingArray []ServiceIamBindingInput

func (ServiceIamBindingArray) ElementType

func (ServiceIamBindingArray) ElementType() reflect.Type

func (ServiceIamBindingArray) ToOutput added in v6.65.1

func (ServiceIamBindingArray) ToServiceIamBindingArrayOutput

func (i ServiceIamBindingArray) ToServiceIamBindingArrayOutput() ServiceIamBindingArrayOutput

func (ServiceIamBindingArray) ToServiceIamBindingArrayOutputWithContext

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

type ServiceIamBindingArrayInput

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

type ServiceIamBindingArrayOutput struct{ *pulumi.OutputState }

func (ServiceIamBindingArrayOutput) ElementType

func (ServiceIamBindingArrayOutput) Index

func (ServiceIamBindingArrayOutput) ToOutput added in v6.65.1

func (ServiceIamBindingArrayOutput) ToServiceIamBindingArrayOutput

func (o ServiceIamBindingArrayOutput) ToServiceIamBindingArrayOutput() ServiceIamBindingArrayOutput

func (ServiceIamBindingArrayOutput) ToServiceIamBindingArrayOutputWithContext

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) ToOutput added in v6.65.1

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) ToOutput added in v6.65.1

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) ToOutput added in v6.65.1

func (ServiceIamBindingConditionPtrOutput) ToServiceIamBindingConditionPtrOutput

func (o ServiceIamBindingConditionPtrOutput) ToServiceIamBindingConditionPtrOutput() ServiceIamBindingConditionPtrOutput

func (ServiceIamBindingConditionPtrOutput) ToServiceIamBindingConditionPtrOutputWithContext

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

type ServiceIamBindingInput

type ServiceIamBindingInput interface {
	pulumi.Input

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

type ServiceIamBindingMap

type ServiceIamBindingMap map[string]ServiceIamBindingInput

func (ServiceIamBindingMap) ElementType

func (ServiceIamBindingMap) ElementType() reflect.Type

func (ServiceIamBindingMap) ToOutput added in v6.65.1

func (ServiceIamBindingMap) ToServiceIamBindingMapOutput

func (i ServiceIamBindingMap) ToServiceIamBindingMapOutput() ServiceIamBindingMapOutput

func (ServiceIamBindingMap) ToServiceIamBindingMapOutputWithContext

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

type ServiceIamBindingMapInput

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

type ServiceIamBindingMapOutput struct{ *pulumi.OutputState }

func (ServiceIamBindingMapOutput) ElementType

func (ServiceIamBindingMapOutput) ElementType() reflect.Type

func (ServiceIamBindingMapOutput) MapIndex

func (ServiceIamBindingMapOutput) ToOutput added in v6.65.1

func (ServiceIamBindingMapOutput) ToServiceIamBindingMapOutput

func (o ServiceIamBindingMapOutput) ToServiceIamBindingMapOutput() ServiceIamBindingMapOutput

func (ServiceIamBindingMapOutput) ToServiceIamBindingMapOutputWithContext

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

type ServiceIamBindingOutput

type ServiceIamBindingOutput struct{ *pulumi.OutputState }

func (ServiceIamBindingOutput) Condition added in v6.23.0

func (ServiceIamBindingOutput) ElementType

func (ServiceIamBindingOutput) ElementType() reflect.Type

func (ServiceIamBindingOutput) Etag added in v6.23.0

(Computed) The etag of the IAM policy.

func (ServiceIamBindingOutput) Members added in v6.23.0

func (ServiceIamBindingOutput) Name added in v6.23.0

Used to find the parent resource to bind the IAM policy to

  • `member/members` - (Required) Identities that will be granted the privilege in `role`. Each entry can have one of the following values:
  • **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
  • **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
  • **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
  • **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
  • **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
  • **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
  • **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"

func (ServiceIamBindingOutput) Role added in v6.23.0

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}`.

func (ServiceIamBindingOutput) ToOutput added in v6.65.1

func (ServiceIamBindingOutput) ToServiceIamBindingOutput

func (o ServiceIamBindingOutput) ToServiceIamBindingOutput() ServiceIamBindingOutput

func (ServiceIamBindingOutput) ToServiceIamBindingOutputWithContext

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

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
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	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
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	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.

A data source can be used to retrieve policy data in advent you do not need creation

* `servicedirectory.ServiceIamPolicy`: Retrieves the IAM policy for the service

> **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/v6/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		admin, err := organizations.LookupIAMPolicy(ctx, &organizations.LookupIAMPolicyArgs{
			Bindings: []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),
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		return nil
	})
}

```

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

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v3/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"),
			},
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		return nil
	})
}

```

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

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v3/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"),
		}, pulumi.Provider(google_beta))
		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

func (*ServiceIamMember) ElementType() reflect.Type

func (*ServiceIamMember) ToOutput added in v6.65.1

func (*ServiceIamMember) ToServiceIamMemberOutput

func (i *ServiceIamMember) ToServiceIamMemberOutput() ServiceIamMemberOutput

func (*ServiceIamMember) ToServiceIamMemberOutputWithContext

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

type ServiceIamMemberArgs

type ServiceIamMemberArgs struct {
	Condition ServiceIamMemberConditionPtrInput
	Member    pulumi.StringInput
	// Used to find the parent resource to bind the IAM policy to
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	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

type ServiceIamMemberArray []ServiceIamMemberInput

func (ServiceIamMemberArray) ElementType

func (ServiceIamMemberArray) ElementType() reflect.Type

func (ServiceIamMemberArray) ToOutput added in v6.65.1

func (ServiceIamMemberArray) ToServiceIamMemberArrayOutput

func (i ServiceIamMemberArray) ToServiceIamMemberArrayOutput() ServiceIamMemberArrayOutput

func (ServiceIamMemberArray) ToServiceIamMemberArrayOutputWithContext

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

type ServiceIamMemberArrayInput

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

type ServiceIamMemberArrayOutput struct{ *pulumi.OutputState }

func (ServiceIamMemberArrayOutput) ElementType

func (ServiceIamMemberArrayOutput) Index

func (ServiceIamMemberArrayOutput) ToOutput added in v6.65.1

func (ServiceIamMemberArrayOutput) ToServiceIamMemberArrayOutput

func (o ServiceIamMemberArrayOutput) ToServiceIamMemberArrayOutput() ServiceIamMemberArrayOutput

func (ServiceIamMemberArrayOutput) ToServiceIamMemberArrayOutputWithContext

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) ToOutput added in v6.65.1

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) ToOutput added in v6.65.1

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) ToOutput added in v6.65.1

func (ServiceIamMemberConditionPtrOutput) ToServiceIamMemberConditionPtrOutput

func (o ServiceIamMemberConditionPtrOutput) ToServiceIamMemberConditionPtrOutput() ServiceIamMemberConditionPtrOutput

func (ServiceIamMemberConditionPtrOutput) ToServiceIamMemberConditionPtrOutputWithContext

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

type ServiceIamMemberInput

type ServiceIamMemberInput interface {
	pulumi.Input

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

type ServiceIamMemberMap

type ServiceIamMemberMap map[string]ServiceIamMemberInput

func (ServiceIamMemberMap) ElementType

func (ServiceIamMemberMap) ElementType() reflect.Type

func (ServiceIamMemberMap) ToOutput added in v6.65.1

func (ServiceIamMemberMap) ToServiceIamMemberMapOutput

func (i ServiceIamMemberMap) ToServiceIamMemberMapOutput() ServiceIamMemberMapOutput

func (ServiceIamMemberMap) ToServiceIamMemberMapOutputWithContext

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

type ServiceIamMemberMapInput

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

type ServiceIamMemberMapOutput struct{ *pulumi.OutputState }

func (ServiceIamMemberMapOutput) ElementType

func (ServiceIamMemberMapOutput) ElementType() reflect.Type

func (ServiceIamMemberMapOutput) MapIndex

func (ServiceIamMemberMapOutput) ToOutput added in v6.65.1

func (ServiceIamMemberMapOutput) ToServiceIamMemberMapOutput

func (o ServiceIamMemberMapOutput) ToServiceIamMemberMapOutput() ServiceIamMemberMapOutput

func (ServiceIamMemberMapOutput) ToServiceIamMemberMapOutputWithContext

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

type ServiceIamMemberOutput

type ServiceIamMemberOutput struct{ *pulumi.OutputState }

func (ServiceIamMemberOutput) Condition added in v6.23.0

func (ServiceIamMemberOutput) ElementType

func (ServiceIamMemberOutput) ElementType() reflect.Type

func (ServiceIamMemberOutput) Etag added in v6.23.0

(Computed) The etag of the IAM policy.

func (ServiceIamMemberOutput) Member added in v6.23.0

func (ServiceIamMemberOutput) Name added in v6.23.0

Used to find the parent resource to bind the IAM policy to

  • `member/members` - (Required) Identities that will be granted the privilege in `role`. Each entry can have one of the following values:
  • **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
  • **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
  • **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
  • **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
  • **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
  • **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
  • **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"

func (ServiceIamMemberOutput) Role added in v6.23.0

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}`.

func (ServiceIamMemberOutput) ToOutput added in v6.65.1

func (ServiceIamMemberOutput) ToServiceIamMemberOutput

func (o ServiceIamMemberOutput) ToServiceIamMemberOutput() ServiceIamMemberOutput

func (ServiceIamMemberOutput) ToServiceIamMemberOutputWithContext

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

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
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	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
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	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.

A data source can be used to retrieve policy data in advent you do not need creation

* `servicedirectory.ServiceIamPolicy`: Retrieves the IAM policy for the service

> **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/v6/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		admin, err := organizations.LookupIAMPolicy(ctx, &organizations.LookupIAMPolicyArgs{
			Bindings: []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),
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		return nil
	})
}

```

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

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v3/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"),
			},
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		return nil
	})
}

```

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

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/servicedirectory"
"github.com/pulumi/pulumi/sdk/v3/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"),
		}, pulumi.Provider(google_beta))
		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

func (*ServiceIamPolicy) ElementType() reflect.Type

func (*ServiceIamPolicy) ToOutput added in v6.65.1

func (*ServiceIamPolicy) ToServiceIamPolicyOutput

func (i *ServiceIamPolicy) ToServiceIamPolicyOutput() ServiceIamPolicyOutput

func (*ServiceIamPolicy) ToServiceIamPolicyOutputWithContext

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

type ServiceIamPolicyArgs

type ServiceIamPolicyArgs struct {
	// Used to find the parent resource to bind the IAM policy to
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	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

type ServiceIamPolicyArray []ServiceIamPolicyInput

func (ServiceIamPolicyArray) ElementType

func (ServiceIamPolicyArray) ElementType() reflect.Type

func (ServiceIamPolicyArray) ToOutput added in v6.65.1

func (ServiceIamPolicyArray) ToServiceIamPolicyArrayOutput

func (i ServiceIamPolicyArray) ToServiceIamPolicyArrayOutput() ServiceIamPolicyArrayOutput

func (ServiceIamPolicyArray) ToServiceIamPolicyArrayOutputWithContext

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

type ServiceIamPolicyArrayInput

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

type ServiceIamPolicyArrayOutput struct{ *pulumi.OutputState }

func (ServiceIamPolicyArrayOutput) ElementType

func (ServiceIamPolicyArrayOutput) Index

func (ServiceIamPolicyArrayOutput) ToOutput added in v6.65.1

func (ServiceIamPolicyArrayOutput) ToServiceIamPolicyArrayOutput

func (o ServiceIamPolicyArrayOutput) ToServiceIamPolicyArrayOutput() ServiceIamPolicyArrayOutput

func (ServiceIamPolicyArrayOutput) ToServiceIamPolicyArrayOutputWithContext

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

type ServiceIamPolicyInput

type ServiceIamPolicyInput interface {
	pulumi.Input

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

type ServiceIamPolicyMap

type ServiceIamPolicyMap map[string]ServiceIamPolicyInput

func (ServiceIamPolicyMap) ElementType

func (ServiceIamPolicyMap) ElementType() reflect.Type

func (ServiceIamPolicyMap) ToOutput added in v6.65.1

func (ServiceIamPolicyMap) ToServiceIamPolicyMapOutput

func (i ServiceIamPolicyMap) ToServiceIamPolicyMapOutput() ServiceIamPolicyMapOutput

func (ServiceIamPolicyMap) ToServiceIamPolicyMapOutputWithContext

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

type ServiceIamPolicyMapInput

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

type ServiceIamPolicyMapOutput struct{ *pulumi.OutputState }

func (ServiceIamPolicyMapOutput) ElementType

func (ServiceIamPolicyMapOutput) ElementType() reflect.Type

func (ServiceIamPolicyMapOutput) MapIndex

func (ServiceIamPolicyMapOutput) ToOutput added in v6.65.1

func (ServiceIamPolicyMapOutput) ToServiceIamPolicyMapOutput

func (o ServiceIamPolicyMapOutput) ToServiceIamPolicyMapOutput() ServiceIamPolicyMapOutput

func (ServiceIamPolicyMapOutput) ToServiceIamPolicyMapOutputWithContext

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

type ServiceIamPolicyOutput

type ServiceIamPolicyOutput struct{ *pulumi.OutputState }

func (ServiceIamPolicyOutput) ElementType

func (ServiceIamPolicyOutput) ElementType() reflect.Type

func (ServiceIamPolicyOutput) Etag added in v6.23.0

(Computed) The etag of the IAM policy.

func (ServiceIamPolicyOutput) Name added in v6.23.0

Used to find the parent resource to bind the IAM policy to

  • `member/members` - (Required) Identities that will be granted the privilege in `role`. Each entry can have one of the following values:
  • **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
  • **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
  • **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
  • **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
  • **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
  • **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
  • **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"

func (ServiceIamPolicyOutput) PolicyData added in v6.23.0

The policy data generated by a `organizations.getIAMPolicy` data source.

func (ServiceIamPolicyOutput) ToOutput added in v6.65.1

func (ServiceIamPolicyOutput) ToServiceIamPolicyOutput

func (o ServiceIamPolicyOutput) ToServiceIamPolicyOutput() ServiceIamPolicyOutput

func (ServiceIamPolicyOutput) ToServiceIamPolicyOutputWithContext

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

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
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	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

type ServiceInput interface {
	pulumi.Input

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

type ServiceMap

type ServiceMap map[string]ServiceInput

func (ServiceMap) ElementType

func (ServiceMap) ElementType() reflect.Type

func (ServiceMap) ToOutput added in v6.65.1

func (i ServiceMap) ToOutput(ctx context.Context) pulumix.Output[map[string]*Service]

func (ServiceMap) ToServiceMapOutput

func (i ServiceMap) ToServiceMapOutput() ServiceMapOutput

func (ServiceMap) ToServiceMapOutputWithContext

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

type ServiceMapInput

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

type ServiceMapOutput struct{ *pulumi.OutputState }

func (ServiceMapOutput) ElementType

func (ServiceMapOutput) ElementType() reflect.Type

func (ServiceMapOutput) MapIndex

func (ServiceMapOutput) ToOutput added in v6.65.1

func (ServiceMapOutput) ToServiceMapOutput

func (o ServiceMapOutput) ToServiceMapOutput() ServiceMapOutput

func (ServiceMapOutput) ToServiceMapOutputWithContext

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

type ServiceOutput

type ServiceOutput struct{ *pulumi.OutputState }

func (ServiceOutput) ElementType

func (ServiceOutput) ElementType() reflect.Type

func (ServiceOutput) Metadata added in v6.23.0

func (o ServiceOutput) Metadata() pulumi.StringMapOutput

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.

func (ServiceOutput) Name added in v6.23.0

The resource name for the service in the format `projects/*/locations/*/namespaces/*/services/*`.

func (ServiceOutput) Namespace added in v6.23.0

func (o ServiceOutput) Namespace() pulumi.StringOutput

The resource name of the namespace this service will belong to.

func (ServiceOutput) ServiceId added in v6.23.0

func (o ServiceOutput) ServiceId() pulumi.StringOutput

The Resource ID must be 1-63 characters long, including digits, lowercase letters or the hyphen character.

***

func (ServiceOutput) ToOutput added in v6.65.1

func (o ServiceOutput) ToOutput(ctx context.Context) pulumix.Output[*Service]

func (ServiceOutput) ToServiceOutput

func (o ServiceOutput) ToServiceOutput() ServiceOutput

func (ServiceOutput) ToServiceOutputWithContext

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

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