
Huawei GetTemporaryCredentials
CertifiedObtain short-lived Huawei Cloud credentials (temporary AK/SK + security token)
Huawei GetTemporaryCredentials
Obtain short-lived Huawei Cloud credentials (temporary AK/SK + security token)
Produces temporary credentials valid for up to 24 hours that can be passed directly to downstream tasks (OBS, DMS, …) in place of long-lived AK/SK credentials.
Two authentication methods are supported:
PASSWORD (default): authenticates with a Huawei Cloud IAM username and password to obtain a session token, then exchanges it for temporary STS credentials. No pre-existing token is required — this is the recommended entry point for durable-credential workflows.
TOKEN: exchanges an already-obtained
X-Auth-Tokendirectly for temporary STS credentials. Use this when you manage the IAM token lifecycle externally.
The returned accessKeyId, secretAccessKey, and securityToken expire at
expirationTime; refresh before that deadline.
**Escape-hatch task: ** for zero-wiring workflows, prefer the temporaryCredentials block on
the connection layer (configurable via pluginDefaults) so credentials are obtained inline
without manual output references. Use this task only when you need the raw credential values
in subsequent steps or external systems.
type: io.kestra.plugin.huawei.iam.GetTemporaryCredentialsExamples
Obtain temporary credentials from an IAM username and password, then upload a file to OBS.
id: iam_password_temp_creds
namespace: company.team
tasks:
- id: get_temp_creds
type: io.kestra.plugin.huawei.iam.GetTemporaryCredentials
region: eu-west-101
authMethod: PASSWORD
username: my-iam-user
password: "{{ secret('HUAWEI_IAM_PASSWORD') }}"
domainName: my-account-domain
durationSeconds: 3600
- id: upload
type: io.kestra.plugin.huawei.obs.Upload
accessKeyId: "{{ outputs.get_temp_creds.accessKeyId }}"
secretAccessKey: "{{ outputs.get_temp_creds.secretAccessKey }}"
securityToken: "{{ outputs.get_temp_creds.securityToken }}"
region: eu-west-101
bucket: my-bucket
from: "{{ inputs.file }}"
key: uploads/data.csv
Exchange an existing IAM token for temporary credentials.
id: iam_token_temp_creds
namespace: company.team
tasks:
- id: get_temp_creds
type: io.kestra.plugin.huawei.iam.GetTemporaryCredentials
region: eu-west-101
authMethod: TOKEN
token: "{{ secret('HUAWEI_IAM_TOKEN') }}"
durationSeconds: 3600
- id: upload
type: io.kestra.plugin.huawei.obs.Upload
accessKeyId: "{{ outputs.get_temp_creds.accessKeyId }}"
secretAccessKey: "{{ outputs.get_temp_creds.secretAccessKey }}"
securityToken: "{{ outputs.get_temp_creds.securityToken }}"
region: eu-west-101
bucket: my-bucket
from: "{{ inputs.file }}"
key: uploads/data.csv
Properties
region *Requiredstring
Huawei Cloud region
Region identifier such as eu-west-101, ap-southeast-1, or cn-north-4. Used to resolve the IAM endpoint URL.
authMethod string
PASSWORDPASSWORDTOKENAuthentication method
Controls which credentials are used to obtain the session token before exchanging for temporary STS credentials.
PASSWORD: provideusername,password, anddomainName. Recommended for automated workflows — no pre-existing token management needed.TOKEN: provide an existingtoken(X-Auth-Token). Use when you manage the IAM token lifecycle outside this task.
domainName string
Account domain name (PASSWORD method only)
The Huawei Cloud account name (domain name) that owns the IAM user.
Required when authMethod is PASSWORD. This is the top-level account identifier,
not the project or region name — visible in the Huawei Cloud console under
My Credentials → Domain Name.
durationSeconds integerstring
900Lifetime of the temporary credentials in seconds
How long the returned temporary AK/SK/security-token should remain valid. Huawei Cloud accepts values between 900 (15 minutes) and 86400 (24 hours). Defaults to 900 seconds if omitted.
endpointSuffix string
myhuaweicloud.comIAM endpoint domain suffix
Domain suffix used to build the IAM endpoint URL.
Defaults to myhuaweicloud.com. Set to myhuaweicloud.eu for the European sovereign cloud
(region eu-west-101 / EU-Dublin).
password string
IAM password (PASSWORD method only)
Password for the IAM user identified by username.
Required when authMethod is PASSWORD.
Sensitive — always provide via {{ secret('NAME') }}.
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
projectName string
Project name for project-scoped tokens (PASSWORD method only)
Overrides the project name used for scope=PROJECT token requests.
Defaults to the region value when omitted, which is correct for most regions.
scope string
PROJECTPROJECTDOMAINToken scope (PASSWORD method only)
Determines the scope of the session token obtained during password authentication.
PROJECT(default): token is scoped to the project matchingprojectName(orregionwhenprojectNameis omitted). Use for most downstream tasks (OBS, DMS).DOMAIN: token is scoped to the domain. Use for domain-wide IAM management.
token string
IAM token to exchange (TOKEN method only)
An existing Huawei Cloud X-Auth-Token to exchange for temporary STS credentials.
Required when authMethod is TOKEN. Sensitive — always provide via {{ secret('NAME') }}.
username string
IAM username (PASSWORD method only)
Huawei Cloud IAM username. Required when authMethod is PASSWORD.
Outputs
accessKeyId string
Temporary Access Key ID
Short-lived Huawei Cloud access key. Pass as accessKeyId to downstream tasks.
expirationTime string
date-timeCredential expiration time
UTC instant at which the temporary credentials expire.
secretAccessKey string
Temporary Secret Access Key
Short-lived Huawei Cloud secret key paired with accessKeyId.
Sensitive — treat as a secret and do not log.
securityToken string
Security Token (session token)
Short-lived security token required alongside the temporary AK/SK.
Pass as securityToken to downstream tasks.
Sensitive — treat as a secret and do not log.