Get a list of all resource groups
GET /v2/resource_groups
Call this method to retrieve information about all resource groups and associated quotas in an account. The `id` returned in the response can be used to create a resource instance later. The response can be filtered based on queryParams such as `account_id`, `name`, `default`, and more to narrow your search.Users need to be assigned IAM policies with the Viewer role or higher on the targeted resource groups.
Authorization
To call this method, you must be assigned one or more IAM access roles that include the following action.
resource-controller.group.retrieve
Request
Path Parameters
Query Parameters
account_id
string
The ID of the account that contains the resource groups that you want to get.
date
string
The date in the format of YYYY-MM which returns resource groups created in the specified year-month.
name
string
The name of the resource group.
default
boolean
Boolean value to specify whether or not to list default resource groups.
include_deleted
boolean
Boolean value to specify whether or not to list deleted resource groups.
Response
200 - The resource groups was successfully retrieved.
resources
array
The list of resource groups
400 -
401 -
403 -
404 -
429 -
500 -
Create a resource group
POST /v2/resource_groups
Create a resource group in an account to organize your account resources in customizable groupings so that you can quickly assign users access to more than one resource at a time. To learn what makes a good resource group strategy, see Best practices for organizing resources. A default resource group is created when an account is created. If you have a Lite account or 30-day trial, you cannot create extra resource groups, but you can rename your default resource group. If you have a Pay-As-You-Go or Subscription account, you can create multiple resource groups. You must be assigned an IAM policy with the Administrator role on All Account Management services to create extra resource groups.
Authorization
To call this method, you must be assigned one or more IAM access roles that include the following action.
resource-controller.group.create
Request
Request Body
ReqBodyResourceGroupPost
name
Required *
string
The new name of the resource group.
account_id
Required *
string
The account id of the resource group.
Response
201 - Resource group has been created.
id
string
An alpha-numeric value identifying the resource group.
crn
string
The full CRN (cloud resource name) associated with the resource group. For more on this format, see Cloud Resource Names.
400 -
401 -
403 -
404 -
429 -
500 -
Get a resource group
GET /v2/resource_groups/{id}
Retrieve a resource group by alias ID. Call this method to get details about a particular resource group, like the name of the resource group, associated quotas, whether the state is active, the resource group ID and the CRN. The `id` returned in the response can be used to create a resource instance later. Users need to be assigned an IAM policy with the Viewer role or higher on the targeted resource group.
Authorization
To call this method, you must be assigned one or more IAM access roles that include the following action.
resource-controller.group.retrieve
Request
Response
200 - 200 OK
id
string
An alpha-numeric value identifying the resource group.
crn
string
The full CRN (cloud resource name) associated with the resource group. For more on this format, see Cloud Resource Names.
account_id
string
An alpha-numeric value identifying the account ID.
name
string
The human-readable name of the resource group.
state
string
The state of the resource group.
default
boolean
Identify if this resource group is default of the account or not.
quota_id
string
An alpha-numeric value identifying the quota ID associated with the resource group.
quota_url
string
The URL to access the quota details that associated with the resource group.
payment_methods_url
string
The URL to access the payment methods details that associated with the resource group.
resource_linkages
array
An array of the resources that linked to the resource group.
teams_url
string
The URL to access the team details that associated with the resource group.
created_at
string
The date when the resource group was initially created.
updated_at
string
The date when the resource group was last updated.
401 -
403 -
404 -
429 -
500 -
Update a resource group
PATCH /v2/resource_groups/{id}
Update a resource group by the alias ID. Call this method to update information about an existing resource group. You can rename a resource group and activate or suspend a particular resource group. To update a resource group, users need to be assigned with IAM policies with the Editor role or higher.
Authorization
To call this method, you must be assigned one or more IAM access roles that include the following action.
resource-controller.group.update
Request
Request Body
ReqBodyResourceGroupPatch
name
Required *
string
The new name of the resource group.
state
string
The state of the resource group.
Response
200 - Successfully updated resource group.
id
string
An alpha-numeric value identifying the resource group.
crn
string
The full CRN (cloud resource name) associated with the resource group. For more on this format, see Cloud Resource Names.
account_id
string
An alpha-numeric value identifying the account ID.
name
string
The human-readable name of the resource group.
state
string
The state of the resource group.
default
boolean
Identify if this resource group is default of the account or not.
quota_id
string
An alpha-numeric value identifying the quota ID associated with the resource group.
quota_url
string
The URL to access the quota details that associated with the resource group.
payment_methods_url
string
The URL to access the payment methods details that associated with the resource group.
resource_linkages
array
An array of the resources that linked to the resource group.
teams_url
string
The URL to access the team details that associated with the resource group.
created_at
string
The date when the resource group was initially created.
updated_at
string
The date when the resource group was last updated.
400 -
401 -
403 -
404 -
429 -
500 -
Delete a resource group
DELETE /v2/resource_groups/{id}
Delete a resource group by the alias ID. You can delete a resource group only if the targeted resource group does not contain any resources or if it is not a default resource group. When a user creates an account, a default resource group is created in the account. If you want to delete a resource group that contains resources, first delete the resource instances. Then, delete the resource group when all resource instances in the group are deleted. Users need to be assigned an IAM policy with the Editor role or higher on the targeted resource group.
Authorization
To call this method, you must be assigned one or more IAM access roles that include the following action.
resource-controller.group.delete
Request
Response
204 - The resource group is successfully deleted.
400 -
401 -
403 -
404 -
429 -
500 -
List quota definitions
GET /v2/quota_definitions
Get a list of all quota definitions. Quotas for a resource group limit the number of apps, instances, and memory allowed for that specific resource group. Each resource group that you have on your account has a specific set of quotas. Standard quotas are for resource groups that are created by users with a Lite account, and Pay-As-You-Go quotas are for resource groups that are created with a Pay-As-You-Go account. This method provides list of all available quota definitions. No specific IAM policy needed.
Authorization
To call this method, you must be assigned one or more IAM access roles that include the following action.
resource-controller.quota.retrieve
Request
Response
200 - The quota definitions were successfully retrieved.
resources
array
The list of quota definitions
400 -
401 -
403 -
404 -
429 -
500 -
Get a quota definition
GET /v2/quota_definitions/{id}
Call this method to retrieve information about a particular quota by passing the quota ID. The response can be used to identify the quota type, Standard or Paid. Information about available resources, such as number of apps, number of service instances, and memory, are returned in the response. Quotas for a resource group limit the number of apps, instances, and memory allowed for that specific resource group. Each resource group that you have on your account has a specific set of quotas. Standard quotas are for resource groups that are created by users with a Lite account, and Pay-As-You-Go quotas are for resource groups that are created with a Pay-As-You-Go account. No specific IAM policy needed.
Authorization
To call this method, you must be assigned one or more IAM access roles that include the following action.
resource-controller.quota.retrieve
Request
Response
200 - The quota is successfully retrieved.
id
string
An alpha-numeric value identifying the quota.
name
string
The human-readable name of the quota.
type
string
The type of the quota.
number_of_apps
number
The total app limit.
number_of_service_instances
number
The total service instances limit per app.
default_number_of_instances_per_lite_plan
number
Default number of instances per lite plan.
instances_per_app
number
The total instances limit per app.
instance_memory
string
The total memory of app instance.
total_app_memory
string
The total app memory capacity.
vsi_limit
number
The VSI limit.
resource_quotas
array
The resource quotas associated with a quota definition.
created_at
string
The date when the quota was initially created.
updated_at
string
The date when the quota was last updated.