# Infrastructure Manager V1 API - Class Google::Cloud::Config::V1::Resource (v0.2.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [0.2.0 (latest)](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-config-v1/latest/Google-Cloud-Config-V1-Resource)
- [0.1.0](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-config-v1/0.1.0/Google-Cloud-Config-V1-Resource)
Reference documentation and code samples for the Infrastructure Manager V1 API class Google::Cloud::Config::V1::Resource.

Resource represents a Google Cloud Platform resource actuated by IM.
Resources are child resources of Revisions.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #cai_assets

    def cai_assets() -> ::Google::Protobuf::Map{::String => ::Google::Cloud::Config::V1::ResourceCAIInfo}

**Returns**

- (::Google::Protobuf::Map{::String =\> ::Google::Cloud::Config::V1::ResourceCAIInfo}) --- Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI ID). CAI type format follows https://cloud.google.com/asset-inventory/docs/supported-asset-types

### #intent

    def intent() -> ::Google::Cloud::Config::V1::Resource::Intent

**Returns**

- ([::Google::Cloud::Config::V1::Resource::Intent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-config-v1/latest/Google-Cloud-Config-V1-Resource-Intent)) --- Output only. Intent of the resource.

### #name

    def name() -> ::String

**Returns**

- (::String) --- Output only. Resource name. Format: `projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}`

### #state

    def state() -> ::Google::Cloud::Config::V1::Resource::State

**Returns**

- ([::Google::Cloud::Config::V1::Resource::State](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-config-v1/latest/Google-Cloud-Config-V1-Resource-State)) --- Output only. Current state of the resource.

### #terraform_info

    def terraform_info() -> ::Google::Cloud::Config::V1::ResourceTerraformInfo

**Returns**

- ([::Google::Cloud::Config::V1::ResourceTerraformInfo](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-config-v1/latest/Google-Cloud-Config-V1-ResourceTerraformInfo)) --- Output only. Terraform-specific info if this resource was created using Terraform.