Google Cloud Network Connectivity V1 Client - Class ServiceConnectionPolicy (2.2.0)

Reference documentation and code samples for the Google Cloud Network Connectivity V1 Client class ServiceConnectionPolicy.

The ServiceConnectionPolicy resource.

Generated from protobuf message google.cloud.networkconnectivity.v1.ServiceConnectionPolicy

Namespace

Google \ Cloud \ NetworkConnectivity \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ name string

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

↳ create_time Google\Protobuf\Timestamp

Output only. Time when the ServiceConnectionPolicy was created.

↳ update_time Google\Protobuf\Timestamp

Output only. Time when the ServiceConnectionPolicy was updated.

↳ labels array|Google\Protobuf\Internal\MapField

User-defined labels.

↳ description string

A description of this resource.

↳ network string

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

↳ service_class 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 int

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

↳ psc_config ServiceConnectionPolicy\PscConfig

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

↳ psc_connections array<ServiceConnectionPolicy\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.

getName

Immutable. The name of a ServiceConnectionPolicy.

Format: projects/{project}/locations/{location}/serviceConnectionPolicies/{service_connection_policy} See: https://google.aip.dev/122#fields-representing-resource-names

Returns
Type Description
string

setName

Immutable. The name of a ServiceConnectionPolicy.

Format: projects/{project}/locations/{location}/serviceConnectionPolicies/{service_connection_policy} See: https://google.aip.dev/122#fields-representing-resource-names

Parameter
Name Description
var string
Returns
Type Description
$this

getCreateTime

Output only. Time when the ServiceConnectionPolicy was created.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Output only. Time when the ServiceConnectionPolicy was created.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getUpdateTime

Output only. Time when the ServiceConnectionPolicy was updated.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

Output only. Time when the ServiceConnectionPolicy was updated.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getLabels

User-defined labels.

Returns
Type Description
Google\Protobuf\Internal\MapField

setLabels

User-defined labels.

Parameter
Name Description
var array|Google\Protobuf\Internal\MapField
Returns
Type Description
$this

getDescription

A description of this resource.

Returns
Type Description
string

setDescription

A description of this resource.

Parameter
Name Description
var string
Returns
Type Description
$this

getNetwork

The resource path of the consumer network.

Example:

  • projects/{projectNumOrId}/global/networks/{resourceId}.
Returns
Type Description
string

setNetwork

The resource path of the consumer network.

Example:

  • projects/{projectNumOrId}/global/networks/{resourceId}.
Parameter
Name Description
var string
Returns
Type Description
$this

getServiceClass

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.

Returns
Type Description
string

setServiceClass

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.

Parameter
Name Description
var string
Returns
Type Description
$this

getInfrastructure

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

Returns
Type Description
int

setInfrastructure

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

Parameter
Name Description
var int
Returns
Type Description
$this

getPscConfig

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

Returns
Type Description
ServiceConnectionPolicy\PscConfig|null

hasPscConfig

clearPscConfig

setPscConfig

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

Parameter
Name Description
var ServiceConnectionPolicy\PscConfig
Returns
Type Description
$this

getPscConnections

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

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setPscConnections

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

Parameter
Name Description
var array<ServiceConnectionPolicy\PscConnection>
Returns
Type Description
$this

getEtag

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.

Returns
Type Description
string

hasEtag

clearEtag

setEtag

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.

Parameter
Name Description
var string
Returns
Type Description
$this