Update resource pool


Updates the resource pool for the specified resource pool ID.

This topic includes the following sections:

Request

HTTP method: PUT

Request URLhttps://portal.us1.onbmc.com/cloudops/api/v1/resource_pools/{resource_pool_id}

HeaderSee HTTP-request-and-response-headers for header information, such as required authorization token.

Path parameters

Parameter

Type

Description

Usage

resource_pool_id

String

ID of resource pool

Required

Request body properties

Property

Type

Required

Description

resource_pool_id

UUID

Yes

Resource pool ID.

name

String

Yes

Name of the resource pool.

description

String

No

Description of the resource pool that is created.

criteria


Yes

Defines the criteria based on which the resources are selected to be a part of this resources pool.

account_id

String

Yes

Identifier of the cloud account that the resource belongs to. Must be set to UNKNOWN for on-premises resources.

account name

String

No

The display name of the account_id.

provider_id

String

Yes

Cloud provider ID like aws, azure, gcp; or any string that identifies any on-premises product or private cloud.

Example: mumbai datacenter

tags

String

No

Vendor tags that are set on the actual source of the resource are stored here.

Example: Tags created by the customer on the AWS EC2 instance.

If tags are present in the POST /resources api call, all the existing tags are replaced by the new set of tags.

owner

Boolean

Yes

True: org_id is the owner of the resource_pool_id and has full access on the resource pool, that is, read/write and all other operations are allowed.

False: Only read access is allowed.

resource_name

String

No

Resource name that must belong to the resource pool, that is, all resources that have this name are selected.

Example request JSON

{
   "resource_pool_id" : "abcde-xyz-12345",
   "name": "Austin Resources",
   "description": "All austin resources",
   "criteria": [
        {
           "accounts": [
                {
                   "account_id": "1234567890",
                   "account_name": "AWS-Account-1",
                   "provider_id": "aws"
                },
                {
                   "account_id": "12345678900",
                   "account_name": "GCP-Account-1",
                   "provider_id": "GCP"
                }
            ],
           "tags": {
               "Name": [
                   "DNS Server"
                ],
               "Owner": [
                   "admin",
                   "dev"
                ]
            },
           "services": [
                {
                   "provider_id": "aws",
                   "service_id": "AmazonDynamoDB",
                   "service_name": "Amazon DynamoDB"
                },
                {
                   "provider_id": "azure",
                   "service_id": "AzureEC2",
                   "service_name": "Azure Elastic Compute Cloud"
                },
                {
                   "provider_id": "gcp",
                   "service_id": "GCPEC2",
                   "service_name": "GCP Elastic Compute Cloud"
                }
            ],
           "resource_name": ""
        },
        {
           "accounts": [
                {
                   "account_id": "12345678910",
                   "account_name": "AZURE-Account-2",
                   "provider_id": "AZURE"
                },
                {
                   "account_id": "12345678920",
                   "account_name": "GCP-Account-4",
                   "provider_id": "GCP"
                },
                {
                   "account_id": "1234567890",
                   "account_name": "AWS-Account-1",
                   "provider_id": "aws"
                }
            ],
           "tags": {},
           "services": [],
           "resource_name": ""
        }
    ]
}

Sample showback request body

{
 "resource_pool_id": "abcde-xyz-12345",
 "properties": {
   "is_business_service": false
  },
 "name": "Withtag support",
 "description": "",
 "criteria": [
    {
     "accounts": [
        {
         "provider_id": "on-premises",
         "account_id": "test.dev.com",
         "account_name": "dev- 007"
        }
      ],
     "services": [],
     "tags": {
       "Virtualization Compatibility": [
         "HyperV-compatible",
         "KVM-compatible",
         "VMware-compatible",
         "XenServer-compatible",
         "%Hyper%"
        ]
      },
     "resource_name": ""
    }
  ],
 "tags": [
    {
     "key": "aws:createdBy",
     "value": "IAMUser:mercury:abc"
    }
  ]
}

Support sample request body

{
 "resource_pool_id" : "abcde-xyz-1234567",
 "properties" : {
   "is_business_service" : false
  },
 "name" : "Withtag support",
 "description" : "",
 "criteria" : [ {
   "accounts" : [ {
     "provider_id" : "on-premises",
     "account_id" : "xxx.yyy.com",
     "account_name" : "dev -007"
    } ],
   "services" : [ ],
   "tags" : {
     "Virtualization Compatibility" : [ "HyperV-compatible", "KVM-compatible", "VMware-compatible", "XenServer-compatible", "%Hyper%" ]
      
    },
   "resource_name" : ""
  } ]
}

Response

Example response JSON

HTTP/1.1 200 OK

{
   "resource_pool_id" : "abcde-xyz-12345",
   "name": "Austin Resources",
   "description": "All austin resources",
   "criteria": [
        {
           "accounts": [
                {
                   "account_id": "1234567890",
                   "account_name": "AWS-Account-1",
                   "provider_id": "aws"
                },
                {
                   "account_id": "12345678900",
                   "account_name": "GCP-Account-1",
                   "provider_id": "GCP"
                }
            ],
           "tags": {
               "Name": [
                   "DNS Server"
                ],
               "Owner": [
                   "admin",
                   "dev"
                ]
            },
           "services": [
                {
                   "provider_id": "aws",
                   "service_id": "AmazonDynamoDB",
                   "service_name": "Amazon DynamoDB"
                },
                {
                   "provider_id": "azure",
                   "service_id": "AzureEC2",
                   "service_name": "Azure Elastic Compute Cloud"
                },
                {
                   "provider_id": "gcp",
                   "service_id": "GCPEC2",
                   "service_name": "GCP Elastic Compute Cloud"
                }
            ],
           "resource_name": ""
        },
        {
           "accounts": [
                {
                   "account_id": "12345678910",
                   "account_name": "AZURE-Account-2",
                   "provider_id": "AZURE"
                },
                {
                   "account_id": "12345678920",
                   "account_name": "GCP-Account-4",
                   "provider_id": "GCP"
                },
                {
                   "account_id": "1234567890",
                   "account_name": "AWS-Account-1",
                   "provider_id": "aws"
                }
            ],
           "tags": {},
           "services": [],
           "resource_name": ""
        }
    ]
}

Status code and message

HTTP code

Message

Description

200

OK

Request succeeded

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Helix Cloud Cost