AWS Native is in preview. AWS Classic is fully supported.
aws-native.apigateway.ApiKey
Explore with Pulumi AI
AWS Native is in preview. AWS Classic is fully supported.
Resource Type definition for AWS::ApiGateway::ApiKey
Example Usage
Example
using System.Collections.Generic;
using Pulumi;
using AwsNative = Pulumi.AwsNative;
return await Deployment.RunAsync(() =>
{
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()
{
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 System.Collections.Generic;
using Pulumi;
using AwsNative = Pulumi.AwsNative;
return await Deployment.RunAsync(() =>
{
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()
{
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 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:
- Customer
Id 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.
- Generate
Distinct boolId 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.
- Stage
Keys List<Pulumi.Aws Native. Api Gateway. Inputs. Api Key Stage Key Args> A list of stages to associate with this API key.
- List<Pulumi.
Aws Native. Api Gateway. Inputs. Api Key Tag Args> 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 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.
- Generate
Distinct boolId 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.
- Stage
Keys []ApiKey Stage Key Args A list of stages to associate with this API key.
- []Api
Key Tag Args 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 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.
- generate
Distinct BooleanId 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.
- stage
Keys List<ApiKey Stage Key Args> A list of stages to associate with this API key.
- List<Api
Key Tag Args> 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 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.
- generate
Distinct booleanId 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.
- stage
Keys ApiKey Stage Key Args[] A list of stages to associate with this API key.
- Api
Key Tag Args[] 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_ boolid 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[ApiKey Stage Key Args] A list of stages to associate with this API key.
- Sequence[Api
Key Tag Args] 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.
- customer
Id 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.
- generate
Distinct BooleanId 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.
- stage
Keys List<Property Map> A list of stages to associate with this API key.
- 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:
- a_
pi_ strkey_ id 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.
Supporting Types
ApiKeyStageKey
- rest_
api_ strid 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.
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
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
AWS Native is in preview. AWS Classic is fully supported.