1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. apigateway
  5. Gateway
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

gcp.apigateway.Gateway

Explore with Pulumi AI

gcp logo
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

    A consumable API that can be used by multiple Gateways.

    To get more information about Gateway, see:

    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:

    ApiConfig 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.
    GatewayId string
    Identifier to assign to the Gateway. Must be unique within scope of the parent resource(project).


    DisplayName 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.
    ApiConfig 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.
    GatewayId string
    Identifier to assign to the Gateway. Must be unique within scope of the parent resource(project).


    DisplayName 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.
    apiConfig 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.
    gatewayId String
    Identifier to assign to the Gateway. Must be unique within scope of the parent resource(project).


    displayName 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.
    apiConfig 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.
    gatewayId string
    Identifier to assign to the Gateway. Must be unique within scope of the parent resource(project).


    displayName 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.
    apiConfig 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.
    gatewayId String
    Identifier to assign to the Gateway. Must be unique within scope of the parent resource(project).


    displayName 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:

    DefaultHostname string
    The default API Gateway host name of the form {gatewayId}-{hash}.{region_code}.gateway.dev.
    EffectiveLabels 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}
    PulumiLabels Dictionary<string, string>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    DefaultHostname string
    The default API Gateway host name of the form {gatewayId}-{hash}.{region_code}.gateway.dev.
    EffectiveLabels 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}
    PulumiLabels map[string]string
    The combination of labels configured directly on the resource and default labels configured on the provider.
    defaultHostname String
    The default API Gateway host name of the form {gatewayId}-{hash}.{region_code}.gateway.dev.
    effectiveLabels 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}
    pulumiLabels Map<String,String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    defaultHostname string
    The default API Gateway host name of the form {gatewayId}-{hash}.{region_code}.gateway.dev.
    effectiveLabels {[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}
    pulumiLabels {[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.
    defaultHostname String
    The default API Gateway host name of the form {gatewayId}-{hash}.{region_code}.gateway.dev.
    effectiveLabels 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}
    pulumiLabels 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.
    The following state arguments are supported:
    ApiConfig 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.
    DefaultHostname string
    The default API Gateway host name of the form {gatewayId}-{hash}.{region_code}.gateway.dev.
    DisplayName string
    A user-visible name for the API.
    EffectiveLabels 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.
    GatewayId 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.
    PulumiLabels 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.
    ApiConfig 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.
    DefaultHostname string
    The default API Gateway host name of the form {gatewayId}-{hash}.{region_code}.gateway.dev.
    DisplayName string
    A user-visible name for the API.
    EffectiveLabels 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.
    GatewayId 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.
    PulumiLabels 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.
    apiConfig 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.
    defaultHostname String
    The default API Gateway host name of the form {gatewayId}-{hash}.{region_code}.gateway.dev.
    displayName String
    A user-visible name for the API.
    effectiveLabels 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.
    gatewayId 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.
    pulumiLabels 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.
    apiConfig 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.
    defaultHostname string
    The default API Gateway host name of the form {gatewayId}-{hash}.{region_code}.gateway.dev.
    displayName string
    A user-visible name for the API.
    effectiveLabels {[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.
    gatewayId 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.
    pulumiLabels {[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.
    apiConfig 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.
    defaultHostname String
    The default API Gateway host name of the form {gatewayId}-{hash}.{region_code}.gateway.dev.
    displayName String
    A user-visible name for the API.
    effectiveLabels Map<String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    gatewayId 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.
    pulumiLabels 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.
    gcp logo
    Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi