create_api_key¶
Operation¶
create_api_key
async
¶
create_api_key(input: CreateApiKeyInput, plugins: list[Plugin] | None = None) -> CreateApiKeyOutput
Create an ApiKey resource.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
CreateApiKeyInput
|
An instance of |
required |
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
|
Returns:
| Type | Description |
|---|---|
CreateApiKeyOutput
|
An instance of |
Input¶
CreateApiKeyInput
dataclass
¶
Request to create an ApiKey resource.
Attributes¶
customer_id
class-attribute
instance-attribute
¶
customer_id: str | None = 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 = None
The description of the ApiKey.
enabled
class-attribute
instance-attribute
¶
enabled: bool = False
Specifies whether the ApiKey can be used by callers.
generate_distinct_id
class-attribute
instance-attribute
¶
generate_distinct_id: bool = False
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
¶
stage_keys: list[StageKey] | None = None
DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.
tags
class-attribute
instance-attribute
¶
tags: dict[str, str] | None = None
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.
value
class-attribute
instance-attribute
¶
value: str | None = None
Specifies a value of the API key.
Output¶
CreateApiKeyOutput
dataclass
¶
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 = None
The timestamp when the API Key was created.
customer_id
class-attribute
instance-attribute
¶
customer_id: str | None = 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 = None
The description of the API Key.
enabled
class-attribute
instance-attribute
¶
enabled: bool = False
Specifies whether the API Key can be used by callers.
last_updated_date
class-attribute
instance-attribute
¶
last_updated_date: datetime | None = None
The timestamp when the API Key was last updated.
stage_keys
class-attribute
instance-attribute
¶
stage_keys: list[str] | None = None
A list of Stage resources that are associated with the ApiKey resource.
tags
class-attribute
instance-attribute
¶
tags: dict[str, str] | None = None
The collection of tags. Each tag element is associated with a given resource.