# Security Command Center V2 API - Class Google::Cloud::SecurityCenter::V2::Resource (v1.8.0)

1.8.0 (latest) 1.7.1 1.6.0 1.5.1 1.4.0 1.3.0 1.2.0 1.1.1 1.0.0 0.6.0 0.5.0 0.4.1 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the Security Command Center V2 API class Google::Cloud::SecurityCenter::V2::Resource.

Information related to the Google Cloud resource.

## Inherits

- [Object](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Cloud-SecurityCenter-V2-Kubernetes-Object)

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #aws_metadata

    def aws_metadata() -> ::Google::Cloud::SecurityCenter::V2::AwsMetadata

**Returns**

- ([::Google::Cloud::SecurityCenter::V2::AwsMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Cloud-SecurityCenter-V2-AwsMetadata)) --- The AWS metadata associated with the finding.


  Note: The following fields are mutually exclusive: `aws_metadata`, `gcp_metadata`, `azure_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #aws_metadata=

    def aws_metadata=(value) -> ::Google::Cloud::SecurityCenter::V2::AwsMetadata

**Parameter**

- **value** ([::Google::Cloud::SecurityCenter::V2::AwsMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Cloud-SecurityCenter-V2-AwsMetadata)) --- The AWS metadata associated with the finding.


  Note: The following fields are mutually exclusive: `aws_metadata`, `gcp_metadata`, `azure_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::SecurityCenter::V2::AwsMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Cloud-SecurityCenter-V2-AwsMetadata)) --- The AWS metadata associated with the finding.


  Note: The following fields are mutually exclusive: `aws_metadata`, `gcp_metadata`, `azure_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #azure_metadata

    def azure_metadata() -> ::Google::Cloud::SecurityCenter::V2::AzureMetadata

**Returns**

- ([::Google::Cloud::SecurityCenter::V2::AzureMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Cloud-SecurityCenter-V2-AzureMetadata)) --- The Azure metadata associated with the finding.


  Note: The following fields are mutually exclusive: `azure_metadata`, `gcp_metadata`, `aws_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #azure_metadata=

    def azure_metadata=(value) -> ::Google::Cloud::SecurityCenter::V2::AzureMetadata

**Parameter**

- **value** ([::Google::Cloud::SecurityCenter::V2::AzureMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Cloud-SecurityCenter-V2-AzureMetadata)) --- The Azure metadata associated with the finding.


  Note: The following fields are mutually exclusive: `azure_metadata`, `gcp_metadata`, `aws_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::SecurityCenter::V2::AzureMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Cloud-SecurityCenter-V2-AzureMetadata)) --- The Azure metadata associated with the finding.


  Note: The following fields are mutually exclusive: `azure_metadata`, `gcp_metadata`, `aws_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #cloud_provider

    def cloud_provider() -> ::Google::Cloud::SecurityCenter::V2::CloudProvider

**Returns**

- ([::Google::Cloud::SecurityCenter::V2::CloudProvider](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Cloud-SecurityCenter-V2-CloudProvider)) --- Indicates which cloud provider the finding is from.

### #cloud_provider=

    def cloud_provider=(value) -> ::Google::Cloud::SecurityCenter::V2::CloudProvider

**Parameter**

- **value** ([::Google::Cloud::SecurityCenter::V2::CloudProvider](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Cloud-SecurityCenter-V2-CloudProvider)) --- Indicates which cloud provider the finding is from.
**Returns**

- ([::Google::Cloud::SecurityCenter::V2::CloudProvider](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Cloud-SecurityCenter-V2-CloudProvider)) --- Indicates which cloud provider the finding is from.

### #display_name

    def display_name() -> ::String

**Returns**

- (::String) --- The human readable name of the resource.

### #display_name=

    def display_name=(value) -> ::String

**Parameter**

- **value** (::String) --- The human readable name of the resource.
**Returns**

- (::String) --- The human readable name of the resource.

### #gcp_metadata

    def gcp_metadata() -> ::Google::Cloud::SecurityCenter::V2::GcpMetadata

**Returns**

- ([::Google::Cloud::SecurityCenter::V2::GcpMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Cloud-SecurityCenter-V2-GcpMetadata)) --- The GCP metadata associated with the finding.


  Note: The following fields are mutually exclusive: `gcp_metadata`, `aws_metadata`, `azure_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #gcp_metadata=

    def gcp_metadata=(value) -> ::Google::Cloud::SecurityCenter::V2::GcpMetadata

**Parameter**

- **value** ([::Google::Cloud::SecurityCenter::V2::GcpMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Cloud-SecurityCenter-V2-GcpMetadata)) --- The GCP metadata associated with the finding.


  Note: The following fields are mutually exclusive: `gcp_metadata`, `aws_metadata`, `azure_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::SecurityCenter::V2::GcpMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Cloud-SecurityCenter-V2-GcpMetadata)) --- The GCP metadata associated with the finding.


  Note: The following fields are mutually exclusive: `gcp_metadata`, `aws_metadata`, `azure_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #location

    def location() -> ::String

**Returns**

- (::String) --- The region or location of the service (if applicable).

### #location=

    def location=(value) -> ::String

**Parameter**

- **value** (::String) --- The region or location of the service (if applicable).
**Returns**

- (::String) --- The region or location of the service (if applicable).

### #name

    def name() -> ::String

**Returns**

- (::String) --- The full resource name of the resource. See: https://cloud.google.com/apis/design/resource_names#full_resource_name

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- The full resource name of the resource. See: https://cloud.google.com/apis/design/resource_names#full_resource_name
**Returns**

- (::String) --- The full resource name of the resource. See: https://cloud.google.com/apis/design/resource_names#full_resource_name

### #resource_path

    def resource_path() -> ::Google::Cloud::SecurityCenter::V2::ResourcePath

**Returns**

- ([::Google::Cloud::SecurityCenter::V2::ResourcePath](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Cloud-SecurityCenter-V2-ResourcePath)) --- Provides the path to the resource within the resource hierarchy.

### #resource_path=

    def resource_path=(value) -> ::Google::Cloud::SecurityCenter::V2::ResourcePath

**Parameter**

- **value** ([::Google::Cloud::SecurityCenter::V2::ResourcePath](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Cloud-SecurityCenter-V2-ResourcePath)) --- Provides the path to the resource within the resource hierarchy.
**Returns**

- ([::Google::Cloud::SecurityCenter::V2::ResourcePath](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Cloud-SecurityCenter-V2-ResourcePath)) --- Provides the path to the resource within the resource hierarchy.

### #resource_path_string

    def resource_path_string() -> ::String

**Returns**

- (::String) --- A string representation of the resource path. For Google Cloud, it has the format of `organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id}` where there can be any number of folders. For AWS, it has the format of `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}` where there can be any number of organizational units. For Azure, it has the format of `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}` where there can be any number of management groups.

### #resource_path_string=

    def resource_path_string=(value) -> ::String

**Parameter**

- **value** (::String) --- A string representation of the resource path. For Google Cloud, it has the format of `organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id}` where there can be any number of folders. For AWS, it has the format of `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}` where there can be any number of organizational units. For Azure, it has the format of `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}` where there can be any number of management groups.
**Returns**

- (::String) --- A string representation of the resource path. For Google Cloud, it has the format of `organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id}` where there can be any number of folders. For AWS, it has the format of `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}` where there can be any number of organizational units. For Azure, it has the format of `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}` where there can be any number of management groups.

### #service

    def service() -> ::String

**Returns**

- (::String) --- The service or resource provider associated with the resource.

### #service=

    def service=(value) -> ::String

**Parameter**

- **value** (::String) --- The service or resource provider associated with the resource.
**Returns**

- (::String) --- The service or resource provider associated with the resource.

### #type

    def type() -> ::String

**Returns**

- (::String) --- The full resource type of the resource.

### #type=

    def type=(value) -> ::String

**Parameter**

- **value** (::String) --- The full resource type of the resource.
**Returns**

- (::String) --- The full resource type of the resource.