As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

Types for Google Cloud Apigateway v1 API

class google.cloud.apigateway_v1.types.Api(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

An API that can be served by one or more Gateways.

name

Output only. Resource name of the API. Format: projects/{project}/locations/global/apis/{api}

Type

str

create_time

Output only. Created time.

Type

google.protobuf.timestamp_pb2.Timestamp

update_time

Output only. Updated time.

Type

google.protobuf.timestamp_pb2.Timestamp

labels

Optional. Resource labels to represent user- rovided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling- resources

Type

Sequence[google.cloud.apigateway_v1.types.Api.LabelsEntry]

display_name

Optional. Display name.

Type

str

managed_service

Optional. Immutable. The name of a Google Managed Service ( https://cloud.google.com/service- infrastructure/docs/glossary#managed). If not specified, a new Service will automatically be created in the same project as this API.

Type

str

state

Output only. State of the API.

Type

google.cloud.apigateway_v1.types.Api.State

class LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class State(value)[source]

Bases: proto.enums.Enum

All the possible API states.

ACTIVE = 2
CREATING = 1
DELETING = 4
FAILED = 3
STATE_UNSPECIFIED = 0
UPDATING = 5
class google.cloud.apigateway_v1.types.ApiConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

An API Configuration is a combination of settings for both the Managed Service and Gateways serving this API Config.

name

Output only. Resource name of the API Config. Format: projects/{project}/locations/global/apis/{api}/configs/{api_config}

Type

str

create_time

Output only. Created time.

Type

google.protobuf.timestamp_pb2.Timestamp

update_time

Output only. Updated time.

Type

google.protobuf.timestamp_pb2.Timestamp

labels

Optional. Resource labels to represent user- rovided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling- resources

Type

Sequence[google.cloud.apigateway_v1.types.ApiConfig.LabelsEntry]

display_name

Optional. Display name.

Type

str

gateway_service_account

Immutable. The Google Cloud IAM Service Account that Gateways serving this config should use to authenticate to other services. This may either be the Service Account’s email ({ACCOUNT_ID}@{PROJECT}.iam.gserviceaccount.com) or its full resource name (projects/{PROJECT}/accounts/{UNIQUE_ID}). This is most often used when the service is a GCP resource such as a Cloud Run Service or an IAP-secured service.

Type

str

service_config_id

Output only. The ID of the associated Service Config ( https://cloud.google.com/service- infrastructure/docs/glossary#config).

Type

str

state

Output only. State of the API Config.

Type

google.cloud.apigateway_v1.types.ApiConfig.State

openapi_documents

Optional. OpenAPI specification documents. If specified, grpc_services and managed_service_configs must not be included.

Type

Sequence[google.cloud.apigateway_v1.types.ApiConfig.OpenApiDocument]

grpc_services

Optional. gRPC service definition files. If specified, openapi_documents must not be included.

Type

Sequence[google.cloud.apigateway_v1.types.ApiConfig.GrpcServiceDefinition]

managed_service_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.

Type

Sequence[google.cloud.apigateway_v1.types.ApiConfig.File]

class File(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A lightweight description of a file.

path

The file path (full or relative path). This is typically the path of the file when it is uploaded.

Type

str

contents

The bytes that constitute the file.

Type

bytes

class GrpcServiceDefinition(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A gRPC service definition.

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

Type

google.cloud.apigateway_v1.types.ApiConfig.File

source

Optional. 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 file_descriptor_set.

Type

Sequence[google.cloud.apigateway_v1.types.ApiConfig.File]

class LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class OpenApiDocument(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

An OpenAPI Specification Document describing an API.

document

The OpenAPI Specification document file.

Type

google.cloud.apigateway_v1.types.ApiConfig.File

class State(value)[source]

Bases: proto.enums.Enum

All the possible API Config states.

ACTIVATING = 6
ACTIVE = 2
CREATING = 1
DELETING = 4
FAILED = 3
STATE_UNSPECIFIED = 0
UPDATING = 5
class google.cloud.apigateway_v1.types.CreateApiConfigRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ApiGatewayService.CreateApiConfig

parent

Required. Parent resource of the API Config, of the form: projects/*/locations/global/apis/*

Type

str

api_config_id

Required. Identifier to assign to the API Config. Must be unique within scope of the parent resource.

Type

str

api_config

Required. API resource.

Type

google.cloud.apigateway_v1.types.ApiConfig

class google.cloud.apigateway_v1.types.CreateApiRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ApiGatewayService.CreateApi

parent

Required. Parent resource of the API, of the form: projects/*/locations/global

Type

str

api_id

Required. Identifier to assign to the API. Must be unique within scope of the parent resource.

Type

str

api

Required. API resource.

Type

google.cloud.apigateway_v1.types.Api

class google.cloud.apigateway_v1.types.CreateGatewayRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ApiGatewayService.CreateGateway

parent

Required. Parent resource of the Gateway, of the form: projects/*/locations/*

Type

str

gateway_id

Required. Identifier to assign to the Gateway. Must be unique within scope of the parent resource.

Type

str

gateway

Required. Gateway resource.

Type

google.cloud.apigateway_v1.types.Gateway

class google.cloud.apigateway_v1.types.DeleteApiConfigRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ApiGatewayService.DeleteApiConfig

name

Required. Resource name of the form: projects/*/locations/global/apis/*/configs/*

Type

str

class google.cloud.apigateway_v1.types.DeleteApiRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ApiGatewayService.DeleteApi

name

Required. Resource name of the form: projects/*/locations/global/apis/*

Type

str

class google.cloud.apigateway_v1.types.DeleteGatewayRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ApiGatewayService.DeleteGateway

name

Required. Resource name of the form: projects/*/locations/*/gateways/*

Type

str

class google.cloud.apigateway_v1.types.Gateway(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A Gateway is an API-aware HTTP proxy. It performs API-Method and/or API-Consumer specific actions based on an API Config such as authentication, policy enforcement, and backend selection.

name

Output only. Resource name of the Gateway. Format: projects/{project}/locations/{location}/gateways/{gateway}

Type

str

create_time

Output only. Created time.

Type

google.protobuf.timestamp_pb2.Timestamp

update_time

Output only. Updated time.

Type

google.protobuf.timestamp_pb2.Timestamp

labels

Optional. Resource labels to represent user- rovided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling- resources

Type

Sequence[google.cloud.apigateway_v1.types.Gateway.LabelsEntry]

display_name

Optional. Display name.

Type

str

api_config

Required. Resource name of the API Config for this Gateway. Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}

Type

str

state

Output only. The current state of the Gateway.

Type

google.cloud.apigateway_v1.types.Gateway.State

default_hostname

Output only. The default API Gateway host name of the form {gateway_id}-{hash}.{region_code}.gateway.dev.

Type

str

class LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class State(value)[source]

Bases: proto.enums.Enum

All the possible Gateway states.

ACTIVE = 2
CREATING = 1
DELETING = 4
FAILED = 3
STATE_UNSPECIFIED = 0
UPDATING = 5
class google.cloud.apigateway_v1.types.GetApiConfigRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ApiGatewayService.GetApiConfig

name

Required. Resource name of the form: projects/*/locations/global/apis/*/configs/*

Type

str

view

Specifies which fields of the API Config are returned in the response. Defaults to BASIC view.

Type

google.cloud.apigateway_v1.types.GetApiConfigRequest.ConfigView

class ConfigView(value)[source]

Bases: proto.enums.Enum

Enum to control which fields should be included in the response.

BASIC = 1
CONFIG_VIEW_UNSPECIFIED = 0
FULL = 2
class google.cloud.apigateway_v1.types.GetApiRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ApiGatewayService.GetApi

name

Required. Resource name of the form: projects/*/locations/global/apis/*

Type

str

class google.cloud.apigateway_v1.types.GetGatewayRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ApiGatewayService.GetGateway

name

Required. Resource name of the form: projects/*/locations/*/gateways/*

Type

str

class google.cloud.apigateway_v1.types.ListApiConfigsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ApiGatewayService.ListApiConfigs

parent

Required. Parent resource of the API Config, of the form: projects/*/locations/global/apis/*

Type

str

page_size

Page size.

Type

int

page_token

Page token.

Type

str

filter

Filter.

Type

str

order_by

Order by parameters.

Type

str

class google.cloud.apigateway_v1.types.ListApiConfigsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response message for ApiGatewayService.ListApiConfigs

api_configs

API Configs.

Type

Sequence[google.cloud.apigateway_v1.types.ApiConfig]

next_page_token

Next page token.

Type

str

unreachable_locations

Locations that could not be reached.

Type

Sequence[str]

property raw_page
class google.cloud.apigateway_v1.types.ListApisRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ApiGatewayService.ListApis

parent

Required. Parent resource of the API, of the form: projects/*/locations/global

Type

str

page_size

Page size.

Type

int

page_token

Page token.

Type

str

filter

Filter.

Type

str

order_by

Order by parameters.

Type

str

class google.cloud.apigateway_v1.types.ListApisResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response message for ApiGatewayService.ListApis

apis

APIs.

Type

Sequence[google.cloud.apigateway_v1.types.Api]

next_page_token

Next page token.

Type

str

unreachable_locations

Locations that could not be reached.

Type

Sequence[str]

property raw_page
class google.cloud.apigateway_v1.types.ListGatewaysRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ApiGatewayService.ListGateways

parent

Required. Parent resource of the Gateway, of the form: projects/*/locations/*

Type

str

page_size

Page size.

Type

int

page_token

Page token.

Type

str

filter

Filter.

Type

str

order_by

Order by parameters.

Type

str

class google.cloud.apigateway_v1.types.ListGatewaysResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response message for ApiGatewayService.ListGateways

gateways

Gateways.

Type

Sequence[google.cloud.apigateway_v1.types.Gateway]

next_page_token

Next page token.

Type

str

unreachable_locations

Locations that could not be reached.

Type

Sequence[str]

property raw_page
class google.cloud.apigateway_v1.types.OperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the metadata of the long-running operation.

create_time

Output only. The time the operation was created.

Type

google.protobuf.timestamp_pb2.Timestamp

end_time

Output only. The time the operation finished running.

Type

google.protobuf.timestamp_pb2.Timestamp

target

Output only. Server-defined resource path for the target of the operation.

Type

str

verb

Output only. Name of the verb executed by the operation.

Type

str

status_message

Output only. Human-readable status of the operation, if any.

Type

str

requested_cancellation

Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to Code.CANCELLED.

Type

bool

api_version

Output only. API version used to start the operation.

Type

str

diagnostics

Output only. Diagnostics generated during processing of configuration source files.

Type

Sequence[google.cloud.apigateway_v1.types.OperationMetadata.Diagnostic]

class Diagnostic(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Diagnostic information from configuration processing.

location

Location of the diagnostic.

Type

str

message

The diagnostic message.

Type

str

class google.cloud.apigateway_v1.types.UpdateApiConfigRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ApiGatewayService.UpdateApiConfig

update_mask

Field mask is used to specify the fields to be overwritten in the ApiConfig resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

Type

google.protobuf.field_mask_pb2.FieldMask

api_config

Required. API Config resource.

Type

google.cloud.apigateway_v1.types.ApiConfig

class google.cloud.apigateway_v1.types.UpdateApiRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ApiGatewayService.UpdateApi

update_mask

Field mask is used to specify the fields to be overwritten in the Api resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

Type

google.protobuf.field_mask_pb2.FieldMask

api

Required. API resource.

Type

google.cloud.apigateway_v1.types.Api

class google.cloud.apigateway_v1.types.UpdateGatewayRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ApiGatewayService.UpdateGateway

update_mask

Field mask is used to specify the fields to be overwritten in the Gateway resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

Type

google.protobuf.field_mask_pb2.FieldMask

gateway

Required. Gateway resource.

Type

google.cloud.apigateway_v1.types.Gateway