Skip to content

Bedrock Agentcore  >  Operations  >  get_resource_api_key

get_resource_api_key

Operation

get_resource_api_key async

get_resource_api_key(input: GetResourceApiKeyInput, plugins: list[Plugin] | None = None) -> GetResourceApiKeyOutput

Retrieves the API key associated with an API key credential provider.

Parameters:

Name Type Description Default
input GetResourceApiKeyInput

An instance of GetResourceApiKeyInput.

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
GetResourceApiKeyOutput

An instance of GetResourceApiKeyOutput.

Input

GetResourceApiKeyInput dataclass

Dataclass for GetResourceApiKeyInput structure.

Attributes

resource_credential_provider_name class-attribute instance-attribute
resource_credential_provider_name: str | None = None

The credential provider name for the resource from which you are retrieving the API key.

workload_identity_token class-attribute instance-attribute
workload_identity_token: str | None = field(repr=False, default=None)

The identity token of the workload from which you want to retrieve the API key.

Output

GetResourceApiKeyOutput dataclass

Dataclass for GetResourceApiKeyOutput structure.

Attributes

api_key class-attribute instance-attribute
api_key: str = field(repr=False)

The API key associated with the resource requested.