1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. apigateway
  5. Gateway
Google Cloud Classic v7.19.0 published on Thursday, Apr 18, 2024 by Pulumi

gcp.apigateway.Gateway

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.19.0 published on Thursday, Apr 18, 2024 by Pulumi

    A consumable API that can be used by multiple Gateways.

    To get more information about Gateway, see:

    Example Usage

    Apigateway Gateway Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    import * as std from "@pulumi/std";
    
    const apiGw = new gcp.apigateway.Api("api_gw", {apiId: "my-api"});
    const apiGwApiConfig = new gcp.apigateway.ApiConfig("api_gw", {
        api: apiGw.apiId,
        apiConfigId: "my-config",
        openapiDocuments: [{
            document: {
                path: "spec.yaml",
                contents: std.filebase64({
                    input: "test-fixtures/openapi.yaml",
                }).then(invoke => invoke.result),
            },
        }],
    });
    const apiGwGateway = new gcp.apigateway.Gateway("api_gw", {
        apiConfig: apiGwApiConfig.id,
        gatewayId: "my-gateway",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    import pulumi_std as std
    
    api_gw = gcp.apigateway.Api("api_gw", api_id="my-api")
    api_gw_api_config = gcp.apigateway.ApiConfig("api_gw",
        api=api_gw.api_id,
        api_config_id="my-config",
        openapi_documents=[gcp.apigateway.ApiConfigOpenapiDocumentArgs(
            document=gcp.apigateway.ApiConfigOpenapiDocumentDocumentArgs(
                path="spec.yaml",
                contents=std.filebase64(input="test-fixtures/openapi.yaml").result,
            ),
        )])
    api_gw_gateway = gcp.apigateway.Gateway("api_gw",
        api_config=api_gw_api_config.id,
        gateway_id="my-gateway")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/apigateway"
    	"github.com/pulumi/pulumi-std/sdk/go/std"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		apiGw, err := apigateway.NewApi(ctx, "api_gw", &apigateway.ApiArgs{
    			ApiId: pulumi.String("my-api"),
    		})
    		if err != nil {
    			return err
    		}
    		invokeFilebase64, err := std.Filebase64(ctx, &std.Filebase64Args{
    			Input: "test-fixtures/openapi.yaml",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		apiGwApiConfig, err := apigateway.NewApiConfig(ctx, "api_gw", &apigateway.ApiConfigArgs{
    			Api:         apiGw.ApiId,
    			ApiConfigId: pulumi.String("my-config"),
    			OpenapiDocuments: apigateway.ApiConfigOpenapiDocumentArray{
    				&apigateway.ApiConfigOpenapiDocumentArgs{
    					Document: &apigateway.ApiConfigOpenapiDocumentDocumentArgs{
    						Path:     pulumi.String("spec.yaml"),
    						Contents: invokeFilebase64.Result,
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = apigateway.NewGateway(ctx, "api_gw", &apigateway.GatewayArgs{
    			ApiConfig: apiGwApiConfig.ID(),
    			GatewayId: pulumi.String("my-gateway"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    using Std = Pulumi.Std;
    
    return await Deployment.RunAsync(() => 
    {
        var apiGw = new Gcp.ApiGateway.Api("api_gw", new()
        {
            ApiId = "my-api",
        });
    
        var apiGwApiConfig = new Gcp.ApiGateway.ApiConfig("api_gw", new()
        {
            Api = apiGw.ApiId,
            ApiConfigId = "my-config",
            OpenapiDocuments = new[]
            {
                new Gcp.ApiGateway.Inputs.ApiConfigOpenapiDocumentArgs
                {
                    Document = new Gcp.ApiGateway.Inputs.ApiConfigOpenapiDocumentDocumentArgs
                    {
                        Path = "spec.yaml",
                        Contents = Std.Filebase64.Invoke(new()
                        {
                            Input = "test-fixtures/openapi.yaml",
                        }).Apply(invoke => invoke.Result),
                    },
                },
            },
        });
    
        var apiGwGateway = new Gcp.ApiGateway.Gateway("api_gw", new()
        {
            ApiConfig = apiGwApiConfig.Id,
            GatewayId = "my-gateway",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.apigateway.Api;
    import com.pulumi.gcp.apigateway.ApiArgs;
    import com.pulumi.gcp.apigateway.ApiConfig;
    import com.pulumi.gcp.apigateway.ApiConfigArgs;
    import com.pulumi.gcp.apigateway.inputs.ApiConfigOpenapiDocumentArgs;
    import com.pulumi.gcp.apigateway.inputs.ApiConfigOpenapiDocumentDocumentArgs;
    import com.pulumi.gcp.apigateway.Gateway;
    import com.pulumi.gcp.apigateway.GatewayArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var apiGw = new Api("apiGw", ApiArgs.builder()        
                .apiId("my-api")
                .build());
    
            var apiGwApiConfig = new ApiConfig("apiGwApiConfig", ApiConfigArgs.builder()        
                .api(apiGw.apiId())
                .apiConfigId("my-config")
                .openapiDocuments(ApiConfigOpenapiDocumentArgs.builder()
                    .document(ApiConfigOpenapiDocumentDocumentArgs.builder()
                        .path("spec.yaml")
                        .contents(StdFunctions.filebase64(Filebase64Args.builder()
                            .input("test-fixtures/openapi.yaml")
                            .build()).result())
                        .build())
                    .build())
                .build());
    
            var apiGwGateway = new Gateway("apiGwGateway", GatewayArgs.builder()        
                .apiConfig(apiGwApiConfig.id())
                .gatewayId("my-gateway")
                .build());
    
        }
    }
    
    resources:
      apiGw:
        type: gcp:apigateway:Api
        name: api_gw
        properties:
          apiId: my-api
      apiGwApiConfig:
        type: gcp:apigateway:ApiConfig
        name: api_gw
        properties:
          api: ${apiGw.apiId}
          apiConfigId: my-config
          openapiDocuments:
            - document:
                path: spec.yaml
                contents:
                  fn::invoke:
                    Function: std:filebase64
                    Arguments:
                      input: test-fixtures/openapi.yaml
                    Return: result
      apiGwGateway:
        type: gcp:apigateway:Gateway
        name: api_gw
        properties:
          apiConfig: ${apiGwApiConfig.id}
          gatewayId: my-gateway
    

    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.

    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

    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 v7.19.0 published on Thursday, Apr 18, 2024 by Pulumi