|
| 1 | +--- |
| 2 | +subcategory: "Cloud Operations Center (COC)" |
| 3 | +layout: "huaweicloud" |
| 4 | +page_title: "HuaweiCloud: huaweicloud_coc_resources" |
| 5 | +description: |- |
| 6 | + Use this data source to get the list of COC resources. |
| 7 | +--- |
| 8 | + |
| 9 | +# huaweicloud_coc_resources |
| 10 | + |
| 11 | +Use this data source to get the list of COC resources. |
| 12 | + |
| 13 | +## Example Usage |
| 14 | + |
| 15 | +```hcl |
| 16 | +variable "cloud_service_name" {} |
| 17 | +variable "type" {} |
| 18 | +
|
| 19 | +data "huaweicloud_coc_resources" "test" { |
| 20 | + cloud_service_name = var.cloud_service_name |
| 21 | + type = var.type |
| 22 | +} |
| 23 | +``` |
| 24 | + |
| 25 | +## Argument Reference |
| 26 | + |
| 27 | +The following arguments are supported: |
| 28 | + |
| 29 | +* `cloud_service_name` - (Required, String) Specifies the cloud service name. |
| 30 | + |
| 31 | +* `type` - (Required, String) Specifies the resource type name. |
| 32 | + |
| 33 | +* `name` - (Optional, String) Specifies the cloud resource name. |
| 34 | + |
| 35 | +* `ep_id` - (Optional, String) Specifies the enterprise project ID. |
| 36 | + |
| 37 | +* `project_id` - (Optional, String) Specifies the project ID. |
| 38 | + |
| 39 | +* `region_id` - (Optional, String) Specifies the region ID. |
| 40 | + |
| 41 | +* `az_id` - (Optional, String) Specifies the availability zone ID. |
| 42 | + |
| 43 | +* `ip_type` - (Optional, String) Specifies the IP type. |
| 44 | + Values can be as follows: |
| 45 | + + **fixed**: Intranet IP. |
| 46 | + + **floating**: Elastic public IP. |
| 47 | + |
| 48 | +* `ip` - (Optional, String) Specifies the cloud resource IP. |
| 49 | + |
| 50 | +* `ip_list` - (Optional, List) Specifies the cloud resource IP list. |
| 51 | + |
| 52 | +* `resource_id_list` - (Optional, List) Specifies the resource ID list. |
| 53 | + |
| 54 | +* `status` - (Optional, String) Specifies the resource status. |
| 55 | + |
| 56 | + For details, see [status](https://support.huaweicloud.com/api-ecs/ecs_08_0002.html) |
| 57 | + |
| 58 | +* `agent_state` - (Optional, String) Specifies the unified agent status. |
| 59 | + |
| 60 | +* `image_name` - (Optional, String) Specifies the image name. |
| 61 | + |
| 62 | +* `os_type` - (Optional, String) Specifies the cloud resource operating system type. |
| 63 | + |
| 64 | +* `tag` - (Optional, String) Specifies the tags for cloud resources. The format of the tag is **key.value**. |
| 65 | + When naming tags, the following requirements must be met: |
| 66 | + + The **key** of the tag can only contain uppercase letters (A~Z), lowercase letters (a~z), numbers (0-9), |
| 67 | + underscores (\_), hyphens (-), and Chinese characters. |
| 68 | + + The **value** of the tag can only contain uppercase letters (A~Z),lowercase letters (a~z), numbers (0-9), |
| 69 | + underscores (\_), hyphens (-), decimal points (.), and Chinese characters. |
| 70 | + |
| 71 | +* `tag_key` - (Optional, String) Specifies the tag key of the cloud resource. |
| 72 | + |
| 73 | +* `group_id` - (Optional, String) Specifies the group ID of the cloud resource. |
| 74 | + |
| 75 | +* `component_id` - (Optional, String) Specifies the component ID of the cloud resource. |
| 76 | + |
| 77 | +* `application_id` - (Optional, String) Specifies the application ID of the cloud resource. |
| 78 | + |
| 79 | +* `cce_cluster_id` - (Optional, String) Specifies the CCE cluster ID. |
| 80 | + |
| 81 | +* `vpc_id` - (Optional, String) Specifies the virtual private cloud ID. |
| 82 | + |
| 83 | +* `is_delegated` - (Optional, Bool) Specifies whether the resource is delegated. |
| 84 | + |
| 85 | +* `operable` - (Optional, String) Specifies whether the user defined resource can operate the instance. If the value |
| 86 | + is **enable**, it is enabled; if the current field does not exist, it is not enabled. |
| 87 | + |
| 88 | +* `is_collected` - (Optional, Bool) Specifies whether it is a favorite. |
| 89 | + |
| 90 | +* `flavor_name` - (Optional, String) Specifies the cloud resource specification name. |
| 91 | + |
| 92 | +* `charging_mode` - (Optional, String) Specifies the billing type for the cloud server. |
| 93 | + Values can be as follows: |
| 94 | + + **0**: On demand billing. |
| 95 | + + **1**: Yearly package or monthly package. |
| 96 | + + **2**: Award based billing. |
| 97 | + |
| 98 | +## Attribute Reference |
| 99 | + |
| 100 | +In addition to all arguments above, the following attributes are exported: |
| 101 | + |
| 102 | +* `id` - The data source ID. |
| 103 | + |
| 104 | +* `data` - Indicates the resource list. |
| 105 | + |
| 106 | + The [data](#data_struct) structure is documented below. |
| 107 | + |
| 108 | +<a name="data_struct"></a> |
| 109 | +The `data` block supports: |
| 110 | + |
| 111 | +* `id` - Indicates the resource ID assigned by the CMDB. |
| 112 | + |
| 113 | +* `resource_id` - Indicates the resource ID. |
| 114 | + |
| 115 | +* `name` - Indicates the resource name. |
| 116 | + |
| 117 | +* `ep_id` - Indicates the enterprise project ID. |
| 118 | + |
| 119 | +* `project_id` - Indicates the project ID in OpenStack. |
| 120 | + |
| 121 | +* `domain_id` - Indicates the tenant ID. |
| 122 | + |
| 123 | +* `cloud_service_name` - Indicates the cloud service name. |
| 124 | + |
| 125 | +* `type` - Indicates the resource type. |
| 126 | + |
| 127 | +* `region_id` - Indicates the region ID. |
| 128 | + |
| 129 | +* `tags` - Indicates the resource tags. |
| 130 | + |
| 131 | + The [tags](#data_tags_struct) structure is documented below. |
| 132 | + |
| 133 | +* `properties` - Indicates the resource properties. |
| 134 | + |
| 135 | +* `ingest_properties` - Indicates the ingest attributes of the resource. |
| 136 | + |
| 137 | +* `agent_id` - Indicates the ID assigned by unified agent. |
| 138 | + |
| 139 | +* `agent_state` - Indicates the unified agent status. |
| 140 | + |
| 141 | +* `is_delegated` - Indicates whether the resource is delegated. |
| 142 | + |
| 143 | +* `operable` - Indicates whether the user defined resource can operate the instance. If the value is **enable**, it is |
| 144 | + enabled; if the current field does not exist, it is not enabled. |
| 145 | + |
| 146 | +<a name="data_tags_struct"></a> |
| 147 | +The `tags` block supports: |
| 148 | + |
| 149 | +* `key` - Indicates the key of the tag. |
| 150 | + |
| 151 | +* `value` - Indicates the value of the tag. |
0 commit comments