IBM Cloud Docs
Working with resources and resource groups (ibmcloud resource)

Working with resources and resource groups (ibmcloud resource)

A resource group is a way for you to organize your account resources in customizable groupings. Use the following commands from the IBM Cloud® Command Line Interface to manage IBM Cloud resources in a resource group.

ibmcloud resource groups

List resource groups.

ibmcloud resource groups [--default]

Command options

--default
Get the default group of the current account.

Examples

List all resource groups under the currently targeted account:

ibmcloud resource groups

List default group of currently targeted account:

ibmcloud resource groups --default

ibmcloud resource group

Show details of a resource group

ibmcloud resource group NAME [--id]

Command options

NAME (required)
Name of the resource group
--id
Show ID only

Examples

Show resource group example-group:

ibmcloud resource group example-group

Show only ID of resource group example-group:

ibmcloud resource group example-group --id

ibmcloud resource group-create

Create a resource group:

ibmcloud resource group-create NAME

Command options

NAME (required)
Name of the resource group

Examples

Create a resource group example-group:

ibmcloud resource group-create example-group

ibmcloud resource group-update

Update an existing resource group

ibmcloud resource group-update NAME [-n, --name NEW_NAME] [-f, --force]

Command options

NAME (required)
Name of the target resource group
-n, --name
New name of the resource group
-f, --force
Force update without confirmation

Examples

Rename resource group example-group to trial-group:

ibmcloud resource group-update example-group -n trial-group

ibmcloud resource group-delete

Delete an existing resource group

ibmcloud resource group-delete NAME [-f, --force]

Command options

NAME (required)
Name of the target resource group
-f, --force
Force deletion without confirmation

Examples

Delete resource group example-group:

ibmcloud resource group-delete example-group -f

ibmcloud resource quotas

List all quota definitions.

ibmcloud resource quotas

Examples

List all quota definitions:

ibmcloud resource quotas

ibmcloud resource quota

Show details of a quota definition.

ibmcloud resource quota NAME

Command options

NAME (required)
Name of the quota

Examples

Show details of quota free:

ibmcloud resource quota free

ibmcloud resource service-instances

List service instances.

ibmcloud resource service-instances [--service-name SERVICE_NAME] [--location LOCATION] [--type INSTANCE_TYPE] [-g RESOURCE_GROUP | --all-resource-groups] [--long] [--limit LIMIT] [--offset OFFSET] [--output FORMAT] [-q, --quiet]

Command options

--service-name SERVICE_NAME
Name of belonging service
--location LOCATION
Filter by location
--type INSTANCE_TYPE
Type of instances. The service_instance type is used if not specified. Use all to list all types of instances.
-g RESOURCE_GROUP
Resource group name
--all-resource-groups
Query all resource groups
--long
Show more fields in output
--limit LIMIT
Number of resources to return
--offset OFFSET
Starting resource position number
--output FORMAT
Specify output format. Only JSON is supported now.
-q, --quiet
Suppress verbose output.

Examples

List service instances of service test-service:

ibmcloud resource service-instances --service-name test-service

List next page of service instances with page size of 10

ibmcloud resource service-instances --offset 1 --limit 10

ibmcloud resource service-instance

Show details of a service instance.

ibmcloud resource service-instance (NAME|ID) [--location LOCATION] [--id]

Command options

NAME (required), exclusive with ID
Name of the service instance
ID (required), exclusive with NAME
ID of the service instance
--location
Filter by location
--id
Display the ID of service instance

Examples

Show details of service instance my-service-instance:

ibmcloud resource service-instance my-service-instance

ibmcloud resource service-instance-create

Create a service instance.

ibmcloud resource service-instance-create NAME (SERVICE_NAME | SERVICE_ID) SERVICE_PLAN_NAME LOCATION [-d, --deployment DEPLOYMENT_NAME] [-p, --parameters @JSON_FILE | JSON_STRING ] [-g RESOURCE_GROUP] [--service-endpoints SERVICE_ENDPOINTS_TYPE] [--allow-cleanup] [--lock]

Command options

NAME (required)
Name of the service instance
SERVICE_NAME or SERVICE_ID (required)
Name or ID of the service. To list service offerings, use the ibmcloud catalog service-marketplacecommand.
SERVICE_PLAN_NAME or SERVICE_PLAN_ID (required)
Name or ID of the service plan
LOCATION (required)
Target location or environment to create the service instance
-d, --deployment DEPLOYMENT_NAME
Name of the deployment
-p, --parameters @JSONFILE or JSON_STRING
JSON file or JSON string of parameters to create service instance
-g RESOURCE_GROUP
Resource group name
--service-endpoints SERVICE_ENDPOINTS_TYPE
Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'. The default value for service endpoints is the type configured by the service in IBM Cloud®.
--allow-cleanup
Whether the service instance should be deleted (cleaned up) during the processing of a region instance delete call
--lock
Whether to create the service instance with locked state

Examples

Create a service instance that is named my-service-instance, that uses service plan test-service-plan of service test-service on location eu-gb:

ibmcloud resource service-instance-create my-service-instance test-service test-service-plan eu-gb

ibmcloud resource service-instance-update

Update service instance.

ibmcloud resource service-instance-update ( NAME | ID ) [-n, --name NEW_NAME] [--service-plan-id SERVICE_PLAN_ID] [-p, --parameters @JSON_FILE | JSON_STRING ] [-g RESOURCE_GROUP] [--service-endpoints SERVICE_ENDPOINTS_TYPE] [-f, --force]

Command options

Name (required)
Name of the service instance, exclusive with ID
ID (required)
ID of the service instance, exclusive with NAME
-n, --name NEW_NAME
New service instance name
--service-plan-id SERVICE_PLAN_ID
New Service Plan ID
-p, --parameters @JSON_FILE | JSON_STRING
JSON file or JSON string of parameters to create service instance
-g RESOURCE_GROUP
Resource group name
--service-endpoints SERVICE_ENDPOINTS_TYPE
Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'.
-f, --force
Force update without confirmation

Examples

Update service instance my-service-instance, change its name to new-service-instance:

ibmcloud resource service-instance-update my-service-instance -n new-service-instance

ibmcloud resource service-instance-delete

Delete service instance. If provisioning is in progress, the command attempts to cancel the provisioning process. Some services might not support cancellation.

ibmcloud resource service-instance-delete (NAME|ID) [-f, --force] [--recursive]

Command options

Name (required)
Name of the service instance, exclusive with ID
ID (required)
ID of the service instance, exclusive with NAME
-f, --force
Force deletion without confirmation
--recursive
Delete all belonging resources

Examples

Delete resource service-instance my-service-instance:

ibmcloud resource service-instance-delete my-service-instance

ibmcloud resource service-instance-lock

Lock service instance.

ibmcloud resource service-instance-lock ( NAME | ID ) [-g RESOURCE_GROUP] [-f, --force]

Command options

Name (required)
Name of the service instance, exclusive with ID
ID (required)
ID of the service instance, exclusive with NAME
-g RESOURCE_GROUP
Resource group name
-f, --force
Force locking without confirmation

Examples

Lock resource service-instance my-service-instance:

ibmcloud resource service-instance-lock my-service-instance

ibmcloud resource service-instance-unlock

Unlock service instance.

ibmcloud resource service-instance-unlock ( NAME | ID ) [-g RESOURCE_GROUP] [-f, --force]

Command options

Name (required)
Name of the service instance, exclusive with ID
ID (required)
ID of the service instance, exclusive with NAME
-g RESOURCE_GROUP
Resource group name
-f, --force
Force locking without confirmation

Examples

Unlock resource service-instance my-service-instance:

ibmcloud resource service-instance-unlock my-service-instance

ibmcloud resource service-bindings

Show bindings to the service alias.

ibmcloud resource service-bindings SERVICE_ALIAS

Command options

SERVICE_ALIAS (required)
Service alias name

Examples

Show resource bindings to service alias my-service-alias:

ibmcloud resource bindings my-service-alias

ibmcloud resource service-binding

Show details of a service binding.

ibmcloud resource service-binding ALIAS_NAME [--id]

Command options

ALIAS_NAME (required)
Service alias name
--id
Display the ID. All other output for the service binding is suppressed. This option is exclusive with '--output'.

Examples

Show details of service binding between service alias my-service-alias and app my-app:

ibmcloud resource bindings my-service-alias my-app

ibmcloud resource service-binding-create

Create a service binding.

ibmcloud resource service-binding-create SERVICE_ALIAS_NAME ROLE_NAME [-n BINDING_NAME] [--service-id SERVICE_ID] [-p, --parameters @JSON_FILE | JSON_TEXT] [--service-endpoint SERVICE_ENDPOINT_TYPE] [-f, --force]

Command options

SERVICE_ALIAS_NAME (required)
Service alias name
ROLE_NAME (required)
Name of the user role
--service-id SERVICE_ID
Name or UUID of the service ID, which the role belongs to
-p, --parameter @JSON_FILE | JSON_TEXT
Parameters JSON file or JSON string
--service-endpoint SERVICE_ENDPOINT_TYPE
Type of the service endpoint. Possible values are 'public', 'private'.
-f, --force
Force creation without confirmation

Examples

Create a service binding between service alias my-service-alias and app my-app with role Administrator:

ibmcloud resource service-binding-create my-service-alias my-app Administrator

ibmcloud resource service-binding-delete

Delete a service binding.

ibmcloud resource service-binding-delete SERVICE_ALIAS [-f, --force]

Command options

SERVICE_ALIAS_NAME (required)
Service alias name
-f, --force
Force deletion without confirmation

Examples

Delete the service binding between service alias my-service-alias and app my-app:

ibmcloud resource service-binding-delete my-service-alias my-app

ibmcloud resource service-keys

List service keys of service instance or service alias.

ibmcloud resource service-keys [ --instance-id ID | --instance-name NAME | --alias-id ID | --alias-name NAME ]

Command options

--instance-id
Service Instance ID
--instance-name
Service Instance Name
--alias-id
Service Alias ID
--alias-name
Service Alias Name

Examples

List service keys of service instance my-service-instance:

ibmcloud resource service-keys --instance-name my-service-instance

ibmcloud resource service-key

Displays the details of any number of service keys, where the first n characters of the service key name matches the supplied KEY_NAME.

ibmcloud resource service-key (NAME | ID) [-g RESOURCE_GROUP] [--id]

Command options

NAME
Name of the key
ID
ID of the key
-g
Resource group name
--id
Display the ID of service key. This option is exclusive with '--output'.
-g RESOURCE_GROUP
Resource group name

Examples

Show details of service keys my-service-key:

ibmcloud resource service-key my-service-key

Show details of service key with ID crn:v1:bluemix:public:cloudantnosqldb:us-south:a/537860630a5ba7115be954e8d5aa5689:cc2a6d6c-8f5e-4038-b975-b09b51d1d8dc:resource-key:9057f12e-fbf5-421d-8865-764422217a79:

ibmcloud resource service-key crn:v1:bluemix:public:cloudantnosqldb:us-south:a/537860630a5ba7115be954e8d5aa5689:cc2a6d6c-8f5e-4038-b975-b09b51d1d8dc:resource-key:9057f12e-fbf5-421d-8865-764422217a79

ibmcloud resource service-key-create

Create a service key.

ibmcloud resource service-key-create NAME [ROLE_NAME] ( --instance-id SERVICE_INSTANCE_ID | --instance-name SERVICE_INSTANCE_NAME | --alias-id SERVICE_ALIAS_ID | --alias-name SERVICE_ALIAS_NAME) [--service-id SERVICE_ID] [-p, --parameters @JSON_FILE | JSON_TEXT] [-g RESOURCE_GROUP] [--service-endpoint SERVICE_ENDPOINT_TYPE] [-f, --force] [-f, --force] [-q, --quiet]

Command options

NAME (required)
Name of the key.
ROLE_NAME (optional)
Name of the IAM service role. The specified role cannot be one of the default platform roles. You can verify eligibility of any role for use with this option by running ibmcloud iam roles --service <your-service> and checking that serviceRole appears in the role's CRN.
--instance-id SERVICE_INSTANCE_ID
Service instance ID.
--instance-name SERVICE_INSTANCE_NAME
Service instance name.
--alias-id SERVICE_ALIAS_ID
Service alias ID.
--alias-name SERVICE_ALIAS_NAME
Service alias name.
--service-id SERVICE_ID
Name or UUID of the service ID, which the role belongs to.
-p, --parameters @JSON_FILE | JSON_TEXT
Parameters JSON file or JSON string.
-g RESOURCE_GROUP
Resource group name.
--service-endpoint SERVICE_ENDPOINT_TYPE
Type of the service endpoint. Possible values are 'public' or 'private'.
--output FORMAT (optional)
Specify the output format. Only JSON is supported.
-f, --force
Force creation without confirmation
-q, --quite
Suppress verbose output.

Examples

Create a service key named my-service-key with role Administrator for service instance my-service-instance:

ibmcloud resource service-key-create my-service-key Administrator --instance-name my-service-instance

Create a service key named my-service-key without any role for a non-iam-enabled service instance my-service-instance:

ibmcloud resource service-key-create my-service-key --instance-name my-service-instance

ibmcloud resource service-key-update

Update a service key.

ibmcloud resource service-key-update ( NAME | ID ) [-n, --name NEW_NAME] [-g RESOURCE_GROUP] [-f, --force]

Command options

NAME | ID
Name or ID of the key
-n, --name NEW_NAME
New name of the key
-g RESOURCE_GROUP
ID of the resource group to which the key belongs
-f, --force
Force update without confirmation

Examples

Update a service key named my-service-key, give it a new name my-service-key-2:

ibmcloud resource service-key-update my-service-key -n my-service-key-2

ibmcloud resource service-key-delete

Delete a service key.

ibmcloud resource service-key-delete ( KEY_NAME | KEY_ID ) [-f, --force]

Command options

KEY_NAME | KEY_ID
Name of the key or the ID of the key
-f, --force
Force deletion without confirmation

Examples

Delete service key my-service-key:

ibmcloud resource service-key-delete my-service-key

ibmcloud resource service-aliases

List aliases for a service instance.

ibmcloud resource service-aliases [ --instance-id ID | --instance-name NAME ]

Command options

--instance-id
ID of the belonging service instance.
--instance-name
Name of the belonging service instance.

Examples

List service aliases for service instance my-service-instance:

ibmcloud resource service-aliases my-service-instance

ibmcloud resource service-alias

Show details of a service alias.

ibmcloud resource service-alias ALIAS_NAME [--id]

Command options

ALIAS_NAME (required)
Name of the service alias
--id
Display the service alias's ID. All other output for the alias is suppressed. This option is exclusive with '--output'.

Examples

Show details of service alias my-service-alias:

ibmcloud resource service-alias  my-service-alias

ibmcloud resource service-alias-create

Create an alias of a service instance.

ibmcloud resource service-alias-create ALIAS_NAME ( --instance-id ID | --instance-name NAME ) [-s SPACE_NAME] [-t, --tags TAGS] [-p, --parameters @JSON_FILE | JSON_TEXT]

Command options

ALIAS_NAME (required)
Name of the service alias
--instance-id
ID of the belonging service instance.
--instance-name
Name of the belonging service instance.
-s
Name of the space in which the alias is created. Default is the current space.
-t, --tags
Tags list.
-p, --parameters
Parameters JSON file or JSON string.

Examples

Create a service alias named my-service-alias of service instance my-service-instance:

ibmcloud resource service-alias-create my-service-alias --instance-name my-service-instance

ibmcloud resource service-alias-update

Update a service alias.

ibmcloud resource service-alias-update ALIAS_NAME [-n, --name NEW_NAME] [-t, --tags TAGS] [-p, --parameters @JSON_FILE | JSON_STRING ][-f, --force]

Command options

ALIAS_NAME (required)
Name of the service alias
-n, --name
New name of the service alias.
-t, --tags
Tags list.
-p, --parameters
Parameters JSON file or JSON string.
-f, --force
Force update without user confirmation.

Examples

Update service alias my-service-alias, change its name to new-service-alias:

ibmcloud resource service-alias-update my-service-alias -n new-service-alias

ibmcloud resource service-alias-delete

Delete a service alias.

ibmcloud resource service-alias-delete ALIAS_NAME [-f, --force]

Command options

ALIAS_NAME (required)
Name of the service alias
-f, --force
Force deletion without confirmation

Examples

Delete service alias my-service-alias:

ibmcloud resource service-alias-delete my-service-alias

ibmcloud resource tags

List all tags in your billing account

ibmcloud resource tags [-o, --offset OFFSET] [-l, --limit LIMIT]  [-p, --provider classic-infrastructure] [-d, --details true] [-a, --attached true] [--output FORMAT] [--tag-type TAG_TYPE] [--account-id ACCOUNT_ID]

Command options

--offset value, -o value
Starting resource position number (default: 0).
--limit value, -l value
Number of resources to return (maximum 1000) (default: 100).
--provider value, -p value
Display Classic Infrastructure resources, only value allowed is: classic-infrastructure. Use it for resources of type SoftLayer_Hardware, SoftLayer_Network_Application_Delivery_Controller, SoftLayer_Network_Subnet_IpAddress or SoftLayer_Network_Vlan.
--details value, -d value
Show additional attributes for each tag, only value allowed is true.
--attached value, -a value
Show only filtered attached tags to a resource, only value allowed is true.
--tag-type value
Type of the tag. Only allowed values are: user, service or access (default value : user).
--account-id value
The ID of the account that owns the tags that you want to list (required if tag-type is set to service).
--output value
Specify output format. Only JSON is supported now.
-q, --quiet
Suppress verbose output.

ibmcloud resource tag-create

Create an access management tag:

ibmcloud resource tag-create --tag-names TAG_NAMES

Command options

--tag-names value
Comma separated list of tag names.
-q, --quiet
Suppress verbose output.

This command is only valid for access management tags. For example:

  • Run the following command to create the access management tag project:myproject:
    ibmcloud resource tag-create —tag-names “project:myproject”
    

ibmcloud resource tag-attach

Attach one or more tags to a resource:

ibmcloud resource tag-attach --tag-names TAG_NAMES (--resource-name NAME | --resource-id RESOURCE_ID ) [--resource-type RESOURCE_TYPE] [--tag-type TAG_TYPE] [--account-id ACCOUNT_ID]

Command options

--tag-names value
Comma-separated list of tag names.
--resource-name value
Name of the resource on which the tags should be attached.
--resource-id value
CRN of the resource on which the tags should be attached (for Classic Infrastructure resource, it is the ID of the resource).
--resource-type value
Type of the tag. Only allowed values are: user, service or access (default value : user).
--tag-type value
The type of the tag. The only allowed values are user or service. The default value is user.
--account-id value
The ID of the account that owns the resources to be tagged (required if tag-type is set to service).
-q, --quiet
Suppress verbose output.

Examples

  • To attach the user tag MyTag to a Kubernetes cluster named MyCluster, first look for the CRN of the cluster you would like to tag:

    ibmcloud resource search 'type:k8\-cluster AND name:MyCluster'
    

    Take note of the CRN, which is a string similar to the following example:

    crn:v1:bluemix:public:containers-kubernetes:us-south:a/a27a4741a57dcf5c965939adb66fe1c7:a46242e638ca47b09f10e9a3cbe5687a::
    

    To attach the tag, run the following command:

    ibmcloud resource tag-attach --tag-names MyTag --resource-id rn:v1:bluemix:public:containers-kubernetes:us-south:a/a27a4741a57dcf5c965939adb66fe1c7:a46242e638ca47b09f10e9a3cbe5687a::
    
  • To attach the user tag MyTag to a resource named MyResource:

    ibmcloud resource tag-attach --tag-name MyTag --resource-name  'MyResource'
    
  • To attach the user tag MyTag to a classic infrastructure virtual guest named MyVM, first look for the ID of the virtual guest you would like to tag:

    ibmcloud resource search 'fullyQualifiedDomainName:MyVM  _objectType:SoftLayer_Virtual_Guest' -p classic-infrastructure
    

    Take a note of the ID, which is a string similar to 48373549.

    To attach the tag, run the following command:

    ibmcloud resource tag-attach --tag-names MyTag --resource-id 48373549 --resource-type SoftLayer_Virtual_Guest
    
  • To attach the access management tag project:myproject, that you previously created, to an instance of IBM Cloud Object Storage called Project data, run the following command:

    ibmcloud resource tag-attach --tag-names "project:myproject" --resource-name Project data -—tag-type access
    

ibmcloud resource tag-detach

Detaching one or more tags from a resource:

ibmcloud resource tag-detach --tag-names TAG_NAMES (--resource-name NAME | --resource-id RESOURCE_ID ) [--resource-type RESOURCE_TYPE] [--tag-type TAG_TYPE] [--account-id ACCOUNT_ID]

Command options

--tag-names value
Comma-separated list of tag names.
--resource-name value
Name of the resource on which the tags should be attached.
--resource-id value
CRN of the resource on which the tags should be attached (for Classic Infrastructure resource, it is the ID of the resource).
--resource-type value
Resource type on which the tags should be attached (required for Classic Infrastructure resource of type SoftLayer_Hardware, SoftLayer_Network_Application_Delivery_Controller, SoftLayer_Network_Subnet_IpAddress or SoftLayer_Network_Vlan only).
--tag-type value
Type of the tag. Only allowed values are: user, service or access (default value : user).
--account-id value
The ID of the account that owns the resources to be detached (required if tag-type is set to service).
-q, --quiet
Suppress verbose output.

Examples

  • To detach the user tag MyTag from a Kubernetes cluster named MyCluster, first look for the CRN of the cluster you would like to detach the tag from:

    ibmcloud resource search 'type:k8\-cluster AND name:MyCluster'
    

    Take note of the CRN, which is a string similar to the following example:

    crn:v1:bluemix:public:containers-kubernetes:us-south:a/a27a4741a57dcf5c965939adb66fe1c7:a46242e638ca47b09f10e9a3cbe5687a::
    
  • To detach the tag, run the following command:

    ibmcloud resource tag-detach --tag-names MyTag --resource-id rn:v1:bluemix:public:containers-kubernetes:us-south:a/a27a4741a57dcf5c965939adb66fe1c7:a46242e638ca47b09f10e9a3cbe5687a::
    
  • To detach the user tag MyTag to a resource named MyResource:

    ibmcloud resource tag-detach --tag-name MyTag --resource-name 'MyResource'
    
  • To detach the user tag MyTag to a classic infrastructure virtual guest named MyVM, first look for the ID of the virtual guest you would like to detach the tag from:

    ibmcloud resource search 'fullyQualifiedDomainName:MyVM  _objectType:SoftLayer_Virtual_Guest' -p classic-infrastructure
    

    Take a note of the ID, which is a string similar to 48373549.

  • To detach the tag, run the following command:

    ibmcloud resource tag-detach --tag-names MyTag --resource-id 48373549 --resource-type SoftLayer_Virtual_Guest
    
  • To detach the access management tag project:myproject from an instance of IBM Cloud Object Storage called Project data, run the following command:

    ibmcloud resource tag-detach --tag-names "project:myproject" --resource-name Project data -—tag-type access
    

ibmcloud resource tag-delete

Delete a tag:

ibmcloud resource tag-delete (--tag-name TAG_NAME | -a, --all  [-f, --force]) [-p, --provider PROVIDER] [--tag-type TAG_TYPE] [--account-id ACCOUNT_ID]

Command options

--tag-name value
Tag name to be deleted.
--provider value, -p value
Delete the tag in the specified provider (only supported value is classic-infrastructure). Use it for resources of type SoftLayer_Hardware, SoftLayer_Network_Application_Delivery_Controller, SoftLayer_Network_Subnet_IpAddress or SoftLayer_Network_Vlan.
--tag-type value
Type of the tag. Only allowed values are: user, service or access (default value : user).
account-id value
The ID of the account that owns the tags to be deleted (required if tag-type is set to service).
--force, -f
Delete the tags without confirmation.
--all, -a
Delete all tags not attatched to any resources.
-q, --quiet
Suppress verbose output.

A tag can be deleted only if it isn't attached to any resource.

Examples

  • To delete the user tag MyTag from the account:
    ibmcloud resource tag-delete --tag-name "MyTag"
    
  • To delete the access management tag project:myproject from the account:
    ibmcloud resource tag-delete --tag-name "project:myproject" --tag-type access
    
  • To delete all unused user tags from the account:
    ibmcloud resource tag-delete -a
    
  • To delete all unused access management tags from the account:
    ibmcloud resource tag-delete -a --tag-type access
    

ibmcloud resource reclamations

List reclaimed resources that can be restored or deleted:

ibmcloud resource reclamations [--resource-instance-id INSTANCE_ID]

Command options

--resource-instance-id
The globally unique ID (GUID) of the resource instance

Examples

List all resource reclamations:

ibmcloud resource reclamations

List resource reclamations of a particular service instance:

ibmcloud resource reclamations --resource-instance-id abcd1234-ef56-486e-b293-22d6c7eb6699

ibmcloud resource reclamation

Show details of a resource reclamation:

ibmcloud resource reclamation RECLAMATION_ID

Command options

RECLAMATION_ID
Resource reclamation ID

Examples

Show details of a resource reclamation:

ibmcloud resource reclamation daf12d343ef

ibmcloud resource reclamation-restore

Restore a reclaimed resource so that the resource is available again:

ibmcloud resource reclamation-restore ID [--comment COMMENT]

Command options

ID
ID of the resource reclamation
--comment
Comments about the action

Examples

Restore a resource reclamation with ID d9fendfwlw:

ibmcloud resource reclamation-restore "d9fendfwlw"

Restore a resource reclamation with ID d9fendfwlw, leave a comment of need to use for another 3 months, and show JSON output:

ibmcloud resource reclamation-restore "d9fendfwlw" --comment "need to use for another 3 months" --output JSON

ibmcloud resource reclamation-delete

Delete a reclaimed resource so that the resource can no longer be restored:

ibmcloud resource reclamation-delete ID [--comment COMMENT] [--f, --force]

Command options

ID
ID of the resource reclamation
--comment
Comments about the action
-f, --force
Force deletion without confirmation

Examples

Delete a resource reclamation with ID d9fendfwlw:

ibmcloud resource reclamation-delete "d9fendfwlw"

Delete a resource reclamation with ID d9fendfwlw and leave a comment of no longer needed without confirmation:

ibmcloud resource reclamation-delete "d9fendfwlw" --comment "no longer needed" -f