UNPKG

@pulumi/aws-native

Version:

The Pulumi AWS Cloud Control Provider enables you to build, deploy, and manage [any AWS resource that's supported by the AWS Cloud Control API](https://github.com/pulumi/pulumi-aws-native/blob/master/provider/cmd/pulumi-gen-aws-native/supported-types.txt)

142 lines (141 loc) 6.42 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * 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. * * ## Example Usage * ### Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws_native from "@pulumi/aws-native"; * * const config = new pulumi.Config(); * const apiKeyName = config.require("apiKeyName"); * const customerId = config.require("customerId"); * const generateDistinctId = config.require("generateDistinctId"); * const apiKey = new aws_native.apigateway.ApiKey("apiKey", { * customerId: customerId, * generateDistinctId: generateDistinctId, * name: apiKeyName, * }); * * ``` * ### Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws_native from "@pulumi/aws-native"; * * const config = new pulumi.Config(); * const apiKeyName = config.require("apiKeyName"); * const customerId = config.require("customerId"); * const generateDistinctId = config.require("generateDistinctId"); * const apiKey = new aws_native.apigateway.ApiKey("apiKey", { * customerId: customerId, * generateDistinctId: generateDistinctId, * name: apiKeyName, * }); * * ``` */ export declare class ApiKey extends pulumi.CustomResource { /** * Get an existing ApiKey resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): ApiKey; /** * Returns true if the given object is an instance of ApiKey. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ApiKey; /** * The ID for the API key. For example: `abc123` . */ readonly apiKeyId: pulumi.Output<string>; /** * An AWS Marketplace customer identifier, when integrating with the AWS SaaS Marketplace. */ readonly customerId: pulumi.Output<string | undefined>; /** * The description of the ApiKey. */ readonly description: pulumi.Output<string | undefined>; /** * Specifies whether the ApiKey can be used by callers. */ readonly enabled: pulumi.Output<boolean | undefined>; /** * Specifies whether ( `true` ) or not ( `false` ) the key identifier is distinct from the created API key value. This parameter is deprecated and should not be used. */ readonly generateDistinctId: pulumi.Output<boolean | undefined>; /** * A name for the API key. If you don't specify a name, CFN generates a unique physical ID and uses that ID for the API key name. For more information, see [Name Type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html). * If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name. */ readonly name: pulumi.Output<string | undefined>; /** * DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key. */ readonly stageKeys: pulumi.Output<outputs.apigateway.ApiKeyStageKey[] | undefined>; /** * 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. */ readonly tags: pulumi.Output<outputs.Tag[] | undefined>; /** * Specifies a value of the API key. */ readonly value: pulumi.Output<string | undefined>; /** * Create a ApiKey resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args?: ApiKeyArgs, opts?: pulumi.CustomResourceOptions); } /** * The set of arguments for constructing a ApiKey resource. */ export interface ApiKeyArgs { /** * An AWS Marketplace customer identifier, when integrating with the AWS SaaS Marketplace. */ customerId?: pulumi.Input<string>; /** * The description of the ApiKey. */ description?: pulumi.Input<string>; /** * Specifies whether the ApiKey can be used by callers. */ enabled?: pulumi.Input<boolean>; /** * Specifies whether ( `true` ) or not ( `false` ) the key identifier is distinct from the created API key value. This parameter is deprecated and should not be used. */ generateDistinctId?: pulumi.Input<boolean>; /** * A name for the API key. If you don't specify a name, CFN generates a unique physical ID and uses that ID for the API key name. For more information, see [Name Type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html). * If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name. */ name?: pulumi.Input<string>; /** * DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key. */ stageKeys?: pulumi.Input<pulumi.Input<inputs.apigateway.ApiKeyStageKeyArgs>[]>; /** * 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. */ tags?: pulumi.Input<pulumi.Input<inputs.TagArgs>[]>; /** * Specifies a value of the API key. */ value?: pulumi.Input<string>; }