REST Resource: projects.locations.serviceConnectionPolicies

Resource: ServiceConnectionPolicy

The ServiceConnectionPolicy resource. Next id: 12

JSON representation
{
  "name": string,
  "createTime": string,
  "updateTime": string,
  "labels": {
    string: string,
    ...
  },
  "description": string,
  "network": string,
  "serviceClass": string,
  "infrastructure": enum (Infrastructure),
  "pscConfig": {
    object (PscConfig)
  },
  "pscConnections": [
    {
      object (PscConnection)
    }
  ],
  "etag": string
}
Fields
name

string

Immutable. The name of a ServiceConnectionPolicy. Format: projects/{project}/locations/{location}/serviceConnectionPolicies/{serviceConnectionPolicy} See: https://google.aip.dev/122#fields-representing-resource-names

createTime

string (Timestamp format)

Output only. Time when the ServiceConnectionPolicy was created.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Output only. Time when the ServiceConnectionPolicy was updated.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

labels

map (key: string, value: string)

User-defined labels.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

description

string

A description of this resource.

network

string

The resource path of the consumer network. Example: - projects/{projectNumOrId}/global/networks/{resourceId}.

serviceClass

string

The service class identifier for which this ServiceConnectionPolicy is for. The service class identifier is a unique, symbolic representation of a ServiceClass. It is provided by the Service Producer. Google services have a prefix of gcp or google-cloud. For example, gcp-memorystore-redis or google-cloud-sql. 3rd party services do not. For example, test-service-a3dfcx.

infrastructure

enum (Infrastructure)

Output only. The type of underlying resources used to create the connection.

pscConfig

object (PscConfig)

Configuration used for Private Service Connect connections. Used when Infrastructure is PSC.

pscConnections[]

object (PscConnection)

Output only. [Output only] Information about each Private Service Connect connection.

etag

string

Optional. The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

PscConfig

Configuration used for Private Service Connect connections. Used when Infrastructure is PSC.

JSON representation
{
  "subnetworks": [
    string
  ],
  "producerInstanceLocation": enum (ProducerInstanceLocation),
  "allowedGoogleProducersResourceHierarchyLevel": [
    string
  ],
  "limit": string
}
Fields
subnetworks[]

string

The resource paths of subnetworks to use for IP address management. Example: projects/{projectNumOrId}/regions/{region}/subnetworks/{resourceId}.

producerInstanceLocation

enum (ProducerInstanceLocation)

Required. ProducerInstanceLocation is used to specify which authorization mechanism to use to determine which projects the Producer instance can be within.

allowedGoogleProducersResourceHierarchyLevel[]

string

Optional. List of Projects, Folders, or Organizations from where the Producer instance can be within. For example, a network administrator can provide both 'organizations/foo' and 'projects/bar' as allowed_google_producers_resource_hierarchy_levels. This allowlists this network to connect with any Producer instance within the 'foo' organization or the 'bar' project. By default, allowedGoogleProducersResourceHierarchyLevel is empty. The format for each allowedGoogleProducersResourceHierarchyLevel is / where is one of 'projects', 'folders', or 'organizations' and is either the ID or the number of the resource type. Format for each allowedGoogleProducersResourceHierarchyLevel value: 'projects/' or 'folders/' or 'organizations/' Eg. [projects/my-project-id, projects/567, folders/891, organizations/123]

limit

string (int64 format)

Optional. Max number of PSC connections for this policy.

ProducerInstanceLocation

ProducerInstanceLocation is used to specify which authorization mechanism to use to determine which projects the Producer instance can be within.

Enums
PRODUCER_INSTANCE_LOCATION_UNSPECIFIED Producer instance location is not specified. When this option is chosen, then the PSC connections created by this ServiceConnectionPolicy must be within the same project as the Producer instance. This is the default ProducerInstanceLocation value. To allow for PSC connections from this network to other networks, use the CUSTOM_RESOURCE_HIERARCHY_LEVELS option.
CUSTOM_RESOURCE_HIERARCHY_LEVELS Producer instance must be within one of the values provided in allowedGoogleProducersResourceHierarchyLevel.

PscConnection

Information about a specific Private Service Connect connection.

JSON representation
{
  "state": enum (State),
  "consumerForwardingRule": string,
  "consumerAddress": string,
  "errorType": enum (ConnectionErrorType),
  "error": {
    object (Status)
  },
  "gceOperation": string,
  "consumerTargetProject": string,
  "pscConnectionId": string,
  "errorInfo": {
    object (ErrorInfo)
  },
  "selectedSubnetwork": string,
  "producerInstanceId": string,
  "producerInstanceMetadata": {
    string: string,
    ...
  },
  "serviceClass": string
}
Fields
state

enum (State)

State of the PSC Connection

consumerForwardingRule

string

The resource reference of the PSC Forwarding Rule within the consumer VPC.

consumerAddress

string

The resource reference of the consumer address.

errorType
(deprecated)

enum (ConnectionErrorType)

The error type indicates whether the error is consumer facing, producer facing or system internal.

error
(deprecated)

object (Status)

The most recent error during operating this connection. Deprecated, please use errorInfo instead.

gceOperation

string

The last Compute Engine operation to setup PSC connection.

consumerTargetProject

string

The project where the PSC connection is created.

pscConnectionId

string

The PSC connection id of the PSC forwarding rule.

errorInfo

object (ErrorInfo)

Output only. The error info for the latest error during operating this connection.

selectedSubnetwork

string

Output only. The URI of the subnetwork selected to allocate IP address for this connection.

producerInstanceId
(deprecated)

string

Immutable. Deprecated. Use producerInstanceMetadata instead. An immutable identifier for the producer instance.

producerInstanceMetadata

map (key: string, value: string)

Immutable. An immutable map for the producer instance metadata.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

serviceClass

string

Output only. [Output only] The service class associated with this PSC Connection. The value is derived from the SCPolicy and matches the service class name provided by the customer.

State

The state of the PSC connection.

Enums
STATE_UNSPECIFIED An invalid state as the default case.
ACTIVE The connection has been created successfully. However, for the up-to-date connection status, please use the created forwarding rule's "PscConnectionStatus" as the source of truth.
FAILED The connection is not functional since some resources on the connection fail to be created.
CREATING The connection is being created.
DELETING The connection is being deleted.

Methods

create

Creates a new ServiceConnectionPolicy in a given project and location.

delete

Deletes a single ServiceConnectionPolicy.

get

Gets details of a single ServiceConnectionPolicy.

list

Lists ServiceConnectionPolicies in a given project and location.

patch

Updates the parameters of a single ServiceConnectionPolicy.