create_api_key¶
Operation¶
create_api_key
¶
create_api_key(request: CreateApiKeyInput | CreateApiKeyInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateApiKeyInputDict]) -> CreateApiKeyOutput
Create an ApiKey resource.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
CreateApiKeyInput | CreateApiKeyInputDict | 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[CreateApiKeyInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
CreateApiKeyOutput
|
An instance of |
create_api_key
async
¶
create_api_key(request: CreateApiKeyInput | CreateApiKeyInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateApiKeyInputDict]) -> CreateApiKeyOutput
Create an ApiKey resource.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
CreateApiKeyInput | CreateApiKeyInputDict | 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[CreateApiKeyInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
CreateApiKeyOutput
|
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.
CreateApiKeyInputDict
¶
Bases: TypedDict
Dictionary form of CreateApiKeyInput.
Attributes¶
customer_id
instance-attribute
¶
customer_id: str | None
An Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.
enabled
instance-attribute
¶
enabled: bool | None
Specifies whether the ApiKey can be used by callers.
generate_distinct_id
instance-attribute
¶
generate_distinct_id: bool | None
Specifies whether (true) or not (false) the key identifier is
distinct from the created API key value. This parameter is deprecated
and should not be used.
stage_keys
instance-attribute
¶
stage_keys: Sequence[StageKey | StageKeyDict] | None
DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.
tags
instance-attribute
¶
The key-value map of strings. The valid character set is
[a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not
start with aws:. The tag value can be up to 256 characters.
CreateApiKeyInput
dataclass
¶
Bases: _SerdeShape
Request to create an ApiKey resource.
Attributes¶
customer_id
class-attribute
instance-attribute
¶
customer_id: str | None = ...
An Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.
description
class-attribute
instance-attribute
¶
description: str | None = ...
The description of the ApiKey.
enabled
class-attribute
instance-attribute
¶
enabled: bool = ...
Specifies whether the ApiKey can be used by callers.
generate_distinct_id
class-attribute
instance-attribute
¶
generate_distinct_id: bool = ...
Specifies whether (true) or not (false) the key identifier is
distinct from the created API key value. This parameter is deprecated
and should not be used.
stage_keys
class-attribute
instance-attribute
¶
DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.
tags
class-attribute
instance-attribute
¶
The key-value map of strings. The valid character set is
[a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not
start with aws:. The tag value can be up to 256 characters.
Output¶
CreateApiKeyOutput
dataclass
¶
Bases: _SerdeShape
A resource that can be distributed to callers for executing Method resources that require an API key. API keys can be mapped to any Stage on any RestApi, which indicates that the callers with the API key can make requests to that stage.
Attributes¶
created_date
class-attribute
instance-attribute
¶
created_date: datetime | None = ...
The timestamp when the API Key was created.
customer_id
class-attribute
instance-attribute
¶
customer_id: str | None = ...
An Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.
description
class-attribute
instance-attribute
¶
description: str | None = ...
The description of the API Key.
enabled
class-attribute
instance-attribute
¶
enabled: bool = ...
Specifies whether the API Key can be used by callers.
last_updated_date
class-attribute
instance-attribute
¶
last_updated_date: datetime | None = ...
The timestamp when the API Key was last updated.
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.
stage_keys
class-attribute
instance-attribute
¶
A list of Stage resources that are associated with the ApiKey resource.
tags
class-attribute
instance-attribute
¶
The collection of tags. Each tag element is associated with a given resource.