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 Servicecontrol v2 API

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

Bases: proto.message.Message

Request message for the Check method.

service_name

The service name as specified in its service configuration. For example, "pubsub.googleapis.com".

See google.api.Service for the definition of a service name.

Type

str

service_config_id

Specifies the version of the service configuration that should be used to process the request. Must not be empty. Set this field to ‘latest’ to specify using the latest configuration.

Type

str

attributes

Describes attributes about the operation being executed by the service.

Type

google.rpc.context.attribute_context_pb2.AttributeContext

resources

Describes the resources and the policies applied to each resource.

Type

MutableSequence[google.cloud.servicecontrol_v2.types.ResourceInfo]

flags

Optional. Contains a comma-separated list of flags.

Type

str

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

Bases: proto.message.Message

Response message for the Check method.

status

Operation is allowed when this field is not set. Any non-‘OK’ status indicates a denial; [google.rpc.Status.details][google.rpc.Status.details] would contain additional details about the denial.

Type

google.rpc.status_pb2.Status

headers

Returns a set of request contexts generated from the CheckRequest.

Type

MutableMapping[str, str]

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

Bases: proto.message.Message

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

Bases: proto.message.Message

Request message for the Report method.

service_name

The service name as specified in its service configuration. For example, "pubsub.googleapis.com".

See google.api.Service for the definition of a service name.

Type

str

service_config_id

Specifies the version of the service configuration that should be used to process the request. Must not be empty. Set this field to ‘latest’ to specify using the latest configuration.

Type

str

operations

Describes the list of operations to be reported. Each operation is represented as an AttributeContext, and contains all attributes around an API access.

Type

MutableSequence[google.rpc.context.attribute_context_pb2.AttributeContext]

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

Bases: proto.message.Message

Response message for the Report method. If the request contains any invalid data, the server returns an RPC error.

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

Bases: proto.message.Message

Describes a resource referenced in the request.

name

The name of the resource referenced in the request.

Type

str

type_

The resource type in the format of “{service}/{kind}”.

Type

str

permission

The resource permission needed for this request. The format must be “{service}/{plural}.{verb}”.

Type

str

container

Optional. The identifier of the container of this resource. For Google Cloud APIs, the resource container must be one of the following formats: - projects/<project-id or project-number> - folders/<folder-id> - organizations/<organization-id> For the policy enforcement on the container level (VPCSC and Location Policy check), this field takes precedence on the container extracted from name when presents.

Type

str

location

Optional. The location of the resource. The value must be a valid zone, region or multiregion. For example: “europe-west4” or “northamerica-northeast1-a”.

Type

str

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

Bases: proto.message.Message

Message containing resource details in a batch mode.

resources

The resource details.

Type

MutableSequence[google.cloud.servicecontrol_v2.types.ResourceInfo]