Skip to content

import_api_keys

Operation

import_api_keys

import_api_keys(request: ImportApiKeysInput | ImportApiKeysInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[ImportApiKeysInputDict]) -> ImportApiKeysOutput

Import API keys from an external source, such as a CSV-formatted file.

Parameters:

Name Type Description Default
request ImportApiKeysInput | ImportApiKeysInputDict | 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[ImportApiKeysInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
ImportApiKeysOutput

An instance of ImportApiKeysOutput.

import_api_keys async

import_api_keys(request: ImportApiKeysInput | ImportApiKeysInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[ImportApiKeysInputDict]) -> ImportApiKeysOutput

Import API keys from an external source, such as a CSV-formatted file.

Parameters:

Name Type Description Default
request ImportApiKeysInput | ImportApiKeysInputDict | 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[ImportApiKeysInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
ImportApiKeysOutput

An instance of ImportApiKeysOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

ImportApiKeysInputDict

Bases: TypedDict

Dictionary form of ImportApiKeysInput.

Attributes

body instance-attribute
body: Required[bytes]

The payload of the POST request to import API keys. For the payload format, see API Key File Format.

fail_on_warnings instance-attribute
fail_on_warnings: bool | None

A query parameter to indicate whether to rollback ApiKey importation (true) or not (false) when error is encountered.

format instance-attribute
format: Required[str]

A query parameter to specify the input format to imported API keys. Currently, only the csv format is supported.

ImportApiKeysInput dataclass

Bases: _SerdeShape

The POST request to import API keys from an external source, such as a CSV-formatted file.

Attributes

body class-attribute instance-attribute
body: bytes | None = ...

The payload of the POST request to import API keys. For the payload format, see API Key File Format.

fail_on_warnings class-attribute instance-attribute
fail_on_warnings: bool = ...

A query parameter to indicate whether to rollback ApiKey importation (true) or not (false) when error is encountered.

format class-attribute instance-attribute
format: str | None = ...

A query parameter to specify the input format to imported API keys. Currently, only the csv format is supported.

Output

ImportApiKeysOutput dataclass

Bases: _SerdeShape

The identifier of an ApiKey used in a UsagePlan.

Attributes

ids class-attribute instance-attribute
ids: list[str] | None = ...

A list of all the ApiKey identifiers.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

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.

warnings class-attribute instance-attribute
warnings: list[str] | None = ...

A list of warning messages.