create_bearer_token¶
Operation¶
create_bearer_token
¶
create_bearer_token(request: CreateBearerTokenInput | CreateBearerTokenInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateBearerTokenInputDict]) -> CreateBearerTokenOutput
Creates a bearer token that represents your IAM credentials and can be used to access a supported AWS service. By default, the token is valid for 12 hours.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
CreateBearerTokenInput | CreateBearerTokenInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
**kwargs
|
Unpack[CreateBearerTokenInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
CreateBearerTokenOutput
|
An instance of |
create_bearer_token
async
¶
create_bearer_token(request: CreateBearerTokenInput | CreateBearerTokenInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateBearerTokenInputDict]) -> CreateBearerTokenOutput
Creates a bearer token that represents your IAM credentials and can be used to access a supported AWS service. By default, the token is valid for 12 hours.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
CreateBearerTokenInput | CreateBearerTokenInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
**kwargs
|
Unpack[CreateBearerTokenInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
CreateBearerTokenOutput
|
An instance of |
Input¶
Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.
CreateBearerTokenInputDict
¶
Bases: TypedDict
Dictionary form of CreateBearerTokenInput.
Attributes¶
duration_seconds
instance-attribute
¶
duration_seconds: int | None
The requested token lifetime in seconds, from 300 (5 minutes) up to the maximum allowed for the service, currently 43200 (12 hours). If omitted, the token is valid for 12 hours.
grant_type
instance-attribute
¶
The grant type. Must be "client_credentials".
CreateBearerTokenInput
dataclass
¶
Bases: _SerdeShape
Input structure for CreateBearerToken operation
Attributes¶
duration_seconds
class-attribute
instance-attribute
¶
duration_seconds: int | None = ...
The requested token lifetime in seconds, from 300 (5 minutes) up to the maximum allowed for the service, currently 43200 (12 hours). If omitted, the token is valid for 12 hours.
Output¶
CreateBearerTokenOutput
dataclass
¶
Bases: _SerdeShape
Output structure for CreateBearerToken operation Contains the bearer token, its type, and its lifetime.
Attributes¶
access_token
instance-attribute
¶
access_token: str
The bearer token. Present it to the AWS service named in the request.
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.