gcp.apigateway.Gateway
Explore with Pulumi AI
A consumable API that can be used by multiple Gateways.
To get more information about Gateway, see:
- API documentation
- How-to Guides
Example Usage
Create Gateway Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Gateway(name: string, args: GatewayArgs, opts?: CustomResourceOptions);
@overload
def Gateway(resource_name: str,
args: GatewayArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Gateway(resource_name: str,
opts: Optional[ResourceOptions] = None,
api_config: Optional[str] = None,
gateway_id: Optional[str] = None,
display_name: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
project: Optional[str] = None,
region: Optional[str] = None)
func NewGateway(ctx *Context, name string, args GatewayArgs, opts ...ResourceOption) (*Gateway, error)
public Gateway(string name, GatewayArgs args, CustomResourceOptions? opts = null)
public Gateway(String name, GatewayArgs args)
public Gateway(String name, GatewayArgs args, CustomResourceOptions options)
type: gcp:apigateway:Gateway
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args GatewayArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args GatewayArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args GatewayArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GatewayArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GatewayArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var gatewayResource = new Gcp.ApiGateway.Gateway("gatewayResource", new()
{
ApiConfig = "string",
GatewayId = "string",
DisplayName = "string",
Labels =
{
{ "string", "string" },
},
Project = "string",
Region = "string",
});
example, err := apigateway.NewGateway(ctx, "gatewayResource", &apigateway.GatewayArgs{
ApiConfig: pulumi.String("string"),
GatewayId: pulumi.String("string"),
DisplayName: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Project: pulumi.String("string"),
Region: pulumi.String("string"),
})
var gatewayResource = new Gateway("gatewayResource", GatewayArgs.builder()
.apiConfig("string")
.gatewayId("string")
.displayName("string")
.labels(Map.of("string", "string"))
.project("string")
.region("string")
.build());
gateway_resource = gcp.apigateway.Gateway("gatewayResource",
api_config="string",
gateway_id="string",
display_name="string",
labels={
"string": "string",
},
project="string",
region="string")
const gatewayResource = new gcp.apigateway.Gateway("gatewayResource", {
apiConfig: "string",
gatewayId: "string",
displayName: "string",
labels: {
string: "string",
},
project: "string",
region: "string",
});
type: gcp:apigateway:Gateway
properties:
apiConfig: string
displayName: string
gatewayId: string
labels:
string: string
project: string
region: string
Gateway Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Gateway resource accepts the following input properties:
- Api
Config string - Resource name of the API Config for this Gateway. Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}.
When changing api configs please ensure the new config is a new resource and the
lifecycle rule
create_before_destroy
is set. - Gateway
Id string - Identifier to assign to the Gateway. Must be unique within scope of the parent resource(project).
- Display
Name string - A user-visible name for the API.
- Labels Dictionary<string, string>
Resource labels to represent user-provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Region string
- The region of the gateway for the API.
- Api
Config string - Resource name of the API Config for this Gateway. Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}.
When changing api configs please ensure the new config is a new resource and the
lifecycle rule
create_before_destroy
is set. - Gateway
Id string - Identifier to assign to the Gateway. Must be unique within scope of the parent resource(project).
- Display
Name string - A user-visible name for the API.
- Labels map[string]string
Resource labels to represent user-provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Region string
- The region of the gateway for the API.
- api
Config String - Resource name of the API Config for this Gateway. Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}.
When changing api configs please ensure the new config is a new resource and the
lifecycle rule
create_before_destroy
is set. - gateway
Id String - Identifier to assign to the Gateway. Must be unique within scope of the parent resource(project).
- display
Name String - A user-visible name for the API.
- labels Map<String,String>
Resource labels to represent user-provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region String
- The region of the gateway for the API.
- api
Config string - Resource name of the API Config for this Gateway. Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}.
When changing api configs please ensure the new config is a new resource and the
lifecycle rule
create_before_destroy
is set. - gateway
Id string - Identifier to assign to the Gateway. Must be unique within scope of the parent resource(project).
- display
Name string - A user-visible name for the API.
- labels {[key: string]: string}
Resource labels to represent user-provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region string
- The region of the gateway for the API.
- api_
config str - Resource name of the API Config for this Gateway. Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}.
When changing api configs please ensure the new config is a new resource and the
lifecycle rule
create_before_destroy
is set. - gateway_
id str - Identifier to assign to the Gateway. Must be unique within scope of the parent resource(project).
- display_
name str - A user-visible name for the API.
- labels Mapping[str, str]
Resource labels to represent user-provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region str
- The region of the gateway for the API.
- api
Config String - Resource name of the API Config for this Gateway. Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}.
When changing api configs please ensure the new config is a new resource and the
lifecycle rule
create_before_destroy
is set. - gateway
Id String - Identifier to assign to the Gateway. Must be unique within scope of the parent resource(project).
- display
Name String - A user-visible name for the API.
- labels Map<String>
Resource labels to represent user-provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region String
- The region of the gateway for the API.
Outputs
All input properties are implicitly available as output properties. Additionally, the Gateway resource produces the following output properties:
- Default
Hostname string - The default API Gateway host name of the form {gatewayId}-{hash}.{region_code}.gateway.dev.
- Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Resource name of the Gateway. Format: projects/{project}/locations/{region}/gateways/{gateway}
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Default
Hostname string - The default API Gateway host name of the form {gatewayId}-{hash}.{region_code}.gateway.dev.
- Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Resource name of the Gateway. Format: projects/{project}/locations/{region}/gateways/{gateway}
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- default
Hostname String - The default API Gateway host name of the form {gatewayId}-{hash}.{region_code}.gateway.dev.
- effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Resource name of the Gateway. Format: projects/{project}/locations/{region}/gateways/{gateway}
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- default
Hostname string - The default API Gateway host name of the form {gatewayId}-{hash}.{region_code}.gateway.dev.
- effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Resource name of the Gateway. Format: projects/{project}/locations/{region}/gateways/{gateway}
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- default_
hostname str - The default API Gateway host name of the form {gatewayId}-{hash}.{region_code}.gateway.dev.
- effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- Resource name of the Gateway. Format: projects/{project}/locations/{region}/gateways/{gateway}
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- default
Hostname String - The default API Gateway host name of the form {gatewayId}-{hash}.{region_code}.gateway.dev.
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Resource name of the Gateway. Format: projects/{project}/locations/{region}/gateways/{gateway}
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
Look up Existing Gateway Resource
Get an existing Gateway resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: GatewayState, opts?: CustomResourceOptions): Gateway
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
api_config: Optional[str] = None,
default_hostname: Optional[str] = None,
display_name: Optional[str] = None,
effective_labels: Optional[Mapping[str, str]] = None,
gateway_id: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
project: Optional[str] = None,
pulumi_labels: Optional[Mapping[str, str]] = None,
region: Optional[str] = None) -> Gateway
func GetGateway(ctx *Context, name string, id IDInput, state *GatewayState, opts ...ResourceOption) (*Gateway, error)
public static Gateway Get(string name, Input<string> id, GatewayState? state, CustomResourceOptions? opts = null)
public static Gateway get(String name, Output<String> id, GatewayState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Api
Config string - Resource name of the API Config for this Gateway. Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}.
When changing api configs please ensure the new config is a new resource and the
lifecycle rule
create_before_destroy
is set. - Default
Hostname string - The default API Gateway host name of the form {gatewayId}-{hash}.{region_code}.gateway.dev.
- Display
Name string - A user-visible name for the API.
- Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Gateway
Id string - Identifier to assign to the Gateway. Must be unique within scope of the parent resource(project).
- Labels Dictionary<string, string>
Resource labels to represent user-provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- Name string
- Resource name of the Gateway. Format: projects/{project}/locations/{region}/gateways/{gateway}
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Region string
- The region of the gateway for the API.
- Api
Config string - Resource name of the API Config for this Gateway. Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}.
When changing api configs please ensure the new config is a new resource and the
lifecycle rule
create_before_destroy
is set. - Default
Hostname string - The default API Gateway host name of the form {gatewayId}-{hash}.{region_code}.gateway.dev.
- Display
Name string - A user-visible name for the API.
- Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Gateway
Id string - Identifier to assign to the Gateway. Must be unique within scope of the parent resource(project).
- Labels map[string]string
Resource labels to represent user-provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- Name string
- Resource name of the Gateway. Format: projects/{project}/locations/{region}/gateways/{gateway}
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Region string
- The region of the gateway for the API.
- api
Config String - Resource name of the API Config for this Gateway. Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}.
When changing api configs please ensure the new config is a new resource and the
lifecycle rule
create_before_destroy
is set. - default
Hostname String - The default API Gateway host name of the form {gatewayId}-{hash}.{region_code}.gateway.dev.
- display
Name String - A user-visible name for the API.
- effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- gateway
Id String - Identifier to assign to the Gateway. Must be unique within scope of the parent resource(project).
- labels Map<String,String>
Resource labels to represent user-provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- name String
- Resource name of the Gateway. Format: projects/{project}/locations/{region}/gateways/{gateway}
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- region String
- The region of the gateway for the API.
- api
Config string - Resource name of the API Config for this Gateway. Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}.
When changing api configs please ensure the new config is a new resource and the
lifecycle rule
create_before_destroy
is set. - default
Hostname string - The default API Gateway host name of the form {gatewayId}-{hash}.{region_code}.gateway.dev.
- display
Name string - A user-visible name for the API.
- effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- gateway
Id string - Identifier to assign to the Gateway. Must be unique within scope of the parent resource(project).
- labels {[key: string]: string}
Resource labels to represent user-provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- name string
- Resource name of the Gateway. Format: projects/{project}/locations/{region}/gateways/{gateway}
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- region string
- The region of the gateway for the API.
- api_
config str - Resource name of the API Config for this Gateway. Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}.
When changing api configs please ensure the new config is a new resource and the
lifecycle rule
create_before_destroy
is set. - default_
hostname str - The default API Gateway host name of the form {gatewayId}-{hash}.{region_code}.gateway.dev.
- display_
name str - A user-visible name for the API.
- effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- gateway_
id str - Identifier to assign to the Gateway. Must be unique within scope of the parent resource(project).
- labels Mapping[str, str]
Resource labels to represent user-provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- name str
- Resource name of the Gateway. Format: projects/{project}/locations/{region}/gateways/{gateway}
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- region str
- The region of the gateway for the API.
- api
Config String - Resource name of the API Config for this Gateway. Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}.
When changing api configs please ensure the new config is a new resource and the
lifecycle rule
create_before_destroy
is set. - default
Hostname String - The default API Gateway host name of the form {gatewayId}-{hash}.{region_code}.gateway.dev.
- display
Name String - A user-visible name for the API.
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- gateway
Id String - Identifier to assign to the Gateway. Must be unique within scope of the parent resource(project).
- labels Map<String>
Resource labels to represent user-provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- name String
- Resource name of the Gateway. Format: projects/{project}/locations/{region}/gateways/{gateway}
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- region String
- The region of the gateway for the API.
Import
Gateway can be imported using any of these accepted formats:
projects/{{project}}/locations/{{region}}/gateways/{{gateway_id}}
{{project}}/{{region}}/{{gateway_id}}
{{region}}/{{gateway_id}}
{{gateway_id}}
When using the pulumi import
command, Gateway can be imported using one of the formats above. For example:
$ pulumi import gcp:apigateway/gateway:Gateway default projects/{{project}}/locations/{{region}}/gateways/{{gateway_id}}
$ pulumi import gcp:apigateway/gateway:Gateway default {{project}}/{{region}}/{{gateway_id}}
$ pulumi import gcp:apigateway/gateway:Gateway default {{region}}/{{gateway_id}}
$ pulumi import gcp:apigateway/gateway:Gateway default {{gateway_id}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-beta
Terraform Provider.