STSClient.assume_root
rboto-sts==0.4.0 · Service index · Types
Model summary (excerpt): Returns a set of short term credentials you can use to perform privileged tasks on a member account in your organization. You must use credentials from an Organizations management account or a delegated administrator account for IAM to call AssumeRoot . You cannot use root user credentials to make this call. Before you can launch a privileged session, you must have centralized root access in...
Install and imports
Signature
async def assume_root(
*,
target_principal: str,
task_policy_arn: PolicyDescriptorType,
duration_seconds: int | None = None,
minimum_session_token_size: int | None = None,
) -> AssumeRootOutput: ...
Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.
Arguments
| Argument | Required | Model notes (excerpt) |
|---|---|---|
target_principal |
Yes | The member account principal ARN or account ID. |
task_policy_arn |
Yes | The identity based policy that scopes the session to the privileged tasks that can be performed. You must use one of following Amazon Web Services managed policies to scope root session actions: IAMAuditRootUserCredentials IAMCreateRootUserPassword IAMDeleteRootUserCredentials S3UnlockBucketPolicy SQSUnlockQueuePolicy |
duration_seconds |
No | The duration, in seconds, of the privileged session. The value can range from 0 seconds up to the maximum session duration of 900 seconds (15 minutes). If you specify a value higher than this setting, the operation fails. By default, the value is set to 900 seconds. |
minimum_session_token_size |
No |
Output
AssumeRootOutput.
Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.
| Field | Type | Presence | References |
|---|---|---|---|
credentials |
CredentialsOutput | None |
Always present | CredentialsOutput |
source_identity |
str | None |
Always present | — |
session_token_utilization |
int | None |
Always present | — |
session_token_size |
int | None |
Always present | — |
| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.
Related types
AssumeRootOutput, PolicyDescriptorType
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
No generated paginator for this operation.
No output stream.
Errors
Import from rboto_sts.exceptions:
ExpiredTokenError, RegionDisabledError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.