AWS Native

Pulumi Official
Package maintained by Pulumi
v0.19.0 published on Wednesday, Jun 8, 2022 by Pulumi

ApiKey

Resource Type definition for AWS::ApiGateway::ApiKey

Example Usage

Example

using Pulumi;
using AwsNative = Pulumi.AwsNative;

class MyStack : Stack
{
    public MyStack()
    {
        var config = new Config();
        var apiKeyName = config.Require("apiKeyName");
        var customerId = config.Require("customerId");
        var generateDistinctId = config.Require("generateDistinctId");
        var apiKey = new AwsNative.ApiGateway.ApiKey("apiKey", new AwsNative.ApiGateway.ApiKeyArgs
        {
            CustomerId = customerId,
            GenerateDistinctId = generateDistinctId,
            Name = apiKeyName,
        });
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		apiKeyName := cfg.Require("apiKeyName")
		customerId := cfg.Require("customerId")
		generateDistinctId := cfg.Require("generateDistinctId")
		_, err := apigateway.NewApiKey(ctx, "apiKey", &apigateway.ApiKeyArgs{
			CustomerId:         pulumi.String(customerId),
			GenerateDistinctId: pulumi.String(generateDistinctId),
			Name:               pulumi.String(apiKeyName),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_aws_native as aws_native

config = pulumi.Config()
api_key_name = config.require("apiKeyName")
customer_id = config.require("customerId")
generate_distinct_id = config.require("generateDistinctId")
api_key = aws_native.apigateway.ApiKey("apiKey",
    customer_id=customer_id,
    generate_distinct_id=generate_distinct_id,
    name=api_key_name)
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,
});

Coming soon!

Example

using Pulumi;
using AwsNative = Pulumi.AwsNative;

class MyStack : Stack
{
    public MyStack()
    {
        var config = new Config();
        var apiKeyName = config.Require("apiKeyName");
        var customerId = config.Require("customerId");
        var generateDistinctId = config.Require("generateDistinctId");
        var apiKey = new AwsNative.ApiGateway.ApiKey("apiKey", new AwsNative.ApiGateway.ApiKeyArgs
        {
            CustomerId = customerId,
            GenerateDistinctId = generateDistinctId,
            Name = apiKeyName,
        });
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		apiKeyName := cfg.Require("apiKeyName")
		customerId := cfg.Require("customerId")
		generateDistinctId := cfg.Require("generateDistinctId")
		_, err := apigateway.NewApiKey(ctx, "apiKey", &apigateway.ApiKeyArgs{
			CustomerId:         pulumi.String(customerId),
			GenerateDistinctId: pulumi.String(generateDistinctId),
			Name:               pulumi.String(apiKeyName),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_aws_native as aws_native

config = pulumi.Config()
api_key_name = config.require("apiKeyName")
customer_id = config.require("customerId")
generate_distinct_id = config.require("generateDistinctId")
api_key = aws_native.apigateway.ApiKey("apiKey",
    customer_id=customer_id,
    generate_distinct_id=generate_distinct_id,
    name=api_key_name)
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,
});

Coming soon!

Create a ApiKey Resource

new ApiKey(name: string, args?: ApiKeyArgs, opts?: CustomResourceOptions);
@overload
def ApiKey(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           customer_id: Optional[str] = None,
           description: Optional[str] = None,
           enabled: Optional[bool] = None,
           generate_distinct_id: Optional[bool] = None,
           name: Optional[str] = None,
           stage_keys: Optional[Sequence[ApiKeyStageKeyArgs]] = None,
           tags: Optional[Sequence[ApiKeyTagArgs]] = None,
           value: Optional[str] = None)
@overload
def ApiKey(resource_name: str,
           args: Optional[ApiKeyArgs] = None,
           opts: Optional[ResourceOptions] = None)
func NewApiKey(ctx *Context, name string, args *ApiKeyArgs, opts ...ResourceOption) (*ApiKey, error)
public ApiKey(string name, ApiKeyArgs? args = null, CustomResourceOptions? opts = null)
public ApiKey(String name, ApiKeyArgs args)
public ApiKey(String name, ApiKeyArgs args, CustomResourceOptions options)
type: aws-native:apigateway:ApiKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args ApiKeyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args ApiKeyArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ApiKeyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ApiKeyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ApiKeyArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

ApiKey Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The ApiKey resource accepts the following input properties:

CustomerId string

An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace.

Description string

A description of the purpose of the API key.

Enabled bool

Indicates whether the API key can be used by clients.

GenerateDistinctId bool

Specifies whether the key identifier is distinct from the created API key value. This parameter is deprecated and should not be used.

Name string

A name for the API key. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name.

StageKeys List<Pulumi.AwsNative.ApiGateway.Inputs.ApiKeyStageKeyArgs>

A list of stages to associate with this API key.

Tags List<Pulumi.AwsNative.ApiGateway.Inputs.ApiKeyTagArgs>

An array of arbitrary tags (key-value pairs) to associate with the API key.

Value string

The value of the API key. Must be at least 20 characters long.

CustomerId string

An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace.

Description string

A description of the purpose of the API key.

Enabled bool

Indicates whether the API key can be used by clients.

GenerateDistinctId bool

Specifies whether the key identifier is distinct from the created API key value. This parameter is deprecated and should not be used.

Name string

A name for the API key. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name.

StageKeys []ApiKeyStageKeyArgs

A list of stages to associate with this API key.

Tags []ApiKeyTagArgs

An array of arbitrary tags (key-value pairs) to associate with the API key.

Value string

The value of the API key. Must be at least 20 characters long.

customerId String

An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace.

description String

A description of the purpose of the API key.

enabled Boolean

Indicates whether the API key can be used by clients.

generateDistinctId Boolean

Specifies whether the key identifier is distinct from the created API key value. This parameter is deprecated and should not be used.

name String

A name for the API key. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name.

stageKeys List<ApiKeyStageKeyArgs>

A list of stages to associate with this API key.

tags List<ApiKeyTagArgs>

An array of arbitrary tags (key-value pairs) to associate with the API key.

value String

The value of the API key. Must be at least 20 characters long.

customerId string

An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace.

description string

A description of the purpose of the API key.

enabled boolean

Indicates whether the API key can be used by clients.

generateDistinctId boolean

Specifies whether the key identifier is distinct from the created API key value. This parameter is deprecated and should not be used.

name string

A name for the API key. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name.

stageKeys ApiKeyStageKeyArgs[]

A list of stages to associate with this API key.

tags ApiKeyTagArgs[]

An array of arbitrary tags (key-value pairs) to associate with the API key.

value string

The value of the API key. Must be at least 20 characters long.

customer_id str

An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace.

description str

A description of the purpose of the API key.

enabled bool

Indicates whether the API key can be used by clients.

generate_distinct_id bool

Specifies whether the key identifier is distinct from the created API key value. This parameter is deprecated and should not be used.

name str

A name for the API key. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name.

stage_keys Sequence[ApiKeyStageKeyArgs]

A list of stages to associate with this API key.

tags Sequence[ApiKeyTagArgs]

An array of arbitrary tags (key-value pairs) to associate with the API key.

value str

The value of the API key. Must be at least 20 characters long.

customerId String

An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace.

description String

A description of the purpose of the API key.

enabled Boolean

Indicates whether the API key can be used by clients.

generateDistinctId Boolean

Specifies whether the key identifier is distinct from the created API key value. This parameter is deprecated and should not be used.

name String

A name for the API key. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name.

stageKeys List<Property Map>

A list of stages to associate with this API key.

tags List<Property Map>

An array of arbitrary tags (key-value pairs) to associate with the API key.

value String

The value of the API key. Must be at least 20 characters long.

Outputs

All input properties are implicitly available as output properties. Additionally, the ApiKey resource produces the following output properties:

APIKeyId string

A Unique Key ID which identifies the API Key. Generated by the Create API and returned by the Read and List APIs

Id string

The provider-assigned unique ID for this managed resource.

APIKeyId string

A Unique Key ID which identifies the API Key. Generated by the Create API and returned by the Read and List APIs

Id string

The provider-assigned unique ID for this managed resource.

aPIKeyId String

A Unique Key ID which identifies the API Key. Generated by the Create API and returned by the Read and List APIs

id String

The provider-assigned unique ID for this managed resource.

aPIKeyId string

A Unique Key ID which identifies the API Key. Generated by the Create API and returned by the Read and List APIs

id string

The provider-assigned unique ID for this managed resource.

a_pi_key_id str

A Unique Key ID which identifies the API Key. Generated by the Create API and returned by the Read and List APIs

id str

The provider-assigned unique ID for this managed resource.

aPIKeyId String

A Unique Key ID which identifies the API Key. Generated by the Create API and returned by the Read and List APIs

id String

The provider-assigned unique ID for this managed resource.

Supporting Types

ApiKeyStageKey

RestApiId string

The ID of a RestApi resource that includes the stage with which you want to associate the API key.

StageName string

The name of the stage with which to associate the API key. The stage must be included in the RestApi resource that you specified in the RestApiId property.

RestApiId string

The ID of a RestApi resource that includes the stage with which you want to associate the API key.

StageName string

The name of the stage with which to associate the API key. The stage must be included in the RestApi resource that you specified in the RestApiId property.

restApiId String

The ID of a RestApi resource that includes the stage with which you want to associate the API key.

stageName String

The name of the stage with which to associate the API key. The stage must be included in the RestApi resource that you specified in the RestApiId property.

restApiId string

The ID of a RestApi resource that includes the stage with which you want to associate the API key.

stageName string

The name of the stage with which to associate the API key. The stage must be included in the RestApi resource that you specified in the RestApiId property.

rest_api_id str

The ID of a RestApi resource that includes the stage with which you want to associate the API key.

stage_name str

The name of the stage with which to associate the API key. The stage must be included in the RestApi resource that you specified in the RestApiId property.

restApiId String

The ID of a RestApi resource that includes the stage with which you want to associate the API key.

stageName String

The name of the stage with which to associate the API key. The stage must be included in the RestApi resource that you specified in the RestApiId property.

ApiKeyTag

Key string

The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.

Value string

The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.

Key string

The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.

Value string

The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.

key String

The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.

value String

The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.

key string

The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.

value string

The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.

key str

The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.

value str

The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.

key String

The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.

value String

The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.

Package Details

Repository
https://github.com/pulumi/pulumi-aws-native
License
Apache-2.0