gcp.apigateway.ApiConfig
Explore with Pulumi AI
An API Configuration is an association of an API Controller Config and a Gateway Config
To get more information about ApiConfig, see:
- API documentation
- How-to Guides
Example Usage
Apigateway Api Config Basic
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
private static string ReadFileBase64(string path) {
return Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(File.ReadAllText(path)));
}
return await Deployment.RunAsync(() =>
{
var apiCfgApi = new Gcp.ApiGateway.Api("apiCfgApi", new()
{
ApiId = "my-api",
}, new CustomResourceOptions
{
Provider = google_beta,
});
var apiCfgApiConfig = new Gcp.ApiGateway.ApiConfig("apiCfgApiConfig", new()
{
Api = apiCfgApi.ApiId,
ApiConfigId = "my-config",
OpenapiDocuments = new[]
{
new Gcp.ApiGateway.Inputs.ApiConfigOpenapiDocumentArgs
{
Document = new Gcp.ApiGateway.Inputs.ApiConfigOpenapiDocumentDocumentArgs
{
Path = "spec.yaml",
Contents = ReadFileBase64("test-fixtures/openapi.yaml"),
},
},
},
}, new CustomResourceOptions
{
Provider = google_beta,
});
});
package main
import (
"encoding/base64"
"os"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/apigateway"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func filebase64OrPanic(path string) pulumi.StringPtrInput {
if fileData, err := os.ReadFile(path); err == nil {
return pulumi.String(base64.StdEncoding.EncodeToString(fileData[:]))
} else {
panic(err.Error())
}
}
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
apiCfgApi, err := apigateway.NewApi(ctx, "apiCfgApi", &apigateway.ApiArgs{
ApiId: pulumi.String("my-api"),
}, pulumi.Provider(google_beta))
if err != nil {
return err
}
_, err = apigateway.NewApiConfig(ctx, "apiCfgApiConfig", &apigateway.ApiConfigArgs{
Api: apiCfgApi.ApiId,
ApiConfigId: pulumi.String("my-config"),
OpenapiDocuments: apigateway.ApiConfigOpenapiDocumentArray{
&apigateway.ApiConfigOpenapiDocumentArgs{
Document: &apigateway.ApiConfigOpenapiDocumentDocumentArgs{
Path: pulumi.String("spec.yaml"),
Contents: filebase64OrPanic("test-fixtures/openapi.yaml"),
},
},
},
}, pulumi.Provider(google_beta))
if err != nil {
return err
}
return nil
})
}
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.resources.CustomResourceOptions;
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 apiCfgApi = new Api("apiCfgApi", ApiArgs.builder()
.apiId("my-api")
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.build());
var apiCfgApiConfig = new ApiConfig("apiCfgApiConfig", ApiConfigArgs.builder()
.api(apiCfgApi.apiId())
.apiConfigId("my-config")
.openapiDocuments(ApiConfigOpenapiDocumentArgs.builder()
.document(ApiConfigOpenapiDocumentDocumentArgs.builder()
.path("spec.yaml")
.contents(Base64.getEncoder().encodeToString(Files.readAllBytes(Paths.get("test-fixtures/openapi.yaml"))))
.build())
.build())
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.build());
}
}
import pulumi
import base64
import pulumi_gcp as gcp
api_cfg_api = gcp.apigateway.Api("apiCfgApi", api_id="my-api",
opts=pulumi.ResourceOptions(provider=google_beta))
api_cfg_api_config = gcp.apigateway.ApiConfig("apiCfgApiConfig",
api=api_cfg_api.api_id,
api_config_id="my-config",
openapi_documents=[gcp.apigateway.ApiConfigOpenapiDocumentArgs(
document=gcp.apigateway.ApiConfigOpenapiDocumentDocumentArgs(
path="spec.yaml",
contents=(lambda path: base64.b64encode(open(path).read().encode()).decode())("test-fixtures/openapi.yaml"),
),
)],
opts=pulumi.ResourceOptions(provider=google_beta))
import * as pulumi from "@pulumi/pulumi";
import * as fs from "fs";
import * as gcp from "@pulumi/gcp";
const apiCfgApi = new gcp.apigateway.Api("apiCfgApi", {apiId: "my-api"}, {
provider: google_beta,
});
const apiCfgApiConfig = new gcp.apigateway.ApiConfig("apiCfgApiConfig", {
api: apiCfgApi.apiId,
apiConfigId: "my-config",
openapiDocuments: [{
document: {
path: "spec.yaml",
contents: Buffer.from(fs.readFileSync("test-fixtures/openapi.yaml"), 'binary').toString('base64'),
},
}],
}, {
provider: google_beta,
});
Coming soon!
Create ApiConfig Resource
new ApiConfig(name: string, args: ApiConfigArgs, opts?: CustomResourceOptions);
@overload
def ApiConfig(resource_name: str,
opts: Optional[ResourceOptions] = None,
api: Optional[str] = None,
api_config_id: Optional[str] = None,
api_config_id_prefix: Optional[str] = None,
display_name: Optional[str] = None,
gateway_config: Optional[ApiConfigGatewayConfigArgs] = None,
grpc_services: Optional[Sequence[ApiConfigGrpcServiceArgs]] = None,
labels: Optional[Mapping[str, str]] = None,
managed_service_configs: Optional[Sequence[ApiConfigManagedServiceConfigArgs]] = None,
openapi_documents: Optional[Sequence[ApiConfigOpenapiDocumentArgs]] = None,
project: Optional[str] = None)
@overload
def ApiConfig(resource_name: str,
args: ApiConfigArgs,
opts: Optional[ResourceOptions] = None)
func NewApiConfig(ctx *Context, name string, args ApiConfigArgs, opts ...ResourceOption) (*ApiConfig, error)
public ApiConfig(string name, ApiConfigArgs args, CustomResourceOptions? opts = null)
public ApiConfig(String name, ApiConfigArgs args)
public ApiConfig(String name, ApiConfigArgs args, CustomResourceOptions options)
type: gcp:apigateway:ApiConfig
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApiConfigArgs
- 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 ApiConfigArgs
- 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 ApiConfigArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApiConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ApiConfigArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ApiConfig 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 ApiConfig resource accepts the following input properties:
- Api string
The API to attach the config to.
- Api
Config stringId Identifier to assign to the API Config. Must be unique within scope of the parent resource(api).
- Api
Config stringId Prefix Creates a unique name beginning with the specified prefix. If this and api_config_id are unspecified, a random value is chosen for the name.
- Display
Name string A user-visible name for the API.
- Gateway
Config ApiConfig Gateway Config Immutable. Gateway specific configuration. If not specified, backend authentication will be set to use OIDC authentication using the default compute service account Structure is documented below.
- Grpc
Services List<ApiConfig Grpc Service> gRPC service definition files. If specified, openapiDocuments must not be included. Structure is documented below.
- Labels Dictionary<string, string>
Resource labels to represent user-provided metadata.
- Managed
Service List<ApiConfigs Config Managed Service Config> Optional. Service Configuration files. At least one must be included when using gRPC service definitions. See https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview for the expected file contents. If multiple files are specified, the files are merged with the following rules: * All singular scalar fields are merged using "last one wins" semantics in the order of the files uploaded. * Repeated fields are concatenated. * Singular embedded messages are merged using these rules for nested fields. Structure is documented below.
- Openapi
Documents List<ApiConfig Openapi Document> OpenAPI specification documents. If specified, grpcServices and managedServiceConfigs must not be included. Structure is documented below.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Api string
The API to attach the config to.
- Api
Config stringId Identifier to assign to the API Config. Must be unique within scope of the parent resource(api).
- Api
Config stringId Prefix Creates a unique name beginning with the specified prefix. If this and api_config_id are unspecified, a random value is chosen for the name.
- Display
Name string A user-visible name for the API.
- Gateway
Config ApiConfig Gateway Config Args Immutable. Gateway specific configuration. If not specified, backend authentication will be set to use OIDC authentication using the default compute service account Structure is documented below.
- Grpc
Services []ApiConfig Grpc Service Args gRPC service definition files. If specified, openapiDocuments must not be included. Structure is documented below.
- Labels map[string]string
Resource labels to represent user-provided metadata.
- Managed
Service []ApiConfigs Config Managed Service Config Args Optional. Service Configuration files. At least one must be included when using gRPC service definitions. See https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview for the expected file contents. If multiple files are specified, the files are merged with the following rules: * All singular scalar fields are merged using "last one wins" semantics in the order of the files uploaded. * Repeated fields are concatenated. * Singular embedded messages are merged using these rules for nested fields. Structure is documented below.
- Openapi
Documents []ApiConfig Openapi Document Args OpenAPI specification documents. If specified, grpcServices and managedServiceConfigs must not be included. Structure is documented below.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- api String
The API to attach the config to.
- api
Config StringId Identifier to assign to the API Config. Must be unique within scope of the parent resource(api).
- api
Config StringId Prefix Creates a unique name beginning with the specified prefix. If this and api_config_id are unspecified, a random value is chosen for the name.
- display
Name String A user-visible name for the API.
- gateway
Config ApiConfig Gateway Config Immutable. Gateway specific configuration. If not specified, backend authentication will be set to use OIDC authentication using the default compute service account Structure is documented below.
- grpc
Services List<ApiConfig Grpc Service> gRPC service definition files. If specified, openapiDocuments must not be included. Structure is documented below.
- labels Map<String,String>
Resource labels to represent user-provided metadata.
- managed
Service List<ApiConfigs Config Managed Service Config> Optional. Service Configuration files. At least one must be included when using gRPC service definitions. See https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview for the expected file contents. If multiple files are specified, the files are merged with the following rules: * All singular scalar fields are merged using "last one wins" semantics in the order of the files uploaded. * Repeated fields are concatenated. * Singular embedded messages are merged using these rules for nested fields. Structure is documented below.
- openapi
Documents List<ApiConfig Openapi Document> OpenAPI specification documents. If specified, grpcServices and managedServiceConfigs must not be included. Structure is documented below.
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- api string
The API to attach the config to.
- api
Config stringId Identifier to assign to the API Config. Must be unique within scope of the parent resource(api).
- api
Config stringId Prefix Creates a unique name beginning with the specified prefix. If this and api_config_id are unspecified, a random value is chosen for the name.
- display
Name string A user-visible name for the API.
- gateway
Config ApiConfig Gateway Config Immutable. Gateway specific configuration. If not specified, backend authentication will be set to use OIDC authentication using the default compute service account Structure is documented below.
- grpc
Services ApiConfig Grpc Service[] gRPC service definition files. If specified, openapiDocuments must not be included. Structure is documented below.
- labels {[key: string]: string}
Resource labels to represent user-provided metadata.
- managed
Service ApiConfigs Config Managed Service Config[] Optional. Service Configuration files. At least one must be included when using gRPC service definitions. See https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview for the expected file contents. If multiple files are specified, the files are merged with the following rules: * All singular scalar fields are merged using "last one wins" semantics in the order of the files uploaded. * Repeated fields are concatenated. * Singular embedded messages are merged using these rules for nested fields. Structure is documented below.
- openapi
Documents ApiConfig Openapi Document[] OpenAPI specification documents. If specified, grpcServices and managedServiceConfigs must not be included. Structure is documented below.
- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- api str
The API to attach the config to.
- api_
config_ strid Identifier to assign to the API Config. Must be unique within scope of the parent resource(api).
- api_
config_ strid_ prefix Creates a unique name beginning with the specified prefix. If this and api_config_id are unspecified, a random value is chosen for the name.
- display_
name str A user-visible name for the API.
- gateway_
config ApiConfig Gateway Config Args Immutable. Gateway specific configuration. If not specified, backend authentication will be set to use OIDC authentication using the default compute service account Structure is documented below.
- grpc_
services Sequence[ApiConfig Grpc Service Args] gRPC service definition files. If specified, openapiDocuments must not be included. Structure is documented below.
- labels Mapping[str, str]
Resource labels to represent user-provided metadata.
- managed_
service_ Sequence[Apiconfigs Config Managed Service Config Args] Optional. Service Configuration files. At least one must be included when using gRPC service definitions. See https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview for the expected file contents. If multiple files are specified, the files are merged with the following rules: * All singular scalar fields are merged using "last one wins" semantics in the order of the files uploaded. * Repeated fields are concatenated. * Singular embedded messages are merged using these rules for nested fields. Structure is documented below.
- openapi_
documents Sequence[ApiConfig Openapi Document Args] OpenAPI specification documents. If specified, grpcServices and managedServiceConfigs must not be included. Structure is documented below.
- project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- api String
The API to attach the config to.
- api
Config StringId Identifier to assign to the API Config. Must be unique within scope of the parent resource(api).
- api
Config StringId Prefix Creates a unique name beginning with the specified prefix. If this and api_config_id are unspecified, a random value is chosen for the name.
- display
Name String A user-visible name for the API.
- gateway
Config Property Map Immutable. Gateway specific configuration. If not specified, backend authentication will be set to use OIDC authentication using the default compute service account Structure is documented below.
- grpc
Services List<Property Map> gRPC service definition files. If specified, openapiDocuments must not be included. Structure is documented below.
- labels Map<String>
Resource labels to represent user-provided metadata.
- managed
Service List<Property Map>Configs Optional. Service Configuration files. At least one must be included when using gRPC service definitions. See https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview for the expected file contents. If multiple files are specified, the files are merged with the following rules: * All singular scalar fields are merged using "last one wins" semantics in the order of the files uploaded. * Repeated fields are concatenated. * Singular embedded messages are merged using these rules for nested fields. Structure is documented below.
- openapi
Documents List<Property Map> OpenAPI specification documents. If specified, grpcServices and managedServiceConfigs must not be included. Structure is documented below.
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Outputs
All input properties are implicitly available as output properties. Additionally, the ApiConfig resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Name string
The resource name of the API Config.
- Service
Config stringId The ID of the associated Service Config (https://cloud.google.com/service-infrastructure/docs/glossary#config).
- Id string
The provider-assigned unique ID for this managed resource.
- Name string
The resource name of the API Config.
- Service
Config stringId The ID of the associated Service Config (https://cloud.google.com/service-infrastructure/docs/glossary#config).
- id String
The provider-assigned unique ID for this managed resource.
- name String
The resource name of the API Config.
- service
Config StringId The ID of the associated Service Config (https://cloud.google.com/service-infrastructure/docs/glossary#config).
- id string
The provider-assigned unique ID for this managed resource.
- name string
The resource name of the API Config.
- service
Config stringId The ID of the associated Service Config (https://cloud.google.com/service-infrastructure/docs/glossary#config).
- id str
The provider-assigned unique ID for this managed resource.
- name str
The resource name of the API Config.
- service_
config_ strid The ID of the associated Service Config (https://cloud.google.com/service-infrastructure/docs/glossary#config).
- id String
The provider-assigned unique ID for this managed resource.
- name String
The resource name of the API Config.
- service
Config StringId The ID of the associated Service Config (https://cloud.google.com/service-infrastructure/docs/glossary#config).
Look up Existing ApiConfig Resource
Get an existing ApiConfig 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?: ApiConfigState, opts?: CustomResourceOptions): ApiConfig
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
api: Optional[str] = None,
api_config_id: Optional[str] = None,
api_config_id_prefix: Optional[str] = None,
display_name: Optional[str] = None,
gateway_config: Optional[ApiConfigGatewayConfigArgs] = None,
grpc_services: Optional[Sequence[ApiConfigGrpcServiceArgs]] = None,
labels: Optional[Mapping[str, str]] = None,
managed_service_configs: Optional[Sequence[ApiConfigManagedServiceConfigArgs]] = None,
name: Optional[str] = None,
openapi_documents: Optional[Sequence[ApiConfigOpenapiDocumentArgs]] = None,
project: Optional[str] = None,
service_config_id: Optional[str] = None) -> ApiConfig
func GetApiConfig(ctx *Context, name string, id IDInput, state *ApiConfigState, opts ...ResourceOption) (*ApiConfig, error)
public static ApiConfig Get(string name, Input<string> id, ApiConfigState? state, CustomResourceOptions? opts = null)
public static ApiConfig get(String name, Output<String> id, ApiConfigState 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 string
The API to attach the config to.
- Api
Config stringId Identifier to assign to the API Config. Must be unique within scope of the parent resource(api).
- Api
Config stringId Prefix Creates a unique name beginning with the specified prefix. If this and api_config_id are unspecified, a random value is chosen for the name.
- Display
Name string A user-visible name for the API.
- Gateway
Config ApiConfig Gateway Config Immutable. Gateway specific configuration. If not specified, backend authentication will be set to use OIDC authentication using the default compute service account Structure is documented below.
- Grpc
Services List<ApiConfig Grpc Service> gRPC service definition files. If specified, openapiDocuments must not be included. Structure is documented below.
- Labels Dictionary<string, string>
Resource labels to represent user-provided metadata.
- Managed
Service List<ApiConfigs Config Managed Service Config> Optional. Service Configuration files. At least one must be included when using gRPC service definitions. See https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview for the expected file contents. If multiple files are specified, the files are merged with the following rules: * All singular scalar fields are merged using "last one wins" semantics in the order of the files uploaded. * Repeated fields are concatenated. * Singular embedded messages are merged using these rules for nested fields. Structure is documented below.
- Name string
The resource name of the API Config.
- Openapi
Documents List<ApiConfig Openapi Document> OpenAPI specification documents. If specified, grpcServices and managedServiceConfigs must not be included. Structure is documented below.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Service
Config stringId The ID of the associated Service Config (https://cloud.google.com/service-infrastructure/docs/glossary#config).
- Api string
The API to attach the config to.
- Api
Config stringId Identifier to assign to the API Config. Must be unique within scope of the parent resource(api).
- Api
Config stringId Prefix Creates a unique name beginning with the specified prefix. If this and api_config_id are unspecified, a random value is chosen for the name.
- Display
Name string A user-visible name for the API.
- Gateway
Config ApiConfig Gateway Config Args Immutable. Gateway specific configuration. If not specified, backend authentication will be set to use OIDC authentication using the default compute service account Structure is documented below.
- Grpc
Services []ApiConfig Grpc Service Args gRPC service definition files. If specified, openapiDocuments must not be included. Structure is documented below.
- Labels map[string]string
Resource labels to represent user-provided metadata.
- Managed
Service []ApiConfigs Config Managed Service Config Args Optional. Service Configuration files. At least one must be included when using gRPC service definitions. See https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview for the expected file contents. If multiple files are specified, the files are merged with the following rules: * All singular scalar fields are merged using "last one wins" semantics in the order of the files uploaded. * Repeated fields are concatenated. * Singular embedded messages are merged using these rules for nested fields. Structure is documented below.
- Name string
The resource name of the API Config.
- Openapi
Documents []ApiConfig Openapi Document Args OpenAPI specification documents. If specified, grpcServices and managedServiceConfigs must not be included. Structure is documented below.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Service
Config stringId The ID of the associated Service Config (https://cloud.google.com/service-infrastructure/docs/glossary#config).
- api String
The API to attach the config to.
- api
Config StringId Identifier to assign to the API Config. Must be unique within scope of the parent resource(api).
- api
Config StringId Prefix Creates a unique name beginning with the specified prefix. If this and api_config_id are unspecified, a random value is chosen for the name.
- display
Name String A user-visible name for the API.
- gateway
Config ApiConfig Gateway Config Immutable. Gateway specific configuration. If not specified, backend authentication will be set to use OIDC authentication using the default compute service account Structure is documented below.
- grpc
Services List<ApiConfig Grpc Service> gRPC service definition files. If specified, openapiDocuments must not be included. Structure is documented below.
- labels Map<String,String>
Resource labels to represent user-provided metadata.
- managed
Service List<ApiConfigs Config Managed Service Config> Optional. Service Configuration files. At least one must be included when using gRPC service definitions. See https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview for the expected file contents. If multiple files are specified, the files are merged with the following rules: * All singular scalar fields are merged using "last one wins" semantics in the order of the files uploaded. * Repeated fields are concatenated. * Singular embedded messages are merged using these rules for nested fields. Structure is documented below.
- name String
The resource name of the API Config.
- openapi
Documents List<ApiConfig Openapi Document> OpenAPI specification documents. If specified, grpcServices and managedServiceConfigs must not be included. Structure is documented below.
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- service
Config StringId The ID of the associated Service Config (https://cloud.google.com/service-infrastructure/docs/glossary#config).
- api string
The API to attach the config to.
- api
Config stringId Identifier to assign to the API Config. Must be unique within scope of the parent resource(api).
- api
Config stringId Prefix Creates a unique name beginning with the specified prefix. If this and api_config_id are unspecified, a random value is chosen for the name.
- display
Name string A user-visible name for the API.
- gateway
Config ApiConfig Gateway Config Immutable. Gateway specific configuration. If not specified, backend authentication will be set to use OIDC authentication using the default compute service account Structure is documented below.
- grpc
Services ApiConfig Grpc Service[] gRPC service definition files. If specified, openapiDocuments must not be included. Structure is documented below.
- labels {[key: string]: string}
Resource labels to represent user-provided metadata.
- managed
Service ApiConfigs Config Managed Service Config[] Optional. Service Configuration files. At least one must be included when using gRPC service definitions. See https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview for the expected file contents. If multiple files are specified, the files are merged with the following rules: * All singular scalar fields are merged using "last one wins" semantics in the order of the files uploaded. * Repeated fields are concatenated. * Singular embedded messages are merged using these rules for nested fields. Structure is documented below.
- name string
The resource name of the API Config.
- openapi
Documents ApiConfig Openapi Document[] OpenAPI specification documents. If specified, grpcServices and managedServiceConfigs must not be included. Structure is documented below.
- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- service
Config stringId The ID of the associated Service Config (https://cloud.google.com/service-infrastructure/docs/glossary#config).
- api str
The API to attach the config to.
- api_
config_ strid Identifier to assign to the API Config. Must be unique within scope of the parent resource(api).
- api_
config_ strid_ prefix Creates a unique name beginning with the specified prefix. If this and api_config_id are unspecified, a random value is chosen for the name.
- display_
name str A user-visible name for the API.
- gateway_
config ApiConfig Gateway Config Args Immutable. Gateway specific configuration. If not specified, backend authentication will be set to use OIDC authentication using the default compute service account Structure is documented below.
- grpc_
services Sequence[ApiConfig Grpc Service Args] gRPC service definition files. If specified, openapiDocuments must not be included. Structure is documented below.
- labels Mapping[str, str]
Resource labels to represent user-provided metadata.
- managed_
service_ Sequence[Apiconfigs Config Managed Service Config Args] Optional. Service Configuration files. At least one must be included when using gRPC service definitions. See https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview for the expected file contents. If multiple files are specified, the files are merged with the following rules: * All singular scalar fields are merged using "last one wins" semantics in the order of the files uploaded. * Repeated fields are concatenated. * Singular embedded messages are merged using these rules for nested fields. Structure is documented below.
- name str
The resource name of the API Config.
- openapi_
documents Sequence[ApiConfig Openapi Document Args] OpenAPI specification documents. If specified, grpcServices and managedServiceConfigs must not be included. Structure is documented below.
- project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- service_
config_ strid The ID of the associated Service Config (https://cloud.google.com/service-infrastructure/docs/glossary#config).
- api String
The API to attach the config to.
- api
Config StringId Identifier to assign to the API Config. Must be unique within scope of the parent resource(api).
- api
Config StringId Prefix Creates a unique name beginning with the specified prefix. If this and api_config_id are unspecified, a random value is chosen for the name.
- display
Name String A user-visible name for the API.
- gateway
Config Property Map Immutable. Gateway specific configuration. If not specified, backend authentication will be set to use OIDC authentication using the default compute service account Structure is documented below.
- grpc
Services List<Property Map> gRPC service definition files. If specified, openapiDocuments must not be included. Structure is documented below.
- labels Map<String>
Resource labels to represent user-provided metadata.
- managed
Service List<Property Map>Configs Optional. Service Configuration files. At least one must be included when using gRPC service definitions. See https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview for the expected file contents. If multiple files are specified, the files are merged with the following rules: * All singular scalar fields are merged using "last one wins" semantics in the order of the files uploaded. * Repeated fields are concatenated. * Singular embedded messages are merged using these rules for nested fields. Structure is documented below.
- name String
The resource name of the API Config.
- openapi
Documents List<Property Map> OpenAPI specification documents. If specified, grpcServices and managedServiceConfigs must not be included. Structure is documented below.
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- service
Config StringId The ID of the associated Service Config (https://cloud.google.com/service-infrastructure/docs/glossary#config).
Supporting Types
ApiConfigGatewayConfig, ApiConfigGatewayConfigArgs
- Backend
Config ApiConfig Gateway Config Backend Config Backend settings that are applied to all backends of the Gateway. Structure is documented below.
- Backend
Config ApiConfig Gateway Config Backend Config Backend settings that are applied to all backends of the Gateway. Structure is documented below.
- backend
Config ApiConfig Gateway Config Backend Config Backend settings that are applied to all backends of the Gateway. Structure is documented below.
- backend
Config ApiConfig Gateway Config Backend Config Backend settings that are applied to all backends of the Gateway. Structure is documented below.
- backend_
config ApiConfig Gateway Config Backend Config Backend settings that are applied to all backends of the Gateway. Structure is documented below.
- backend
Config Property Map Backend settings that are applied to all backends of the Gateway. Structure is documented below.
ApiConfigGatewayConfigBackendConfig, ApiConfigGatewayConfigBackendConfigArgs
- Google
Service stringAccount Google Cloud IAM service account used to sign OIDC tokens for backends that have authentication configured (https://cloud.google.com/service-infrastructure/docs/service-management/reference/rest/v1/services.configs#backend).
- Google
Service stringAccount Google Cloud IAM service account used to sign OIDC tokens for backends that have authentication configured (https://cloud.google.com/service-infrastructure/docs/service-management/reference/rest/v1/services.configs#backend).
- google
Service StringAccount Google Cloud IAM service account used to sign OIDC tokens for backends that have authentication configured (https://cloud.google.com/service-infrastructure/docs/service-management/reference/rest/v1/services.configs#backend).
- google
Service stringAccount Google Cloud IAM service account used to sign OIDC tokens for backends that have authentication configured (https://cloud.google.com/service-infrastructure/docs/service-management/reference/rest/v1/services.configs#backend).
- google_
service_ straccount Google Cloud IAM service account used to sign OIDC tokens for backends that have authentication configured (https://cloud.google.com/service-infrastructure/docs/service-management/reference/rest/v1/services.configs#backend).
- google
Service StringAccount Google Cloud IAM service account used to sign OIDC tokens for backends that have authentication configured (https://cloud.google.com/service-infrastructure/docs/service-management/reference/rest/v1/services.configs#backend).
ApiConfigGrpcService, ApiConfigGrpcServiceArgs
- File
Descriptor ApiSet Config Grpc Service File Descriptor Set Input only. File descriptor set, generated by protoc. To generate, use protoc with imports and source info included. For an example test.proto file, the following command would put the value in a new file named out.pb. $ protoc --include_imports --include_source_info test.proto -o out.pb Structure is documented below.
- Sources
List<Api
Config Grpc Service Source> Uncompiled proto files associated with the descriptor set, used for display purposes (server-side compilation is not supported). These should match the inputs to 'protoc' command used to generate fileDescriptorSet. Structure is documented below.
- File
Descriptor ApiSet Config Grpc Service File Descriptor Set Input only. File descriptor set, generated by protoc. To generate, use protoc with imports and source info included. For an example test.proto file, the following command would put the value in a new file named out.pb. $ protoc --include_imports --include_source_info test.proto -o out.pb Structure is documented below.
- Sources
[]Api
Config Grpc Service Source Uncompiled proto files associated with the descriptor set, used for display purposes (server-side compilation is not supported). These should match the inputs to 'protoc' command used to generate fileDescriptorSet. Structure is documented below.
- file
Descriptor ApiSet Config Grpc Service File Descriptor Set Input only. File descriptor set, generated by protoc. To generate, use protoc with imports and source info included. For an example test.proto file, the following command would put the value in a new file named out.pb. $ protoc --include_imports --include_source_info test.proto -o out.pb Structure is documented below.
- sources
List<Api
Config Grpc Service Source> Uncompiled proto files associated with the descriptor set, used for display purposes (server-side compilation is not supported). These should match the inputs to 'protoc' command used to generate fileDescriptorSet. Structure is documented below.
- file
Descriptor ApiSet Config Grpc Service File Descriptor Set Input only. File descriptor set, generated by protoc. To generate, use protoc with imports and source info included. For an example test.proto file, the following command would put the value in a new file named out.pb. $ protoc --include_imports --include_source_info test.proto -o out.pb Structure is documented below.
- sources
Api
Config Grpc Service Source[] Uncompiled proto files associated with the descriptor set, used for display purposes (server-side compilation is not supported). These should match the inputs to 'protoc' command used to generate fileDescriptorSet. Structure is documented below.
- file_
descriptor_ Apiset Config Grpc Service File Descriptor Set Input only. File descriptor set, generated by protoc. To generate, use protoc with imports and source info included. For an example test.proto file, the following command would put the value in a new file named out.pb. $ protoc --include_imports --include_source_info test.proto -o out.pb Structure is documented below.
- sources
Sequence[Api
Config Grpc Service Source] Uncompiled proto files associated with the descriptor set, used for display purposes (server-side compilation is not supported). These should match the inputs to 'protoc' command used to generate fileDescriptorSet. Structure is documented below.
- file
Descriptor Property MapSet Input only. File descriptor set, generated by protoc. To generate, use protoc with imports and source info included. For an example test.proto file, the following command would put the value in a new file named out.pb. $ protoc --include_imports --include_source_info test.proto -o out.pb Structure is documented below.
- sources List<Property Map>
Uncompiled proto files associated with the descriptor set, used for display purposes (server-side compilation is not supported). These should match the inputs to 'protoc' command used to generate fileDescriptorSet. Structure is documented below.
ApiConfigGrpcServiceFileDescriptorSet, ApiConfigGrpcServiceFileDescriptorSetArgs
ApiConfigGrpcServiceSource, ApiConfigGrpcServiceSourceArgs
ApiConfigManagedServiceConfig, ApiConfigManagedServiceConfigArgs
ApiConfigOpenapiDocument, ApiConfigOpenapiDocumentArgs
- Document
Api
Config Openapi Document Document The OpenAPI Specification document file. Structure is documented below.
- Document
Api
Config Openapi Document Document The OpenAPI Specification document file. Structure is documented below.
- document
Api
Config Openapi Document Document The OpenAPI Specification document file. Structure is documented below.
- document
Api
Config Openapi Document Document The OpenAPI Specification document file. Structure is documented below.
- document
Api
Config Openapi Document Document The OpenAPI Specification document file. Structure is documented below.
- document Property Map
The OpenAPI Specification document file. Structure is documented below.
ApiConfigOpenapiDocumentDocument, ApiConfigOpenapiDocumentDocumentArgs
Import
ApiConfig can be imported using any of these accepted formats
$ pulumi import gcp:apigateway/apiConfig:ApiConfig default projects/{{project}}/locations/global/apis/{{api}}/configs/{{api_config_id}}
$ pulumi import gcp:apigateway/apiConfig:ApiConfig default {{project}}/{{api}}/{{api_config_id}}
$ pulumi import gcp:apigateway/apiConfig:ApiConfig default {{api}}/{{api_config_id}}
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.