Updated on 2026-09-15 GMT+08:00

CLI Command Reference

RAM Managed Permissions

API Name

Command

Description

Operation

Getting a List of RAM Managed Permissions

hcloud RAM ListPermissions

This API is used to get a list of RAM managed permissions for the specified resource type.

Go debug

Getting Details About RAM Managed Permissions

hcloud RAM ShowPermission

This API is used to get the details of RAM managed permissions of the specified version for the specified resource type. If the permission version is not specified, the information about the default permission version is returned.

Go debug

Getting all versions of permissions

hcloud RAM ListPermissionVersions

This API is used to get all versions of permissions.

Go debug

Resource Shares

API Name

Command

Description

Operation

Creating a Resource Share

hcloud RAM CreateResourceShare

This API is used to create a resource share. You can specify the list of resources to be shared, the list of principals in resource sharing, and the list of permissions granted to the principals.

Go debug

Searching for a Resource Share

hcloud RAM SearchResourceShares

This API is used to search for the details about the resource share that you have created or that shared with you.

Go debug

Updating a Resource Share

hcloud RAM UpdateResourceShare

This API is used to modify the properties of a resource share.

Go debug

Deleting a Resource Share

hcloud RAM DeleteResourceShare

This API is used to delete a specified resource share. This operation does not delete the resources but stops sharing the resources with other accounts.

Go debug

Associated Principals and Resources

API Name

Command

Description

Operation

Associating Principals and Resources

hcloud RAM AssociateResourceShare

This API is used to associate a list of specified principals or resources with a resource share. If a resource is associated, the principals that have the permission to access the resource share will gain the permission to access that resource in the resource share. If a principal is associated, the principal will have the permission to access the shared resources in the resource share.

Go debug

Disassociating Principals or Resources

hcloud RAM DisassociateResourceShare

This API is used to disassociate specified principals or resources from a specified resource share. The principals can choose to leave the specified resource share.

Go debug

Searching for Associated Principals and Resources

hcloud RAM SearchResourceShareAssociations

This API is used to search for the principals and resources associated with a resource share you created.

Go debug

Associated RAM Managed Permissions

API Name

Command

Description

Operation

Associating or Replacing RAM Managed Permissions

hcloud RAM AssociateResourceSharePermission

This API is used to associate or replace the RAM managed permission for a resource type included in a resource share. You can have only one permission associated with each resource type in the resource share. You can associate a new RAM managed permission with a resource type only when there are currently no resources of that resource type in the resource share.

Go debug

Disassociating RAM Managed Permissions

hcloud RAM DisassociateResourceSharePermission

This API is used to disassociate RAM managed permissions from a resource share. The disassociation takes effect immediately after you call this API. You can disassociate RAM managed permissions for a resource type from a resource share only when there is no permission for that resource type in the resource share.

Go debug

Getting Associated RAM Managed Permissions

hcloud RAM ListResourceSharePermissions

This API is used to get the details of RAM managed permissions associated with a resource share.

Go debug

Tag Management

API Name

Command

Description

Operation

Querying Tags Used by Resource Shares

hcloud RAM ListResourceShareTags

This API is used to query the list of tags used by resource shares.

Go debug

Querying Resource Shares by Tag

hcloud RAM ListResourceSharesByTags

This API is used to query resource shares by tag.

Go debug

Querying Number of Resource Shares by Tag

hcloud RAM SearchResourceShareCountByTags

This API is used to query the number of resource shares by tag.

Go debug

Adding Tags to Resource Shares

hcloud RAM BatchCreateResourceShareTags

This API is used to add tags to resource shares.

Go debug

Deleting Tags from Resource Shares

hcloud RAM BatchDeleteResourceShareTags

This API is used to delete the specified tags from resource shares.

Go debug

Shared Resources

API Name

Command

Description

Operation

Searching for Shared Resources

hcloud RAM SearchSharedResources

This API is used to search for the resources that you share or are shared with you.

Go debug

Searching for Distinct Shared Resources

hcloud RAM SearchDistinctSharedResources

This API is used to search for distinct resources that you share or are shared with you.

Go debug

Principals

API Name

Command

Description

Operation

Searching for Resource Users or Owners

hcloud RAM SearchSharedPrincipals

This API is used to search for principals that you are sharing resources with or share resources with you.

Go debug

Searching for Distinct Resource Users or Owners

hcloud RAM SearchDistinctPrincipals

This API is used to search for distinct principals that you are sharing resources with or share resources with you.

Go debug

Resource Sharing Invitations

API Name

Command

Description

Operation

Accepting a Resource Sharing Invitation

hcloud RAM AcceptResourceShareInvitation

This API is used to accept a resource sharing invitation from other accounts.

Go debug

Rejecting a Resource Sharing Invitation

hcloud RAM RejectResourceShareInvitation

This API is used to reject a resource sharing invitation from other accounts.

Go debug

Searching for a Resource Sharing Invitation

hcloud RAM SearchResourceShareInvitation

This API is used to search for a resource sharing invitation based on certain search criteria.

Go debug

Sharing with Organizations

API Name

Command

Description

Operation

Checking Whether Sharing with Organizations Is Enabled

hcloud RAM ShowOrganizationShare

This API is used to check whether sharing with Organizations is enabled.

Go debug

Enabling Sharing with Organizations

hcloud RAM EnableOrganizationShare

This API is used to enable sharing with Organizations.

Go debug

Disabling Sharing with Organizations

hcloud RAM DisableOrganizationShare

This API is used to disable sharing with Organizations.

Go debug

Other operations

API Name

Command

Description

Operation

Querying Resource Sharing Quotas

hcloud RAM ListQuota

This API is used to query resource sharing quotas in the current account.

Go debug

Querying Resource Type

hcloud RAM ListResourceTypes

This API is used to query the resource types and applicable regions of interconnected cloud services.

Go debug