This page documents the language specification for the gcp package. If you're looking for help working with the inputs, outputs, or functions of gcp resources in a Pulumi program, please see the resource documentation for examples and API reference.

endpoints

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-gcp repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-google repo.

class pulumi_gcp.endpoints.Service(resource_name, opts=None, grpc_config=None, openapi_config=None, project=None, protoc_output_base64=None, service_name=None, __props__=None, __name__=None, __opts__=None)

This resource creates and rolls out a Cloud Endpoints service using OpenAPI or gRPC. View the relevant docs for OpenAPI and gRPC.

Parameters
static get(resource_name, id, opts=None, apis=None, config_id=None, dns_address=None, endpoints=None, grpc_config=None, openapi_config=None, project=None, protoc_output_base64=None, service_name=None)

Get an existing Service resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

The apis object supports the following:

  • methods (pulumi.Input[list])

    • name (pulumi.Input[str])

    • requestType (pulumi.Input[str])

    • responseType (pulumi.Input[str])

    • syntax (pulumi.Input[str])

  • name (pulumi.Input[str])

  • syntax (pulumi.Input[str])

  • version (pulumi.Input[str])

The endpoints object supports the following:

  • address (pulumi.Input[str])

  • name (pulumi.Input[str])

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_gcp.endpoints.ServiceIamBinding(resource_name, opts=None, condition=None, members=None, role=None, service_name=None, __props__=None, __name__=None, __opts__=None)

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

  • endpoints.ServiceIamPolicy: Authoritative. Sets the IAM policy for the service and replaces any existing policy already attached.

  • endpoints.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.

  • endpoints.ServiceIamMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the service are preserved.

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

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

import pulumi
import pulumi_gcp as gcp

admin = gcp.organizations.get_iam_policy(binding=[{
    "role": "roles/viewer",
    "members": ["user:jane@example.com"],
}])
policy = gcp.endpoints.ServiceIamPolicy("policy",
    service_name=google_endpoints_service["endpoints_service"]["service_name"],
    policy_data=admin.policy_data)
import pulumi
import pulumi_gcp as gcp

binding = gcp.endpoints.ServiceIamBinding("binding",
    service_name=google_endpoints_service["endpoints_service"]["service_name"],
    role="roles/viewer",
    members=["user:jane@example.com"])
import pulumi
import pulumi_gcp as gcp

member = gcp.endpoints.ServiceIamMember("member",
    service_name=google_endpoints_service["endpoints_service"]["service_name"],
    role="roles/viewer",
    member="user:jane@example.com")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • role (pulumi.Input[str]) – The role that should be applied. Only one endpoints.ServiceIamBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

  • service_name (pulumi.Input[str]) – The name of the service. Used to find the parent resource to bind the IAM policy to

The condition object supports the following:

  • description (pulumi.Input[str])

  • expression (pulumi.Input[str])

  • title (pulumi.Input[str])

etag: pulumi.Output[str] = None

(Computed) The etag of the IAM policy.

role: pulumi.Output[str] = None

The role that should be applied. Only one endpoints.ServiceIamBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

service_name: pulumi.Output[str] = None

The name of the service. Used to find the parent resource to bind the IAM policy to

static get(resource_name, id, opts=None, condition=None, etag=None, members=None, role=None, service_name=None)

Get an existing ServiceIamBinding resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • etag (pulumi.Input[str]) – (Computed) The etag of the IAM policy.

  • role (pulumi.Input[str]) – The role that should be applied. Only one endpoints.ServiceIamBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

  • service_name (pulumi.Input[str]) – The name of the service. Used to find the parent resource to bind the IAM policy to

The condition object supports the following:

  • description (pulumi.Input[str])

  • expression (pulumi.Input[str])

  • title (pulumi.Input[str])

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_gcp.endpoints.ServiceIamMember(resource_name, opts=None, condition=None, member=None, role=None, service_name=None, __props__=None, __name__=None, __opts__=None)

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

  • endpoints.ServiceIamPolicy: Authoritative. Sets the IAM policy for the service and replaces any existing policy already attached.

  • endpoints.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.

  • endpoints.ServiceIamMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the service are preserved.

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

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

import pulumi
import pulumi_gcp as gcp

admin = gcp.organizations.get_iam_policy(binding=[{
    "role": "roles/viewer",
    "members": ["user:jane@example.com"],
}])
policy = gcp.endpoints.ServiceIamPolicy("policy",
    service_name=google_endpoints_service["endpoints_service"]["service_name"],
    policy_data=admin.policy_data)
import pulumi
import pulumi_gcp as gcp

binding = gcp.endpoints.ServiceIamBinding("binding",
    service_name=google_endpoints_service["endpoints_service"]["service_name"],
    role="roles/viewer",
    members=["user:jane@example.com"])
import pulumi
import pulumi_gcp as gcp

member = gcp.endpoints.ServiceIamMember("member",
    service_name=google_endpoints_service["endpoints_service"]["service_name"],
    role="roles/viewer",
    member="user:jane@example.com")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • role (pulumi.Input[str]) – The role that should be applied. Only one endpoints.ServiceIamBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

  • service_name (pulumi.Input[str]) – The name of the service. Used to find the parent resource to bind the IAM policy to

The condition object supports the following:

  • description (pulumi.Input[str])

  • expression (pulumi.Input[str])

  • title (pulumi.Input[str])

etag: pulumi.Output[str] = None

(Computed) The etag of the IAM policy.

role: pulumi.Output[str] = None

The role that should be applied. Only one endpoints.ServiceIamBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

service_name: pulumi.Output[str] = None

The name of the service. Used to find the parent resource to bind the IAM policy to

static get(resource_name, id, opts=None, condition=None, etag=None, member=None, role=None, service_name=None)

Get an existing ServiceIamMember resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • etag (pulumi.Input[str]) – (Computed) The etag of the IAM policy.

  • role (pulumi.Input[str]) – The role that should be applied. Only one endpoints.ServiceIamBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

  • service_name (pulumi.Input[str]) – The name of the service. Used to find the parent resource to bind the IAM policy to

The condition object supports the following:

  • description (pulumi.Input[str])

  • expression (pulumi.Input[str])

  • title (pulumi.Input[str])

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_gcp.endpoints.ServiceIamPolicy(resource_name, opts=None, policy_data=None, service_name=None, __props__=None, __name__=None, __opts__=None)

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

  • endpoints.ServiceIamPolicy: Authoritative. Sets the IAM policy for the service and replaces any existing policy already attached.

  • endpoints.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.

  • endpoints.ServiceIamMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the service are preserved.

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

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

import pulumi
import pulumi_gcp as gcp

admin = gcp.organizations.get_iam_policy(binding=[{
    "role": "roles/viewer",
    "members": ["user:jane@example.com"],
}])
policy = gcp.endpoints.ServiceIamPolicy("policy",
    service_name=google_endpoints_service["endpoints_service"]["service_name"],
    policy_data=admin.policy_data)
import pulumi
import pulumi_gcp as gcp

binding = gcp.endpoints.ServiceIamBinding("binding",
    service_name=google_endpoints_service["endpoints_service"]["service_name"],
    role="roles/viewer",
    members=["user:jane@example.com"])
import pulumi
import pulumi_gcp as gcp

member = gcp.endpoints.ServiceIamMember("member",
    service_name=google_endpoints_service["endpoints_service"]["service_name"],
    role="roles/viewer",
    member="user:jane@example.com")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • policy_data (pulumi.Input[str]) – The policy data generated by a organizations.getIAMPolicy data source.

  • service_name (pulumi.Input[str]) – The name of the service. Used to find the parent resource to bind the IAM policy to

etag: pulumi.Output[str] = None

(Computed) The etag of the IAM policy.

policy_data: pulumi.Output[str] = None

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

service_name: pulumi.Output[str] = None

The name of the service. Used to find the parent resource to bind the IAM policy to

static get(resource_name, id, opts=None, etag=None, policy_data=None, service_name=None)

Get an existing ServiceIamPolicy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • etag (pulumi.Input[str]) – (Computed) The etag of the IAM policy.

  • policy_data (pulumi.Input[str]) – The policy data generated by a organizations.getIAMPolicy data source.

  • service_name (pulumi.Input[str]) – The name of the service. Used to find the parent resource to bind the IAM policy to

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str