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

CLI Command Reference (IAM)

Managing IAM Users

API Name

Command

Description

Operation

Listing IAM Users

hcloud IAM ListUsersV5/v5

This API is used to list IAM users.

Go debug

Creating an IAM User

hcloud IAM CreateUserV5/v5

This API is used to create an IAM user.

Go debug

Querying the Last Login Time of an IAM User

hcloud IAM ShowUserLastLoginV5/v5

This API is used to query the last login time of an IAM user.

Go debug

Querying IAM User Details

hcloud IAM ShowUserV5/v5

This API is used to query IAM user details.

Go debug

Modifying an IAM User

hcloud IAM UpdateUserV5/v5

This API is used to modify an IAM user.

Go debug

Deleting an IAM User

hcloud IAM DeleteUserV5/v5

This API is used to delete a specified IAM user.

Go debug

Managing Credentials

API Name

Command

Description

Operation

Querying the Last Usage Time of a Specified Permanent Access Key

hcloud IAM ShowAccessKeyLastUsedV5/v5

This API is used to query the last usage time of a specified permanent access key of an IAM user.

Go debug

Modifying a Specified Permanent Access Key

hcloud IAM UpdateAccessKeyV5/v5

This API is used to modify a specified permanent access key of an IAM user.

Go debug

Deleting a Specified Permanent Access Key

hcloud IAM DeleteAccessKeyV5/v5

This API is used to delete a specified permanent access key of an IAM user.

Go debug

Querying All Permanent Access Keys

hcloud IAM ListAccessKeysV5/v5

This API is used to query all permanent access keys of an IAM user.

Go debug

Creating a Permanent Access Key

hcloud IAM CreateAccessKeyV5/v5

This API is used to create a permanent access key for an IAM user.

Go debug

Changing the Login Password of an IAM User

hcloud IAM ChangePasswordV5/v5

This API is used to change the login password of an IAM user.

Go debug

Querying the Login Information of an IAM User

hcloud IAM ShowLoginProfileV5/v5

This API is used to query the login information of a specified IAM user.

Go debug

Creating the Login Information of an IAM User

hcloud IAM CreateLoginProfileV5/v5

This API is used to create the login information of a specified IAM user.

Go debug

Modifying the Login Information of an IAM User

hcloud IAM UpdateLoginProfileV5/v5

This API is used to modify the login information of a specified IAM user.

Go debug

Deleting the Login Information of an IAM User

hcloud IAM DeleteLoginProfileV5/v5

This API is used to delete the login information of a specified IAM user.

Go debug

Managing MFA Devices

API Name

Command

Description

Operation

Listing All Virtual MFA Devices

hcloud IAM ListMfaDevicesV5/v5

This API is used to list all virtual MFA devices.

Go debug

Enabling a Virtual MFA Device

hcloud IAM EnableMfaDeviceV5/v5

This API is used to enable a specified virtual MFA device and associate it with a specified IAM user.

Go debug

Disabling a Virtual MFA Device

hcloud IAM DisableMfaDeviceV5/v5

This API is used to disable a specified virtual MFA device and disassociate it from the corresponding IAM user.

Go debug

Creating a Virtual MFA Device

hcloud IAM CreateVirtualMfaDeviceV5/v5

This API is used to create a virtual MFA device.

Go debug

Deleting a Virtual MFA Device

hcloud IAM DeleteVirtualMfaDeviceV5/v5

This API is used to delete a virtual MFA device.

Go debug

Configuring Security Settings

API Name

Command

Description

Operation

Querying the Account Password Policy

hcloud IAM ShowPasswordPolicyV5/v5

This API is used to query the account password policy.

Go debug

Modifying the Account Password Policy

hcloud IAM UpdatePasswordPolicyV5/v5

This API is used to modify the account password policy.

Go debug

Querying the Account Login Policy

hcloud IAM ShowLoginPolicyV5/v5

This API is used to query the account login policy.

Go debug

Modifying the Account Login Policy

hcloud IAM UpdateLoginPolicyV5/v5

This API is used to modify the account login policy.

Go debug

Managing User Groups

API Name

Command

Description

Operation

Listing Groups

hcloud IAM ListGroupsV5/v5

This API is used to list groups.

Go debug

Creating a Group

hcloud IAM CreateGroupV5/v5

This API is used to create a group.

Go debug

Listing Groups summary

hcloud IAM ShowGroupSummary/v5

This API is used to list groups summary.

Go debug

Querying Group Details

hcloud IAM ShowGroupV5/v5

This API is used to query group details.

Go debug

Modifying a Group

hcloud IAM UpdateGroupV5/v5

This API is used to modify a group.

Go debug

Deleting a Group

hcloud IAM DeleteGroupV5/v5

This API is used to delete a group.

Go debug

Adding an IAM User to a Group

hcloud IAM AddUserToGroupV5/v5

This API is used to add an IAM user to a group.

Go debug

Removing an IAM User from a Group

hcloud IAM RemoveUserFromGroupV5/v5

This API is used to remove an IAM user from a group.

Go debug

Managing Identity Policies

API Name

Command

Description

Operation

Querying All Identity Policies

hcloud IAM ListPoliciesV5/v5

This API is used to query all identity policies, including system-defined identity policies and custom identity policies.

Go debug

Creating a Custom Identity Policy

hcloud IAM CreatePolicyV5/v5

This API is used to create a custom identity policy whose default version is v1.

Go debug

Obtaining an Identity Policy Based on the Identity Policy ID

hcloud IAM GetPolicyV5/v5

This API is used to obtain an identity policy based on the identity policy ID.

Go debug

Deleting a Custom Identity Policy

hcloud IAM DeletePolicyV5/v5

This API is used to delete a custom identity policy. Ensure that it is not attached to any IAM users, groups, agencies, or trust agencies.

Go debug

Creating a Version for a Specified Identity Policy

hcloud IAM CreatePolicyVersionV5/v5

This API is used to create a version for a specified identity policy.

Go debug

Querying All Versions of a Specified Identity Policy

hcloud IAM ListPolicyVersionsV5/v5

This API is used to query all versions of a specified identity policy.

Go debug

Querying the Version of a Specified Identity Policy

hcloud IAM GetPolicyVersionV5/v5

This API is used to query the version information, including the identity policy document of a specified identity policy.

Go debug

Deleting the Version of a Specified Identity Policy

hcloud IAM DeletePolicyVersionV5/v5

This API is used to delete a specified version of a specified identity policy. The default identity policy version cannot be deleted.

Go debug

Setting a Specified Identity Policy Version as the Default Version

hcloud IAM SetDefaultPolicyVersionV5/v5

This API is used to set a specified identity policy version as the default version.

Go debug

Managing Permissions

API Name

Command

Description

Operation

Attaching an Identity Policy to an Agency or Trust Agency

hcloud IAM AttachAgencyPolicyV5/v5

This API is used to attach a specified identity policy to a specified agency or trust agency.

Go debug

Attaching an Identity Policy to a Group

hcloud IAM AttachGroupPolicyV5/v5

This API is used to attach a specified identity policy to a specified group.

Go debug

Attaching an Identity Policy to an IAM User

hcloud IAM AttachUserPolicyV5/v5

This API is used to attach a specified identity policy to a specified IAM user.

Go debug

Detaching an Identity Policy from an Agency or Trust Agency

hcloud IAM DetachAgencyPolicyV5/v5

This API is used to detach a specified identity policy from a specified agency or trust agency.

Go debug

Detaching an Identity Policy from a Group

hcloud IAM DetachGroupPolicyV5/v5

This API is used to detach a specified identity policy from a specified group.

Go debug

Detaching an Identity Policy from an IAM User

hcloud IAM DetachUserPolicyV5/v5

This API is used to detach a specified identity policy from a specified IAM user.

Go debug

Querying All Entities Attached to a Specified Identity Policy

hcloud IAM ListEntitiesForPolicyV5/v5

This API is used to query all entities attached to a specified identity policy.

Go debug

Querying All Identity Policies Attached to a Specified Agency or Trust Agency

hcloud IAM ListAttachedAgencyPoliciesV5/v5

This API is used to query all identity policies attached to a specified agency or trust agency.

Go debug

Querying All Identity Policies Attached to a Specified Group

hcloud IAM ListAttachedGroupPoliciesV5/v5

This API is used to query all identity policies attached to a specified group.

Go debug

Querying All Identity Policies Attached to a Specified IAM User

hcloud IAM ListAttachedUserPoliciesV5/v5

This API is used to query all identity policies attached to a specified IAM User.

Go debug

Querying the Authorization Summary

API Name

Command

Description

Operation

Querying the Authorization Summary of a Specified Service

hcloud IAM GetAuthorizationSchemaV5/v5

This API is used to query the authorization summary of a specified cloud service.

Go debug

Listing Registered Cloud Services

hcloud IAM ListRegisteredServicesForAuthSchemaV5/v5

This API is used to list registered cloud services.

Go debug

Obtaining All Service Principals

hcloud IAM ListServicePrincipalsV5/v5

This API is used to obtain all service principals.

Go debug

Managing Agencies and Trust Agencies

API Name

Command

Description

Operation

Creating a Service-linked Agency

hcloud IAM CreateServiceLinkedAgencyV5/v5

This API is used to create a service-linked agency.

Go debug

Deleting a Service-linked Agency

hcloud IAM DeleteServiceLinkedAgencyV5/v5

This API is used to delete a service-linked agency.

Go debug

Obtaining the Deletion Status of a Service-linked Agency

hcloud IAM GetServiceLinkedAgencyDeletionStatusV5/v5

This API is used to obtain the deletion status of a service-linked agency.

Go debug

Listing Agencies and Trust Agencies Based on Specified Conditions

hcloud IAM ListAgenciesV5/v5

This API is used to list agencies and trust agencies based on specified conditions.

Go debug

Creating a Trust Agency

hcloud IAM CreateAgencyV5/v5

This API is used to create a trust agency.

Go debug

Querying Agency or Trust Agency Details

hcloud IAM GetAgencyV5/v5

This API is used to query agency or trust agency details.

Go debug

Modifying a Trust Agency

hcloud IAM UpdateAgencyV5/v5

This API is used to modify a trust agency.

Go debug

Deleting a Trust Agency

hcloud IAM DeleteAgencyV5/v5

This API is used to delete a trust agency.

Go debug

Modifying the Trust Policy of a Trust Agency

hcloud IAM UpdateTrustPolicyV5/v5

This API is used to modify the trust policy of a trust agency.

Go debug

Managing Account Functions

API Name

Command

Description

Operation

Obtaining the Summary of the Usage and Quota of IAM Entities in an Account

hcloud IAM GetAccountSummaryV5/v5

This API is used to obtain the summary of the usage and quota of IAM entities in an account.

Go debug

Obtaining the Function Status of an Account

hcloud IAM GetFeatureStatusV5/v5

This API is used to obtain the function status of an account.

Go debug

Enabling or Disabling the Asymmetric Signature for an Account

hcloud IAM SetAsymmetricSignatureSwitchV5/v5

This API is used to enable or disable the asymmetric signature for an account.

Go debug

Obtaining the Asymmetric Signature Switch Status of an Account

hcloud IAM GetAsymmetricSignatureSwitchV5/v5

This API is used to obtain the asymmetric signature switch status of an account.

Go debug

Managing Resource Tags

API Name

Command

Description

Operation

Adding Tags to IAM Resources

hcloud IAM TagResourceV5/v5

This API is used to add tags to IAM resources.

Go debug

Deleting Some Tags of a Specified Resource

hcloud IAM DeleteResourceTagsV5/v5

This API is used to delete some tags of a specified resource.

Go debug

Obtaining All Tags of a Specified Resource

hcloud IAM ListResourceTagsV5/v5

This API is used to obtain all tags of a specified resource.

Go debug

SAML Identity Provider Management

API Name

Command

Description

Operation

Creating a SAML Provider

hcloud IAM CreateSAMLProviderV5/v5

This API is used to create an IdP that supports SAML 2.0.

Go debug

Querying All SAML Providers

hcloud IAM ListSAMLProvidersV5/v5

This API is used to query the list of all SAML 2.0 IdPs.

Go debug

Querying a Specified SAML Provider

hcloud IAM ShowSAMLProviderV5/v5

This API is used to query details about SAML 2.0 IdPs.

Go debug

Deleting a Specified SAML Provider

hcloud IAM DeleteSAMLProviderV5/v5

This API is used to delete a SAML 2.0 IdP from IAM. When the SAML provider is deleted, IAM does not update any trust agency that references the provider as the principal in the trust policy. After the deletion, any attempt to switch to the trust agency that references the deleted provider will fail.

Go debug

Updating a Specified SAML Provider

hcloud IAM UpdateSAMLProviderV5/v5

This API is used to update the metadata document, SAML encryption settings, and private key of an existing SAML provider. To rotate the private key, add a new private key in a separate request and then remove the old private key.

Go debug

OIDC Identity Provider Management

API Name

Command

Description

Operation

Creating an OIDC Provider

hcloud IAM CreateOIDCProviderV5/v5

This API is used to create an IdP that supports OpenID Connect (OIDC).

Go debug

Querying All OIDC Providers

hcloud IAM ListOIDCProvidersV5/v5

This interface is used to query the IdP list of all OpenID Connect (OIDC).

Go debug

Deleting a Specified OIDC Provider

hcloud IAM DeleteOIDCProviderV5/v5

This API is used to delete an OpenID Connect (OIDC) identity provider from IAM. When an OIDC provider is deleted, IAM does not update any trust agency that references the provider as the principal in the trust policy. After the deletion, any attempt to switch to the trust agency that references the deleted provider will fail.

Go debug

Querying a Specified OIDC Provider

hcloud IAM ShowOIDCProviderV5/v5

This API is used to query details about an OpenID Connect (OIDC) IdP.

Go debug

Modifying the Description of a Specified OIDC Provider

hcloud IAM UpdateOIDCProviderV5/v5

This API is used to modify the description of an OpenID Connect (OIDC) IdP in IAM.

Go debug

Adding a Client ID to a Specified OIDC Provider

hcloud IAM AddClientIDToOIDCProviderV5/v5

This API is used to add a client ID to the list of registered client IDs of a specified IAM OIDC provider.

Go debug

Removing a Specified Client ID from a Specified OIDC Provider

hcloud IAM RemoveClientIDFromOIDCProviderV5/v5

This API is used to remove a specified client ID from the client ID list of an IAM OIDC provider.

Go debug

Replacing the OIDC Provider Fingerprint List

hcloud IAM UpdateOIDCProviderThumbprintV5/v5

This API is used to replace the existing fingerprint list associated with an OIDC provider with a new one. Generally, you need to update the fingerprint only when the identity provider certificate is changed. This rarely occurs. However, if the provider's certificate changes and you do not update the fingerprint, any attempt to switch to a trust agency associated with the OIDC provider will fail.

Go debug