# Network Connectivity V1 API - Class Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy (v1.14.0)

1.14.0 (latest) 1.13.0 1.12.0 1.11.0 1.10.1 1.9.0 1.8.0 1.7.0 1.6.0 1.5.1 1.4.0 1.3.0 1.2.0 1.1.0 1.0.1 0.10.0 0.9.2 0.8.0 0.7.0 0.6.1 0.5.0 0.4.1 0.3.0 0.2.0 0.1.4 Reference documentation and code samples for the Network Connectivity V1 API class Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy.

The ServiceConnectionPolicy resource.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #create_time

    def create_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Protobuf-Timestamp)) --- Output only. Time when the ServiceConnectionPolicy was created.

### #description

    def description() -> ::String

**Returns**

- (::String) --- A description of this resource.

### #description=

    def description=(value) -> ::String

**Parameter**

- **value** (::String) --- A description of this resource.
**Returns**

- (::String) --- A description of this resource.

### #etag

    def etag() -> ::String

**Returns**

- (::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.

### #etag=

    def etag=(value) -> ::String

**Parameter**

- **value** (::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.
**Returns**

- (::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.

### #infrastructure

    def infrastructure() -> ::Google::Cloud::NetworkConnectivity::V1::Infrastructure

**Returns**

- ([::Google::Cloud::NetworkConnectivity::V1::Infrastructure](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-Infrastructure)) --- Output only. The type of underlying resources used to create the connection.

### #labels

    def labels() -> ::Google::Protobuf::Map{::String => ::String}

**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- User-defined labels.

### #labels=

    def labels=(value) -> ::Google::Protobuf::Map{::String => ::String}

**Parameter**

- **value** (::Google::Protobuf::Map{::String =\> ::String}) --- User-defined labels.
**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- User-defined labels.

### #name

    def name() -> ::String

**Returns**

- (::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

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::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
**Returns**

- (::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

### #network

    def network() -> ::String

**Returns**

- (::String) --- The resource path of the consumer network.
  Example:

  - projects/{projectNumOrId}/global/networks/{resourceId}.

### #network=

    def network=(value) -> ::String

**Parameter**

- **value** (::String) ---

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

- (::String) --- The resource path of the consumer network.
  Example:

  - projects/{projectNumOrId}/global/networks/{resourceId}.

### #psc_config

    def psc_config() -> ::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::PscConfig

**Returns**

- ([::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::PscConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-ServiceConnectionPolicy-PscConfig)) --- Configuration used for Private Service Connect connections. Used when Infrastructure is PSC.

### #psc_config=

    def psc_config=(value) -> ::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::PscConfig

**Parameter**

- **value** ([::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::PscConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-ServiceConnectionPolicy-PscConfig)) --- Configuration used for Private Service Connect connections. Used when Infrastructure is PSC.
**Returns**

- ([::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::PscConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-ServiceConnectionPolicy-PscConfig)) --- Configuration used for Private Service Connect connections. Used when Infrastructure is PSC.

### #psc_connections

    def psc_connections() -> ::Array<::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::PscConnection>

**Returns**

- (::Array\<[::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::PscConnection](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-ServiceConnectionPolicy-PscConnection)\>) --- Output only. \[Output only\] Information about each Private Service Connect connection.

### #service_class

    def service_class() -> ::String

**Returns**

- (::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.

### #service_class=

    def service_class=(value) -> ::String

**Parameter**

- **value** (::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.
**Returns**

- (::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.

### #update_time

    def update_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Protobuf-Timestamp)) --- Output only. Time when the ServiceConnectionPolicy was updated.