1. Registry
  2. Packages
  3. AWS Cloud Control
  4. API Docs
  5. appsync
  6. getApiKey

We recommend new projects start with resources from the AWS provider.

Viewing docs for AWS Cloud Control v1.80.0
published on Monday, Sep 21, 2026 by Pulumi
aws-native logo aws-native logo

We recommend new projects start with resources from the AWS provider.

Viewing docs for AWS Cloud Control v1.80.0
published on Monday, Sep 21, 2026 by Pulumi

    Resource Type definition for AWS::AppSync::ApiKey

    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?: InvokeOutputOptions): Output<GetApiKeyResult>
    def get_api_key(api_id: Optional[str] = None,
                    api_key_id: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetApiKeyResult
    def get_api_key_output(api_id: pulumi.Input[Optional[str]] = None,
                    api_key_id: pulumi.Input[Optional[str]] = None,
                    opts: Optional[InvokeOutputOptions] = 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 Output<GetApiKeyResult> Invoke(GetApiKeyInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetApiKeyResult> getApiKey(GetApiKeyArgs args, InvokeOptions options)
    public static Output<GetApiKeyResult> getApiKey(GetApiKeyArgs args, InvokeOptions options)
    public static Output<GetApiKeyResult> getApiKey(GetApiKeyArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: aws-native:appsync:getApiKey
      arguments:
        # arguments dictionary
    data "aws-native_appsync_get_api_key" "name" {
        # arguments
    }

    The following arguments are supported:

    ApiId string
    Unique AWS AppSync GraphQL API ID for this API key.
    ApiKeyId string
    The API key ID.
    ApiId string
    Unique AWS AppSync GraphQL API ID for this API key.
    ApiKeyId string
    The API key ID.
    api_id string
    Unique AWS AppSync GraphQL API ID for this API key.
    api_key_id string
    The API key ID.
    apiId String
    Unique AWS AppSync GraphQL API ID for this API key.
    apiKeyId String
    The API key ID.
    apiId string
    Unique AWS AppSync GraphQL API ID for this API key.
    apiKeyId string
    The API key ID.
    api_id str
    Unique AWS AppSync GraphQL API ID for this API key.
    api_key_id str
    The API key ID.
    apiId String
    Unique AWS AppSync GraphQL API ID for this API key.
    apiKeyId String
    The API key ID.

    getApiKey Result

    The following output properties are available:

    ApiKeyId string
    The API key ID.
    ApiKeyValue string
    The API key.
    Arn string
    The Amazon Resource Name (ARN) of the API key.
    Description string
    Unique description of your API key.
    Expires double
    The time after which the API key expires. The date is represented as seconds since the epoch, rounded down to the nearest hour.
    ApiKey string
    The API key.
    ApiKeyId string
    The API key ID.
    Arn string
    The Amazon Resource Name (ARN) of the API key.
    Description string
    Unique description of your API key.
    Expires float64
    The time after which the API key expires. The date is represented as seconds since the epoch, rounded down to the nearest hour.
    api_key string
    The API key.
    api_key_id string
    The API key ID.
    arn string
    The Amazon Resource Name (ARN) of the API key.
    description string
    Unique description of your API key.
    expires number
    The time after which the API key expires. The date is represented as seconds since the epoch, rounded down to the nearest hour.
    apiKey String
    The API key.
    apiKeyId String
    The API key ID.
    arn String
    The Amazon Resource Name (ARN) of the API key.
    description String
    Unique description of your API key.
    expires Double
    The time after which the API key expires. The date is represented as seconds since the epoch, rounded down to the nearest hour.
    apiKey string
    The API key.
    apiKeyId string
    The API key ID.
    arn string
    The Amazon Resource Name (ARN) of the API key.
    description string
    Unique description of your API key.
    expires number
    The time after which the API key expires. The date is represented as seconds since the epoch, rounded down to the nearest hour.
    api_key str
    The API key.
    api_key_id str
    The API key ID.
    arn str
    The Amazon Resource Name (ARN) of the API key.
    description str
    Unique description of your API key.
    expires float
    The time after which the API key expires. The date is represented as seconds since the epoch, rounded down to the nearest hour.
    apiKey String
    The API key.
    apiKeyId String
    The API key ID.
    arn String
    The Amazon Resource Name (ARN) of the API key.
    description String
    Unique description of your API key.
    expires Number
    The time after which the API key expires. The date is represented as seconds since the epoch, rounded down to the nearest hour.

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo aws-native logo

    We recommend new projects start with resources from the AWS provider.

    Viewing docs for AWS Cloud Control v1.80.0
    published on Monday, Sep 21, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial