1. Packages
  2. AWS
  3. API Docs
  4. apigateway
  5. getApiKeys
AWS v6.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

aws.apigateway.getApiKeys

Explore with Pulumi AI

AWS v6.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

Data source for managing AWS API Gateway API Keys.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.apigateway.getApiKeys({});
Copy
import pulumi
import pulumi_aws as aws

example = aws.apigateway.get_api_keys()
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigateway"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := apigateway.GetApiKeys(ctx, &apigateway.GetApiKeysArgs{}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.ApiGateway.GetApiKeys.Invoke();

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.apigateway.ApigatewayFunctions;
import com.pulumi.aws.apigateway.inputs.GetApiKeysArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = ApigatewayFunctions.getApiKeys();

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: aws:apigateway:getApiKeys
      arguments: {}
Copy

Using getApiKeys

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 getApiKeys(args: GetApiKeysArgs, opts?: InvokeOptions): Promise<GetApiKeysResult>
function getApiKeysOutput(args: GetApiKeysOutputArgs, opts?: InvokeOptions): Output<GetApiKeysResult>
Copy
def get_api_keys(customer_id: Optional[str] = None,
                 include_values: Optional[bool] = None,
                 opts: Optional[InvokeOptions] = None) -> GetApiKeysResult
def get_api_keys_output(customer_id: Optional[pulumi.Input[str]] = None,
                 include_values: Optional[pulumi.Input[bool]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetApiKeysResult]
Copy
func GetApiKeys(ctx *Context, args *GetApiKeysArgs, opts ...InvokeOption) (*GetApiKeysResult, error)
func GetApiKeysOutput(ctx *Context, args *GetApiKeysOutputArgs, opts ...InvokeOption) GetApiKeysResultOutput
Copy

> Note: This function is named GetApiKeys in the Go SDK.

public static class GetApiKeys 
{
    public static Task<GetApiKeysResult> InvokeAsync(GetApiKeysArgs args, InvokeOptions? opts = null)
    public static Output<GetApiKeysResult> Invoke(GetApiKeysInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetApiKeysResult> getApiKeys(GetApiKeysArgs args, InvokeOptions options)
public static Output<GetApiKeysResult> getApiKeys(GetApiKeysArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws:apigateway/getApiKeys:getApiKeys
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CustomerId string
Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.
IncludeValues bool
Set this value to true if you wish the result contains the key value. Defaults to false.
CustomerId string
Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.
IncludeValues bool
Set this value to true if you wish the result contains the key value. Defaults to false.
customerId String
Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.
includeValues Boolean
Set this value to true if you wish the result contains the key value. Defaults to false.
customerId string
Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.
includeValues boolean
Set this value to true if you wish the result contains the key value. Defaults to false.
customer_id str
Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.
include_values bool
Set this value to true if you wish the result contains the key value. Defaults to false.
customerId String
Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.
includeValues Boolean
Set this value to true if you wish the result contains the key value. Defaults to false.

getApiKeys Result

The following output properties are available:

Id string
ID of the API Key.
Items List<GetApiKeysItem>
List of objects containing API Key information. See below.
CustomerId string
Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.
IncludeValues bool
Id string
ID of the API Key.
Items []GetApiKeysItem
List of objects containing API Key information. See below.
CustomerId string
Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.
IncludeValues bool
id String
ID of the API Key.
items List<GetApiKeysItem>
List of objects containing API Key information. See below.
customerId String
Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.
includeValues Boolean
id string
ID of the API Key.
items GetApiKeysItem[]
List of objects containing API Key information. See below.
customerId string
Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.
includeValues boolean
id str
ID of the API Key.
items Sequence[GetApiKeysItem]
List of objects containing API Key information. See below.
customer_id str
Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.
include_values bool
id String
ID of the API Key.
items List<Property Map>
List of objects containing API Key information. See below.
customerId String
Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.
includeValues Boolean

Supporting Types

GetApiKeysItem

CreatedDate This property is required. string
Date and time when the API Key was created.
CustomerId This property is required. string
Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.
Description This property is required. string
Description of the API Key.
Enabled This property is required. bool
Whether the API Key is enabled.
Id This property is required. string
ID of the API Key.
LastUpdatedDate This property is required. string
Date and time when the API Key was last updated.
Name This property is required. string
Name of the API Key.
StageKeys This property is required. List<string>
Tags This property is required. Dictionary<string, string>
Map of tags for the resource.
Value This property is required. string
Value of the API Key.
CreatedDate This property is required. string
Date and time when the API Key was created.
CustomerId This property is required. string
Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.
Description This property is required. string
Description of the API Key.
Enabled This property is required. bool
Whether the API Key is enabled.
Id This property is required. string
ID of the API Key.
LastUpdatedDate This property is required. string
Date and time when the API Key was last updated.
Name This property is required. string
Name of the API Key.
StageKeys This property is required. []string
Tags This property is required. map[string]string
Map of tags for the resource.
Value This property is required. string
Value of the API Key.
createdDate This property is required. String
Date and time when the API Key was created.
customerId This property is required. String
Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.
description This property is required. String
Description of the API Key.
enabled This property is required. Boolean
Whether the API Key is enabled.
id This property is required. String
ID of the API Key.
lastUpdatedDate This property is required. String
Date and time when the API Key was last updated.
name This property is required. String
Name of the API Key.
stageKeys This property is required. List<String>
tags This property is required. Map<String,String>
Map of tags for the resource.
value This property is required. String
Value of the API Key.
createdDate This property is required. string
Date and time when the API Key was created.
customerId This property is required. string
Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.
description This property is required. string
Description of the API Key.
enabled This property is required. boolean
Whether the API Key is enabled.
id This property is required. string
ID of the API Key.
lastUpdatedDate This property is required. string
Date and time when the API Key was last updated.
name This property is required. string
Name of the API Key.
stageKeys This property is required. string[]
tags This property is required. {[key: string]: string}
Map of tags for the resource.
value This property is required. string
Value of the API Key.
created_date This property is required. str
Date and time when the API Key was created.
customer_id This property is required. str
Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.
description This property is required. str
Description of the API Key.
enabled This property is required. bool
Whether the API Key is enabled.
id This property is required. str
ID of the API Key.
last_updated_date This property is required. str
Date and time when the API Key was last updated.
name This property is required. str
Name of the API Key.
stage_keys This property is required. Sequence[str]
tags This property is required. Mapping[str, str]
Map of tags for the resource.
value This property is required. str
Value of the API Key.
createdDate This property is required. String
Date and time when the API Key was created.
customerId This property is required. String
Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.
description This property is required. String
Description of the API Key.
enabled This property is required. Boolean
Whether the API Key is enabled.
id This property is required. String
ID of the API Key.
lastUpdatedDate This property is required. String
Date and time when the API Key was last updated.
name This property is required. String
Name of the API Key.
stageKeys This property is required. List<String>
tags This property is required. Map<String>
Map of tags for the resource.
value This property is required. String
Value of the API Key.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.
AWS v6.76.0 published on Tuesday, Apr 8, 2025 by Pulumi