We recommend new projects start with resources from the AWS provider.
aws-native.apigateway.getApiKey
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
The AWS::ApiGateway::ApiKey
resource creates a unique key that you can distribute to clients who are executing API Gateway Method
resources that require an API key. To specify which API key clients must use, map the API key with the RestApi
and Stage
resources that include the methods that require a key.
Using getApiKey
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getApiKey(args: GetApiKeyArgs, opts?: InvokeOptions): Promise<GetApiKeyResult>
function getApiKeyOutput(args: GetApiKeyOutputArgs, opts?: InvokeOptions): Output<GetApiKeyResult>
def get_api_key(api_key_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetApiKeyResult
def get_api_key_output(api_key_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetApiKeyResult]
func LookupApiKey(ctx *Context, args *LookupApiKeyArgs, opts ...InvokeOption) (*LookupApiKeyResult, error)
func LookupApiKeyOutput(ctx *Context, args *LookupApiKeyOutputArgs, opts ...InvokeOption) LookupApiKeyResultOutput
> Note: This function is named LookupApiKey
in the Go SDK.
public static class GetApiKey
{
public static Task<GetApiKeyResult> InvokeAsync(GetApiKeyArgs args, InvokeOptions? opts = null)
public static Output<GetApiKeyResult> Invoke(GetApiKeyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetApiKeyResult> getApiKey(GetApiKeyArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws-native:apigateway:getApiKey
arguments:
# arguments dictionary
The following arguments are supported:
- Api
Key stringId - The ID for the API key. For example:
abc123
.
- Api
Key stringId - The ID for the API key. For example:
abc123
.
- api
Key StringId - The ID for the API key. For example:
abc123
.
- api
Key stringId - The ID for the API key. For example:
abc123
.
- api_
key_ strid - The ID for the API key. For example:
abc123
.
- api
Key StringId - The ID for the API key. For example:
abc123
.
getApiKey Result
The following output properties are available:
- Api
Key stringId - The ID for the API key. For example:
abc123
. - Customer
Id string - An AWS Marketplace customer identifier, when integrating with the AWS SaaS Marketplace.
- Description string
- The description of the ApiKey.
- Enabled bool
- Specifies whether the ApiKey can be used by callers.
- Stage
Keys List<Pulumi.Aws Native. Api Gateway. Outputs. Api Key Stage Key> - DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.
- List<Pulumi.
Aws Native. Outputs. Tag> - 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.
- Api
Key stringId - The ID for the API key. For example:
abc123
. - Customer
Id string - An AWS Marketplace customer identifier, when integrating with the AWS SaaS Marketplace.
- Description string
- The description of the ApiKey.
- Enabled bool
- Specifies whether the ApiKey can be used by callers.
- Stage
Keys []ApiKey Stage Key - DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.
- Tag
- 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.
- api
Key StringId - The ID for the API key. For example:
abc123
. - customer
Id String - An AWS Marketplace customer identifier, when integrating with the AWS SaaS Marketplace.
- description String
- The description of the ApiKey.
- enabled Boolean
- Specifies whether the ApiKey can be used by callers.
- stage
Keys List<ApiKey Stage Key> - DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.
- List<Tag>
- 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.
- api
Key stringId - The ID for the API key. For example:
abc123
. - customer
Id string - An AWS Marketplace customer identifier, when integrating with the AWS SaaS Marketplace.
- description string
- The description of the ApiKey.
- enabled boolean
- Specifies whether the ApiKey can be used by callers.
- stage
Keys ApiKey Stage Key[] - DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.
- Tag[]
- 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.
- api_
key_ strid - The ID for the API key. For example:
abc123
. - customer_
id str - An AWS Marketplace customer identifier, when integrating with the AWS SaaS Marketplace.
- description str
- The description of the ApiKey.
- enabled bool
- Specifies whether the ApiKey can be used by callers.
- stage_
keys Sequence[ApiKey Stage Key] - DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.
- Sequence[root_Tag]
- 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.
- api
Key StringId - The ID for the API key. For example:
abc123
. - customer
Id String - An AWS Marketplace customer identifier, when integrating with the AWS SaaS Marketplace.
- description String
- The description of the ApiKey.
- enabled Boolean
- Specifies whether the ApiKey can be used by callers.
- stage
Keys List<Property Map> - DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.
- List<Property Map>
- 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.
Supporting Types
ApiKeyStageKey
- rest_
api_ strid - The string identifier of the associated RestApi.
- stage_
name str - The stage name associated with the stage key.
Tag
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.