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 Servicemanagement v1 API

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

Bases: proto.message.Message

Change report associated with a particular service configuration. It contains a list of ConfigChanges based on the comparison between two service configurations.

config_changes

List of changes between two service configurations. The changes will be alphabetically sorted based on the identifier of each change. A ConfigChange identifier is a dot separated path to the configuration. Example: visibility.rules[selector=’LibraryService.CreateBook’].restriction

Type

MutableSequence[google.api.config_change_pb2.ConfigChange]

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

Bases: proto.message.Message

Generic specification of a source configuration file

file_path

The file name of the configuration file (full or relative path).

Type

str

file_contents

The bytes that constitute the file.

Type

bytes

file_type

The type of configuration file this represents.

Type

google.cloud.servicemanagement_v1.types.ConfigFile.FileType

class FileType(value)[source]

Bases: proto.enums.Enum

Values:
FILE_TYPE_UNSPECIFIED (0):

Unknown file type.

SERVICE_CONFIG_YAML (1):

YAML-specification of service.

OPEN_API_JSON (2):

OpenAPI specification, serialized in JSON.

OPEN_API_YAML (3):

OpenAPI specification, serialized in YAML.

FILE_DESCRIPTOR_SET_PROTO (4):

FileDescriptorSet, 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

PROTO_FILE (6):

Uncompiled Proto file. Used for storage and display purposes only, currently server-side compilation is not supported. Should match the inputs to ‘protoc’ command used to generated FILE_DESCRIPTOR_SET_PROTO. A file of this type can only be included if at least one file of type FILE_DESCRIPTOR_SET_PROTO is included.

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

Bases: proto.message.Message

Represents a service configuration with its name and id.

name

Resource name of a service config. It must have the following format: “services/{service name}/configs/{config id}”.

Type

str

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

Bases: proto.message.Message

Represents a source file which is used to generate the service configuration defined by google.api.Service.

id

A unique ID for a specific instance of this message, typically assigned by the client for tracking purpose. If empty, the server may choose to generate one instead.

Type

str

files

Set of source configuration files that are used to generate a service configuration (google.api.Service).

Type

MutableSequence[google.cloud.servicemanagement_v1.types.ConfigFile]

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

Bases: proto.message.Message

Request message for CreateServiceConfig method.

service_name

Required. The name of the service. See the overview for naming requirements. For example: example.googleapis.com.

Type

str

service_config

Required. The service configuration resource.

Type

google.api.service_pb2.Service

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

Bases: proto.message.Message

Request message for CreateService method.

service

Required. Initial values for the service resource.

Type

google.cloud.servicemanagement_v1.types.ManagedService

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

Bases: proto.message.Message

Request message for ‘CreateServiceRollout’

service_name

Required. The name of the service. See the overview for naming requirements. For example: example.googleapis.com.

Type

str

rollout

Required. The rollout resource. The service_name field is output only.

Type

google.cloud.servicemanagement_v1.types.Rollout

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

Bases: proto.message.Message

Request message for DeleteService method.

service_name

Required. The name of the service. See the overview for naming requirements. For example: example.googleapis.com.

Type

str

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

Bases: proto.message.Message

Represents a diagnostic message (error or warning)

location

File name and line number of the error or warning.

Type

str

kind

The kind of diagnostic information provided.

Type

google.cloud.servicemanagement_v1.types.Diagnostic.Kind

message

Message describing the error or warning.

Type

str

class Kind(value)[source]

Bases: proto.enums.Enum

The kind of diagnostic information possible.

Values:
WARNING (0):

Warnings and errors

ERROR (1):

Only errors

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

Bases: proto.message.Message

Operation payload for EnableService method.

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

Bases: proto.message.Message

Request message for GenerateConfigReport method.

new_config

Required. Service configuration for which we want to generate the report. For this version of API, the supported types are [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef], [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource], and [google.api.Service][google.api.Service]

Type

google.protobuf.any_pb2.Any

old_config

Optional. Service configuration against which the comparison will be done. For this version of API, the supported types are [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef], [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource], and [google.api.Service][google.api.Service]

Type

google.protobuf.any_pb2.Any

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

Bases: proto.message.Message

Response message for GenerateConfigReport method.

service_name

Name of the service this report belongs to.

Type

str

id

ID of the service configuration this report belongs to.

Type

str

change_reports

list of ChangeReport, each corresponding to comparison between two service configurations.

Type

MutableSequence[google.cloud.servicemanagement_v1.types.ChangeReport]

diagnostics

Errors / Linter warnings associated with the service definition this report belongs to.

Type

MutableSequence[google.cloud.servicemanagement_v1.types.Diagnostic]

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

Bases: proto.message.Message

Request message for GetServiceConfig method.

service_name

Required. The name of the service. See the overview for naming requirements. For example: example.googleapis.com.

Type

str

config_id

Required. The id of the service configuration resource.

This field must be specified for the server to return all fields, including SourceInfo.

Type

str

view

Specifies which parts of the Service Config should be returned in the response.

Type

google.cloud.servicemanagement_v1.types.GetServiceConfigRequest.ConfigView

class ConfigView(value)[source]

Bases: proto.enums.Enum

Values:
BASIC (0):

Server response includes all fields except SourceInfo.

FULL (1):

Server response includes all fields including SourceInfo. SourceFiles are of type ‘google.api.servicemanagement.v1.ConfigFile’ and are only available for configs created using the SubmitConfigSource method.

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

Bases: proto.message.Message

Request message for GetService method.

service_name

Required. The name of the service. See the ServiceManager overview for naming requirements. For example: example.googleapis.com.

Type

str

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

Bases: proto.message.Message

Request message for GetServiceRollout method.

service_name

Required. The name of the service. See the overview for naming requirements. For example: example.googleapis.com.

Type

str

rollout_id

Required. The id of the rollout resource.

Type

str

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

Bases: proto.message.Message

Request message for ListServiceConfigs method.

service_name

Required. The name of the service. See the overview for naming requirements. For example: example.googleapis.com.

Type

str

page_token

The token of the page to retrieve.

Type

str

page_size

The max number of items to include in the response list. Page size is 50 if not specified. Maximum value is 100.

Type

int

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

Bases: proto.message.Message

Response message for ListServiceConfigs method.

service_configs

The list of service configuration resources.

Type

MutableSequence[google.api.service_pb2.Service]

next_page_token

The token of the next page of results.

Type

str

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

Bases: proto.message.Message

Request message for ‘ListServiceRollouts’

service_name

Required. The name of the service. See the overview for naming requirements. For example: example.googleapis.com.

Type

str

page_token

The token of the page to retrieve.

Type

str

page_size

The max number of items to include in the response list. Page size is 50 if not specified. Maximum value is 100.

Type

int

filter

Required. Use filter to return subset of rollouts. The following filters are supported:

– By [status] [google.api.servicemanagement.v1.Rollout.RolloutStatus]. For example, filter='status=SUCCESS'

– By [strategy] [google.api.servicemanagement.v1.Rollout.strategy]. For example, filter='strategy=TrafficPercentStrategy'

Type

str

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

Bases: proto.message.Message

Response message for ListServiceRollouts method.

rollouts

The list of rollout resources.

Type

MutableSequence[google.cloud.servicemanagement_v1.types.Rollout]

next_page_token

The token of the next page of results.

Type

str

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

Bases: proto.message.Message

Request message for ListServices method.

producer_project_id

Include services produced by the specified project.

Type

str

page_size

The max number of items to include in the response list. Page size is 50 if not specified. Maximum value is 500.

Type

int

page_token

Token identifying which result to start with; returned by a previous list call.

Type

str

consumer_id

Include services consumed by the specified consumer.

The Google Service Management implementation accepts the following forms:

  • project:<project_id>

Type

str

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

Bases: proto.message.Message

Response message for ListServices method.

services

The returned services will only have the name field set.

Type

MutableSequence[google.cloud.servicemanagement_v1.types.ManagedService]

next_page_token

Token that can be passed to ListServices to resume a paginated query.

Type

str

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

Bases: proto.message.Message

The full representation of a Service that is managed by Google Service Management.

service_name

The name of the service. See the overview for naming requirements.

Type

str

producer_project_id

ID of the project that produces and owns this service.

Type

str

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

Bases: proto.message.Message

The metadata associated with a long running operation resource.

resource_names

The full name of the resources that this operation is directly associated with.

Type

MutableSequence[str]

steps

Detailed status information for each step. The order is undetermined.

Type

MutableSequence[google.cloud.servicemanagement_v1.types.OperationMetadata.Step]

progress_percentage

Percentage of completion of this operation, ranging from 0 to 100.

Type

int

start_time

The start time of the operation.

Type

google.protobuf.timestamp_pb2.Timestamp

class Status(value)[source]

Bases: proto.enums.Enum

Code describes the status of the operation (or one of its steps).

Values:
STATUS_UNSPECIFIED (0):

Unspecifed code.

DONE (1):

The operation or step has completed without errors.

NOT_STARTED (2):

The operation or step has not started yet.

IN_PROGRESS (3):

The operation or step is in progress.

FAILED (4):

The operation or step has completed with errors. If the operation is rollbackable, the rollback completed with errors too.

CANCELLED (5):

The operation or step has completed with cancellation.

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

Bases: proto.message.Message

Represents the status of one operation step.

description

The short description of the step.

Type

str

status

The status code.

Type

google.cloud.servicemanagement_v1.types.OperationMetadata.Status

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

Bases: proto.message.Message

A rollout resource that defines how service configuration versions are pushed to control plane systems. Typically, you create a new version of the service config, and then create a Rollout to push the service config.

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

rollout_id

Optional. Unique identifier of this Rollout. Must be no longer than 63 characters and only lower case letters, digits, ‘.’, ‘_’ and ‘-’ are allowed.

If not specified by client, the server will generate one. The generated id will have the form of , where “date” is the create date in ISO 8601 format. “revision number” is a monotonically increasing positive number that is reset every day for each service. An example of the generated rollout_id is ‘2016-02-16r1’

Type

str

create_time

Creation time of the rollout. Readonly.

Type

google.protobuf.timestamp_pb2.Timestamp

created_by

The user who created the Rollout. Readonly.

Type

str

status

The status of this rollout. Readonly. In case of a failed rollout, the system will automatically rollback to the current Rollout version. Readonly.

Type

google.cloud.servicemanagement_v1.types.Rollout.RolloutStatus

traffic_percent_strategy

Google Service Control selects service configurations based on traffic percentage.

This field is a member of oneof strategy.

Type

google.cloud.servicemanagement_v1.types.Rollout.TrafficPercentStrategy

delete_service_strategy

The strategy associated with a rollout to delete a ManagedService. Readonly.

This field is a member of oneof strategy.

Type

google.cloud.servicemanagement_v1.types.Rollout.DeleteServiceStrategy

service_name

The name of the service associated with this Rollout.

Type

str

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

Bases: proto.message.Message

Strategy used to delete a service. This strategy is a placeholder only used by the system generated rollout to delete a service.

class RolloutStatus(value)[source]

Bases: proto.enums.Enum

Status of a Rollout.

Values:
ROLLOUT_STATUS_UNSPECIFIED (0):

No status specified.

IN_PROGRESS (1):

The Rollout is in progress.

SUCCESS (2):

The Rollout has completed successfully.

CANCELLED (3):

The Rollout has been cancelled. This can happen if you have overlapping Rollout pushes, and the previous ones will be cancelled.

FAILED (4):

The Rollout has failed and the rollback attempt has failed too.

PENDING (5):

The Rollout has not started yet and is pending for execution.

FAILED_ROLLED_BACK (6):

The Rollout has failed and rolled back to the previous successful Rollout.

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

Bases: proto.message.Message

Strategy that specifies how clients of Google Service Controller want to send traffic to use different config versions. This is generally used by API proxy to split traffic based on your configured percentage for each config version.

One example of how to gradually rollout a new service configuration using this strategy: Day 1

Rollout {
  id: "example.googleapis.com/rollout_20160206"
  traffic_percent_strategy {
    percentages: {
      "example.googleapis.com/20160201": 70.00
      "example.googleapis.com/20160206": 30.00
    }
  }
}

Day 2

Rollout {
  id: "example.googleapis.com/rollout_20160207"
  traffic_percent_strategy: {
    percentages: {
      "example.googleapis.com/20160206": 100.00
    }
  }
}
percentages

Maps service configuration IDs to their corresponding traffic percentage. Key is the service configuration ID, Value is the traffic percentage which must be greater than 0.0 and the sum must equal to 100.0.

Type

MutableMapping[str, float]

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

Bases: proto.message.Message

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

Bases: proto.message.Message

Request message for SubmitConfigSource method.

service_name

Required. The name of the service. See the overview for naming requirements. For example: example.googleapis.com.

Type

str

config_source

Required. The source configuration for the service.

Type

google.cloud.servicemanagement_v1.types.ConfigSource

validate_only

Optional. If set, this will result in the generation of a google.api.Service configuration based on the ConfigSource provided, but the generated config and the sources will NOT be persisted.

Type

bool

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

Bases: proto.message.Message

Response message for SubmitConfigSource method.

service_config

The generated service configuration.

Type

google.api.service_pb2.Service

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

Bases: proto.message.Message

Request message for UndeleteService method.

service_name

Required. The name of the service. See the overview for naming requirements. For example: example.googleapis.com.

Type

str

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

Bases: proto.message.Message

Response message for UndeleteService method.

service

Revived service resource.

Type

google.cloud.servicemanagement_v1.types.ManagedService