Module apigateway
This page documents the language specification for the aws package. If you're looking for help working with the inputs, outputs, or functions of aws resources in a Pulumi program, please see the resource documentation for examples and API reference.
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the
pulumi/pulumi-awsrepo; however, if that doesn’t turn up anything, please consult the sourceterraform-providers/terraform-provider-awsrepo.
Resources
- Account
- ApiKey
- Authorizer
- BasePathMapping
- ClientCertificate
- Deployment
- DocumentationPart
- DocumentationVersion
- DomainName
- Integration
- IntegrationResponse
- Method
- MethodResponse
- MethodSettings
- Model
- RequestValidator
- Resource
- Response
- RestApi
- Stage
- UsagePlan
- UsagePlanKey
- VpcLink
Functions
Others
- AccountArgs
- AccountState
- ApiKeyArgs
- ApiKeyState
- AuthorizerArgs
- AuthorizerState
- BasePathMappingArgs
- BasePathMappingState
- ClientCertificateArgs
- ClientCertificateState
- DeploymentArgs
- DeploymentState
- DocumentationPartArgs
- DocumentationPartState
- DocumentationVersionArgs
- DocumentationVersionState
- DomainNameArgs
- DomainNameState
- GetKeyArgs
- GetKeyResult
- GetResourceArgs
- GetResourceResult
- GetRestApiArgs
- GetRestApiResult
- GetVpcLinkArgs
- GetVpcLinkResult
- IntegrationArgs
- IntegrationResponseArgs
- IntegrationResponseState
- IntegrationState
- MethodArgs
- MethodResponseArgs
- MethodResponseState
- MethodSettingsArgs
- MethodSettingsState
- MethodState
- ModelArgs
- ModelState
- RequestValidatorArgs
- RequestValidatorState
- ResourceArgs
- ResourceState
- ResponseArgs
- ResponseState
- RestApiArgs
- RestApiState
- StageArgs
- StageState
- UsagePlanArgs
- UsagePlanKeyArgs
- UsagePlanKeyState
- UsagePlanState
- VpcLinkArgs
- VpcLinkState
Resources
Resource Account
class Account extends CustomResourceProvides a settings of an API Gateway Account. Settings is applied region-wide per provider block.
Note: As there is no API method for deleting account settings or resetting it to defaults, destroying this resource will keep your account settings intact
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const cloudwatchRole = new aws.iam.Role("cloudwatch", {
assumeRolePolicy: `{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"Service": "apigateway.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
`,
});
const demo = new aws.apigateway.Account("demo", {
cloudwatchRoleArn: cloudwatchRole.arn,
});
const cloudwatchRolePolicy = new aws.iam.RolePolicy("cloudwatch", {
policy: `{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:DescribeLogGroups",
"logs:DescribeLogStreams",
"logs:PutLogEvents",
"logs:GetLogEvents",
"logs:FilterLogEvents"
],
"Resource": "*"
}
]
}
`,
role: cloudwatchRole.id,
});constructor
new Account(name: string, args?: AccountArgs, opts?: pulumi.CustomResourceOptions)Create a Account resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AccountState, opts?: pulumi.CustomResourceOptions): AccountGet an existing Account resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is AccountReturns true if the given object is an instance of Account. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property cloudwatchRoleArn
public cloudwatchRoleArn: pulumi.Output<string | undefined>;The ARN of an IAM role for CloudWatch (to allow logging & monitoring). See more in AWS Docs. Logging & monitoring can be enabled/disabled and otherwise tuned on the API Gateway Stage level.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property throttleSettings
public throttleSettings: pulumi.Output<AccountThrottleSettings>;Account-Level throttle settings. See exported fields below.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource ApiKey
class ApiKey extends CustomResourceProvides an API Gateway API Key.
NOTE: Since the API Gateway usage plans feature was launched on August 11, 2016, usage plans are now required to associate an API key with an API stage.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const myDemoApiKey = new aws.apigateway.ApiKey("MyDemoApiKey", {});constructor
new ApiKey(name: string, args?: ApiKeyArgs, opts?: pulumi.CustomResourceOptions)Create a ApiKey resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ApiKeyState, opts?: pulumi.CustomResourceOptions): ApiKeyGet an existing ApiKey resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ApiKeyReturns 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.
property arn
public arn: pulumi.Output<string>;Amazon Resource Name (ARN)
property createdDate
public createdDate: pulumi.Output<string>;The creation date of the API key
property description
public description: pulumi.Output<string>;The API key description. Defaults to “Managed by Pulumi”.
property enabled
public enabled: pulumi.Output<boolean | undefined>;Specifies whether the API key can be used by callers. Defaults to true.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property lastUpdatedDate
public lastUpdatedDate: pulumi.Output<string>;The last update date of the API key
property name
public name: pulumi.Output<string>;The name of the API key
property tags
public tags: pulumi.Output<{[key: string]: any} | undefined>;Key-value map of resource tags
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property value
public value: pulumi.Output<string>;The value of the API key. If not specified, it will be automatically generated by AWS on creation.
Resource Authorizer
class Authorizer extends CustomResourceProvides an API Gateway Authorizer.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const demoRestApi = new aws.apigateway.RestApi("demo", {});
const invocationRole = new aws.iam.Role("invocation_role", {
assumeRolePolicy: `{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "apigateway.amazonaws.com"
},
"Effect": "Allow",
"Sid": ""
}
]
}
`,
path: "/",
});
const lambda = new aws.iam.Role("lambda", {
assumeRolePolicy: `{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "lambda.amazonaws.com"
},
"Effect": "Allow",
"Sid": ""
}
]
}
`,
});
const authorizer = new aws.lambda.Function("authorizer", {
code: new pulumi.asset.FileArchive("lambda-function.zip"),
handler: "exports.example",
role: lambda.arn,
});
const demoAuthorizer = new aws.apigateway.Authorizer("demo", {
authorizerCredentials: invocationRole.arn,
authorizerUri: authorizer.invokeArn,
restApi: demoRestApi.id,
});
const invocationPolicy = new aws.iam.RolePolicy("invocation_policy", {
policy: pulumi.interpolate`{
"Version": "2012-10-17",
"Statement": [
{
"Action": "lambda:InvokeFunction",
"Effect": "Allow",
"Resource": "${authorizer.arn}"
}
]
}
`,
role: invocationRole.id,
});constructor
new Authorizer(name: string, args: AuthorizerArgs, opts?: pulumi.CustomResourceOptions)Create a Authorizer resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AuthorizerState, opts?: pulumi.CustomResourceOptions): AuthorizerGet an existing Authorizer resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is AuthorizerReturns true if the given object is an instance of Authorizer. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property authorizerCredentials
public authorizerCredentials: pulumi.Output<string | undefined>;The credentials required for the authorizer. To specify an IAM Role for API Gateway to assume, use the IAM Role ARN.
property authorizerResultTtlInSeconds
public authorizerResultTtlInSeconds: pulumi.Output<number | undefined>;The TTL of cached authorizer results in seconds.
Defaults to 300.
property authorizerUri
public authorizerUri: pulumi.Output<string | undefined>;The authorizer’s Uniform Resource Identifier (URI).
This must be a well-formed Lambda function URI in the form of arn:aws:apigateway:{region}:lambda:path/{service_api},
e.g. arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:012345678912:function:my-function/invocations
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property identitySource
public identitySource: pulumi.Output<string | undefined>;The source of the identity in an incoming request.
Defaults to method.request.header.Authorization. For REQUEST type, this may be a comma-separated list of values, including headers, query string parameters and stage variables - e.g. "method.request.header.SomeHeaderName,method.request.querystring.SomeQueryStringName,stageVariables.SomeStageVariableName"
property identityValidationExpression
public identityValidationExpression: pulumi.Output<string | undefined>;A validation expression for the incoming identity.
For TOKEN type, this value should be a regular expression. The incoming token from the client is matched
against this expression, and will proceed if the token matches. If the token doesn’t match,
the client receives a 401 Unauthorized response.
property name
public name: pulumi.Output<string>;The name of the authorizer
property providerArns
public providerArns: pulumi.Output<string[] | undefined>;A list of the Amazon Cognito user pool ARNs.
Each element is of this format: arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}.
property restApi
public restApi: pulumi.Output<string>;The ID of the associated REST API
property type
public type: pulumi.Output<string | undefined>;The type of the authorizer. Possible values are TOKEN for a Lambda function using a single authorization token submitted in a custom header, REQUEST for a Lambda function using incoming request parameters, or COGNITO_USER_POOLS for using an Amazon Cognito user pool.
Defaults to TOKEN.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource BasePathMapping
class BasePathMapping extends CustomResourceConnects a custom domain name registered via aws.apigateway.DomainName
with a deployed API so that its methods can be called via the
custom domain name.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as fs from "fs";
const exampleDeployment = new aws.apigateway.Deployment("example", {
// See aws_api_gateway_rest_api docs for how to create this
restApi: aws_api_gateway_rest_api_MyDemoAPI.id,
stageName: "live",
});
const exampleDomainName = new aws.apigateway.DomainName("example", {
certificateBody: fs.readFileSync(`./example.com/example.crt`, "utf-8"),
certificateChain: fs.readFileSync(`./example.com/ca.crt`, "utf-8"),
certificateName: "example-api",
certificatePrivateKey: fs.readFileSync(`./example.com/example.key`, "utf-8"),
domainName: "example.com",
});
const test = new aws.apigateway.BasePathMapping("test", {
restApi: aws_api_gateway_rest_api_MyDemoAPI.id,
domainName: exampleDomainName.domainName,
stageName: exampleDeployment.stageName,
});constructor
new BasePathMapping(name: string, args: BasePathMappingArgs, opts?: pulumi.CustomResourceOptions)Create a BasePathMapping resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: BasePathMappingState, opts?: pulumi.CustomResourceOptions): BasePathMappingGet an existing BasePathMapping resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is BasePathMappingReturns true if the given object is an instance of BasePathMapping. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property basePath
public basePath: pulumi.Output<string | undefined>;Path segment that must be prepended to the path when accessing the API via this mapping. If omitted, the API is exposed at the root of the given domain.
property domainName
public domainName: pulumi.Output<string>;The already-registered domain name to connect the API to.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property restApi
public restApi: pulumi.Output<string>;The id of the API to connect.
property stageName
public stageName: pulumi.Output<string | undefined>;The name of a specific deployment stage to expose at the given path. If omitted, callers may select any stage by including its name as a path element after the base path.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource ClientCertificate
class ClientCertificate extends CustomResourceProvides an API Gateway Client Certificate.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const demo = new aws.apigateway.ClientCertificate("demo", {
description: "My client certificate",
});constructor
new ClientCertificate(name: string, args?: ClientCertificateArgs, opts?: pulumi.CustomResourceOptions)Create a ClientCertificate resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ClientCertificateState, opts?: pulumi.CustomResourceOptions): ClientCertificateGet an existing ClientCertificate resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ClientCertificateReturns true if the given object is an instance of ClientCertificate. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property arn
public arn: pulumi.Output<string>;Amazon Resource Name (ARN)
property createdDate
public createdDate: pulumi.Output<string>;The date when the client certificate was created.
property description
public description: pulumi.Output<string | undefined>;The description of the client certificate.
property expirationDate
public expirationDate: pulumi.Output<string>;The date when the client certificate will expire.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property pemEncodedCertificate
public pemEncodedCertificate: pulumi.Output<string>;The PEM-encoded public key of the client certificate.
property tags
public tags: pulumi.Output<{[key: string]: any} | undefined>;Key-value map of resource tags
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource Deployment
class Deployment extends CustomResourceProvides an API Gateway REST Deployment.
Note: This resource depends on having at least one
aws.apigateway.Integrationcreated in the REST API, which itself has other dependencies. To avoid race conditions when all resources are being created together, you need to add implicit resource references via thetriggersargument or explicit resource references using the resourcedependsOnmeta-argument.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const myDemoAPI = new aws.apigateway.RestApi("myDemoAPI", {description: "This is my API for demonstration purposes"});
const myDemoResource = new aws.apigateway.Resource("myDemoResource", {
restApi: myDemoAPI.id,
parentId: myDemoAPI.rootResourceId,
pathPart: "test",
});
const myDemoMethod = new aws.apigateway.Method("myDemoMethod", {
restApi: myDemoAPI.id,
resourceId: myDemoResource.id,
httpMethod: "GET",
authorization: "NONE",
});
const myDemoIntegration = new aws.apigateway.Integration("myDemoIntegration", {
restApi: myDemoAPI.id,
resourceId: myDemoResource.id,
httpMethod: myDemoMethod.httpMethod,
type: "MOCK",
});
const myDemoDeployment = new aws.apigateway.Deployment("myDemoDeployment", {
restApi: myDemoAPI.id,
stageName: "test",
variables: {
answer: "42",
},
});constructor
new Deployment(name: string, args: DeploymentArgs, opts?: pulumi.CustomResourceOptions)Create a Deployment resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DeploymentState, opts?: pulumi.CustomResourceOptions): DeploymentGet an existing Deployment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is DeploymentReturns true if the given object is an instance of Deployment. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property createdDate
public createdDate: pulumi.Output<string>;The creation date of the deployment
property description
public description: pulumi.Output<string | undefined>;The description of the deployment
property executionArn
public executionArn: pulumi.Output<string>;The execution ARN to be used in lambdaPermission resource’s sourceArn
when allowing API Gateway to invoke a Lambda function,
e.g. arn:aws:execute-api:eu-west-2:123456789012:z4675bid1j/prod
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property invokeUrl
public invokeUrl: pulumi.Output<string>;The URL to invoke the API pointing to the stage,
e.g. https://z4675bid1j.execute-api.eu-west-2.amazonaws.com/prod
property restApi
public restApi: pulumi.Output<string>;The ID of the associated REST API
property stageDescription
public stageDescription: pulumi.Output<string | undefined>;The description of the stage
property stageName
public stageName: pulumi.Output<string | undefined>;The name of the stage. If the specified stage already exists, it will be updated to point to the new deployment. If the stage does not exist, a new one will be created and point to this deployment.
property triggers
public triggers: pulumi.Output<{[key: string]: string} | undefined>;A map of arbitrary keys and values that, when changed, will trigger a redeployment.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property variables
public variables: pulumi.Output<{[key: string]: string} | undefined>;A map that defines variables for the stage
Resource DocumentationPart
class DocumentationPart extends CustomResourceProvides a settings of an API Gateway Documentation Part.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleRestApi = new aws.apigateway.RestApi("example", {});
const exampleDocumentationPart = new aws.apigateway.DocumentationPart("example", {
location: {
method: "GET",
path: "/example",
type: "METHOD",
},
properties: "{\"description\":\"Example description\"}",
restApiId: exampleRestApi.id,
});constructor
new DocumentationPart(name: string, args: DocumentationPartArgs, opts?: pulumi.CustomResourceOptions)Create a DocumentationPart resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DocumentationPartState, opts?: pulumi.CustomResourceOptions): DocumentationPartGet an existing DocumentationPart resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is DocumentationPartReturns true if the given object is an instance of DocumentationPart. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property location
public location: pulumi.Output<DocumentationPartLocation>;The location of the targeted API entity of the to-be-created documentation part. See below.
property properties
public properties: pulumi.Output<string>;A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a JSON string, e.g., “{ \“description\”: \“The API does …\” }“. Only Swagger-compliant key-value pairs can be exported and, hence, published.
property restApiId
public restApiId: pulumi.Output<string>;The ID of the associated Rest API
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource DocumentationVersion
class DocumentationVersion extends CustomResourceProvides a resource to manage an API Gateway Documentation Version.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleRestApi = new aws.apigateway.RestApi("example", {});
const exampleDocumentationPart = new aws.apigateway.DocumentationPart("example", {
location: {
type: "API",
},
properties: "{\"description\":\"Example\"}",
restApiId: exampleRestApi.id,
});
const exampleDocumentationVersion = new aws.apigateway.DocumentationVersion("example", {
description: "Example description",
restApiId: exampleRestApi.id,
version: "example_version",
}, { dependsOn: [exampleDocumentationPart] });constructor
new DocumentationVersion(name: string, args: DocumentationVersionArgs, opts?: pulumi.CustomResourceOptions)Create a DocumentationVersion resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DocumentationVersionState, opts?: pulumi.CustomResourceOptions): DocumentationVersionGet an existing DocumentationVersion resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is DocumentationVersionReturns true if the given object is an instance of DocumentationVersion. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property description
public description: pulumi.Output<string | undefined>;The description of the API documentation version.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property restApiId
public restApiId: pulumi.Output<string>;The ID of the associated Rest API
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property version
public version: pulumi.Output<string>;The version identifier of the API documentation snapshot.
Resource DomainName
class DomainName extends CustomResourceRegisters a custom domain name for use with AWS API Gateway. Additional information about this functionality can be found in the API Gateway Developer Guide.
This resource just establishes ownership of and the TLS settings for
a particular domain name. An API can be attached to a particular path
under the registered domain name using
the aws.apigateway.BasePathMapping resource.
API Gateway domains can be defined as either ‘edge-optimized’ or ‘regional’. In an edge-optimized configuration,
API Gateway internally creates and manages a CloudFront distribution to route requests on the given hostname. In
addition to this resource it’s necessary to create a DNS record corresponding to the given domain name which is an alias
(either Route53 alias or traditional CNAME) to the Cloudfront domain name exported in the cloudfrontDomainName
attribute.
In a regional configuration, API Gateway does not create a CloudFront distribution to route requests to the API, though
a distribution can be created if needed. In either case, it is necessary to create a DNS record corresponding to the
given domain name which is an alias (either Route53 alias or traditional CNAME) to the regional domain name exported in
the regionalDomainName attribute.
Note: API Gateway requires the use of AWS Certificate Manager (ACM) certificates instead of Identity and Access Management (IAM) certificates in regions that support ACM. Regions that support ACM can be found in the Regions and Endpoints Documentation. To import an existing private key and certificate into ACM or request an ACM certificate, see the
aws.acm.Certificateresource.Note: The
aws.apigateway.DomainNameresource expects dependency on theaws.acm.CertificateValidationas only verified certificates can be used. This can be made either explicitly by adding thedependsOn = [aws_acm_certificate_validation.cert]attribute. Or implicitly by referring certificate ARN from the validation resource where it will be available after the resource creation:regionalCertificateArn = aws_acm_certificate_validation.cert.certificate_arn.Note: All arguments including the private key will be stored in the raw state as plain-text.
Example Usage
Edge Optimized (ACM Certificate)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleDomainName = new aws.apigateway.DomainName("example", {
certificateArn: aws_acm_certificate_validation_example.certificateArn,
domainName: "api.example.com",
});
// Example DNS record using Route53.
// Route53 is not specifically required; any DNS host can be used.
const exampleRecord = new aws.route53.Record("example", {
aliases: [{
evaluateTargetHealth: true,
name: exampleDomainName.cloudfrontDomainName,
zoneId: exampleDomainName.cloudfrontZoneId,
}],
name: exampleDomainName.domainName,
type: "A",
zoneId: aws_route53_zone_example.id,
});Edge Optimized (IAM Certificate)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as fs from "fs";
const exampleDomainName = new aws.apigateway.DomainName("example", {
certificateBody: fs.readFileSync(`./example.com/example.crt`, "utf-8"),
certificateChain: fs.readFileSync(`./example.com/ca.crt`, "utf-8"),
certificateName: "example-api",
certificatePrivateKey: fs.readFileSync(`./example.com/example.key`, "utf-8"),
domainName: "api.example.com",
});
// Example DNS record using Route53.
// Route53 is not specifically required; any DNS host can be used.
const exampleRecord = new aws.route53.Record("example", {
aliases: [{
evaluateTargetHealth: true,
name: exampleDomainName.cloudfrontDomainName,
zoneId: exampleDomainName.cloudfrontZoneId,
}],
name: exampleDomainName.domainName,
type: "A",
zoneId: aws_route53_zone_example.id, // See aws_route53_zone for how to create this
});Regional (ACM Certificate)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleDomainName = new aws.apigateway.DomainName("example", {
domainName: "api.example.com",
endpointConfiguration: {
types: "REGIONAL",
},
regionalCertificateArn: aws_acm_certificate_validation_example.certificateArn,
});
// Example DNS record using Route53.
// Route53 is not specifically required; any DNS host can be used.
const exampleRecord = new aws.route53.Record("example", {
aliases: [{
evaluateTargetHealth: true,
name: exampleDomainName.regionalDomainName,
zoneId: exampleDomainName.regionalZoneId,
}],
name: exampleDomainName.domainName,
type: "A",
zoneId: aws_route53_zone_example.id,
});Regional (IAM Certificate)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as fs from "fs";
const exampleDomainName = new aws.apigateway.DomainName("example", {
certificateBody: fs.readFileSync(`./example.com/example.crt`, "utf-8"),
certificateChain: fs.readFileSync(`./example.com/ca.crt`, "utf-8"),
certificatePrivateKey: fs.readFileSync(`./example.com/example.key`, "utf-8"),
domainName: "api.example.com",
endpointConfiguration: {
types: "REGIONAL",
},
regionalCertificateName: "example-api",
});
// Example DNS record using Route53.
// Route53 is not specifically required; any DNS host can be used.
const exampleRecord = new aws.route53.Record("example", {
aliases: [{
evaluateTargetHealth: true,
name: exampleDomainName.regionalDomainName,
zoneId: exampleDomainName.regionalZoneId,
}],
name: exampleDomainName.domainName,
type: "A",
zoneId: aws_route53_zone_example.id,
});constructor
new DomainName(name: string, args: DomainNameArgs, opts?: pulumi.CustomResourceOptions)Create a DomainName resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DomainNameState, opts?: pulumi.CustomResourceOptions): DomainNameGet an existing DomainName resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is DomainNameReturns true if the given object is an instance of DomainName. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property arn
public arn: pulumi.Output<string>;Amazon Resource Name (ARN)
property certificateArn
public certificateArn: pulumi.Output<string | undefined>;The ARN for an AWS-managed certificate. AWS Certificate Manager is the only supported source. Used when an edge-optimized domain name is desired. Conflicts with certificateName, certificateBody, certificateChain, certificatePrivateKey, regionalCertificateArn, and regionalCertificateName.
property certificateBody
public certificateBody: pulumi.Output<string | undefined>;The certificate issued for the domain name
being registered, in PEM format. Only valid for EDGE endpoint configuration type. Conflicts with certificateArn, regionalCertificateArn, and
regionalCertificateName.
property certificateChain
public certificateChain: pulumi.Output<string | undefined>;The certificate for the CA that issued the
certificate, along with any intermediate CA certificates required to
create an unbroken chain to a certificate trusted by the intended API clients. Only valid for EDGE endpoint configuration type. Conflicts with certificateArn,
regionalCertificateArn, and regionalCertificateName.
property certificateName
public certificateName: pulumi.Output<string | undefined>;The unique name to use when registering this
certificate as an IAM server certificate. Conflicts with certificateArn, regionalCertificateArn, and
regionalCertificateName. Required if certificateArn is not set.
property certificatePrivateKey
public certificatePrivateKey: pulumi.Output<string | undefined>;The private key associated with the
domain certificate given in certificateBody. Only valid for EDGE endpoint configuration type. Conflicts with certificateArn, regionalCertificateArn, and regionalCertificateName.
property certificateUploadDate
public certificateUploadDate: pulumi.Output<string>;The upload date associated with the domain certificate.
property cloudfrontDomainName
public cloudfrontDomainName: pulumi.Output<string>;The hostname created by Cloudfront to represent the distribution that implements this domain name mapping.
property cloudfrontZoneId
public cloudfrontZoneId: pulumi.Output<string>;For convenience, the hosted zone ID (Z2FDTNDATAQYW2)
that can be used to create a Route53 alias record for the distribution.
property domainName
public domainName: pulumi.Output<string>;The fully-qualified domain name to register
property endpointConfiguration
public endpointConfiguration: pulumi.Output<DomainNameEndpointConfiguration>;Configuration block defining API endpoint information including type. Defined below.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property regionalCertificateArn
public regionalCertificateArn: pulumi.Output<string | undefined>;The ARN for an AWS-managed certificate. AWS Certificate Manager is the only supported source. Used when a regional domain name is desired. Conflicts with certificateArn, certificateName, certificateBody, certificateChain, and certificatePrivateKey.
property regionalCertificateName
public regionalCertificateName: pulumi.Output<string | undefined>;The user-friendly name of the certificate that will be used by regional endpoint for this domain name. Conflicts with certificateArn, certificateName, certificateBody, certificateChain, and
certificatePrivateKey.
property regionalDomainName
public regionalDomainName: pulumi.Output<string>;The hostname for the custom domain’s regional endpoint.
property regionalZoneId
public regionalZoneId: pulumi.Output<string>;The hosted zone ID that can be used to create a Route53 alias record for the regional endpoint.
property securityPolicy
public securityPolicy: pulumi.Output<string>;The Transport Layer Security (TLS) version + cipher suite for this DomainName. The valid values are TLS_1_0 and TLS_1_2. Must be configured to perform drift detection.
property tags
public tags: pulumi.Output<{[key: string]: any} | undefined>;Key-value map of resource tags
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource Integration
class Integration extends CustomResourceProvides an HTTP Method Integration for an API Gateway Integration.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const myDemoAPI = new aws.apigateway.RestApi("MyDemoAPI", {
description: "This is my API for demonstration purposes",
});
const myDemoResource = new aws.apigateway.Resource("MyDemoResource", {
parentId: myDemoAPI.rootResourceId,
pathPart: "mydemoresource",
restApi: myDemoAPI.id,
});
const myDemoMethod = new aws.apigateway.Method("MyDemoMethod", {
authorization: "NONE",
httpMethod: "GET",
resourceId: myDemoResource.id,
restApi: myDemoAPI.id,
});
const myDemoIntegration = new aws.apigateway.Integration("MyDemoIntegration", {
cacheKeyParameters: ["method.request.path.param"],
cacheNamespace: "foobar",
httpMethod: myDemoMethod.httpMethod,
requestParameters: {
"integration.request.header.X-Authorization": "'static'",
},
// Transforms the incoming XML request to JSON
requestTemplates: {
"application/xml": `{
"body" : $input.json('$')
}
`,
},
resourceId: myDemoResource.id,
restApi: myDemoAPI.id,
timeoutMilliseconds: 29000,
type: "MOCK",
});Lambda integration
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const config = new pulumi.Config();
// Variables
const myregion = config.require("myregion");
const accountId = config.require("accountId");
// API Gateway
const api = new aws.apigateway.RestApi("api", {});
const resource = new aws.apigateway.Resource("resource", {
parentId: api.rootResourceId,
pathPart: "resource",
restApi: api.id,
});
const method = new aws.apigateway.Method("method", {
authorization: "NONE",
httpMethod: "GET",
resourceId: resource.id,
restApi: api.id,
});
// IAM
const role = new aws.iam.Role("role", {
assumeRolePolicy: `{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "lambda.amazonaws.com"
},
"Effect": "Allow",
"Sid": ""
}
]
}
`,
});
const lambda = new aws.lambda.Function("lambda", {
code: new pulumi.asset.FileArchive("lambda.zip"),
handler: "lambda.lambda_handler",
role: role.arn,
runtime: "python2.7",
});
const integration = new aws.apigateway.Integration("integration", {
httpMethod: method.httpMethod,
integrationHttpMethod: "POST",
resourceId: resource.id,
restApi: api.id,
type: "AWS_PROXY",
uri: lambda.invokeArn,
});
// Lambda
const apigwLambda = new aws.lambda.Permission("apigw_lambda", {
action: "lambda:InvokeFunction",
function: lambda.functionName,
principal: "apigateway.amazonaws.com",
sourceArn: pulumi.interpolate`arn:aws:execute-api:${myregion}:${accountId}:${api.id}/*/${method.httpMethod}${resource.path}`,
});VPC Link
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const config = new pulumi.Config();
const name = config.require("name");
const subnetId = config.require("subnetId");
const testLoadBalancer = new aws.lb.LoadBalancer("test", {
internal: true,
loadBalancerType: "network",
subnets: [subnetId],
});
const testVpcLink = new aws.apigateway.VpcLink("test", {
targetArn: testLoadBalancer.arn,
});
const testRestApi = new aws.apigateway.RestApi("test", {});
const testResource = new aws.apigateway.Resource("test", {
parentId: testRestApi.rootResourceId,
pathPart: "test",
restApi: testRestApi.id,
});
const testMethod = new aws.apigateway.Method("test", {
authorization: "NONE",
httpMethod: "GET",
requestModels: {
"application/json": "Error",
},
resourceId: testResource.id,
restApi: testRestApi.id,
});
const testIntegration = new aws.apigateway.Integration("test", {
connectionId: testVpcLink.id,
connectionType: "VPC_LINK",
contentHandling: "CONVERT_TO_TEXT",
httpMethod: testMethod.httpMethod,
integrationHttpMethod: "GET",
passthroughBehavior: "WHEN_NO_MATCH",
requestParameters: {
"integration.request.header.X-Authorization": "'static'",
"integration.request.header.X-Foo": "'Bar'",
},
requestTemplates: {
"application/json": "",
"application/xml": `#set($inputRoot = $input.path('$'))
{ }`,
},
resourceId: testResource.id,
restApi: testRestApi.id,
type: "HTTP",
uri: "https://www.google.de",
});constructor
new Integration(name: string, args: IntegrationArgs, opts?: pulumi.CustomResourceOptions)Create a Integration resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: IntegrationState, opts?: pulumi.CustomResourceOptions): IntegrationGet an existing Integration resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is IntegrationReturns true if the given object is an instance of Integration. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property cacheKeyParameters
public cacheKeyParameters: pulumi.Output<string[] | undefined>;A list of cache key parameters for the integration.
property cacheNamespace
public cacheNamespace: pulumi.Output<string>;The integration’s cache namespace.
property connectionId
public connectionId: pulumi.Output<string | undefined>;The id of the VpcLink used for the integration. Required if connectionType is VPC_LINK
property connectionType
public connectionType: pulumi.Output<string | undefined>;The integration input’s connectionType. Valid values are INTERNET (default for connections through the public routable internet), and VPC_LINK (for private connections between API Gateway and a network load balancer in a VPC).
property contentHandling
public contentHandling: pulumi.Output<string | undefined>;Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT. If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.
property credentials
public credentials: pulumi.Output<string | undefined>;The credentials required for the integration. For AWS integrations, 2 options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role’s ARN. To require that the caller’s identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*.
property httpMethod
public httpMethod: pulumi.Output<string>;The HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY)
when calling the associated resource.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property integrationHttpMethod
public integrationHttpMethod: pulumi.Output<string | undefined>;The integration HTTP method
(GET, POST, PUT, DELETE, HEAD, OPTIONs, ANY, PATCH) specifying how API Gateway will interact with the back end.
Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY.
Not all methods are compatible with all AWS integrations.
e.g. Lambda function can only be invoked via POST.
property passthroughBehavior
public passthroughBehavior: pulumi.Output<string>;The integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if requestTemplates is used.
property requestParameters
public requestParameters: pulumi.Output<{[key: string]: string} | undefined>;A map of request query string parameters and headers that should be passed to the backend responder.
For example: requestParameters = { "integration.request.header.X-Some-Other-Header" = "method.request.header.X-Some-Header" }
property requestTemplates
public requestTemplates: pulumi.Output<{[key: string]: string} | undefined>;A map of the integration’s request templates.
property resourceId
public resourceId: pulumi.Output<string>;The API resource ID.
property restApi
public restApi: pulumi.Output<string>;The ID of the associated REST API.
property timeoutMilliseconds
public timeoutMilliseconds: pulumi.Output<number | undefined>;Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds.
property type
public type: pulumi.Output<string>;The integration input’s type. Valid values are HTTP (for HTTP backends), MOCK (not calling any real backend), AWS (for AWS services), AWS_PROXY (for Lambda proxy integration) and HTTP_PROXY (for HTTP proxy integration). An HTTP or HTTP_PROXY integration with a connectionType of VPC_LINK is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.
property uri
public uri: pulumi.Output<string | undefined>;The input’s URI. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY.
For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification . For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. region, subdomain and service are used to determine the right endpoint.
e.g. arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:012345678901:function:my-func/invocations. For private integrations, the URI parameter is not used for routing requests to your endpoint, but is used for setting the Host header and for certificate validation.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource IntegrationResponse
class IntegrationResponse extends CustomResourceProvides an HTTP Method Integration Response for an API Gateway Resource.
Note: Depends on having
aws.apigateway.Integrationinside your rest api. To ensure this you might need to add an explicitdependsOnfor clean runs.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const myDemoAPI = new aws.apigateway.RestApi("MyDemoAPI", {
description: "This is my API for demonstration purposes",
});
const myDemoResource = new aws.apigateway.Resource("MyDemoResource", {
parentId: myDemoAPI.rootResourceId,
pathPart: "mydemoresource",
restApi: myDemoAPI.id,
});
const myDemoMethod = new aws.apigateway.Method("MyDemoMethod", {
authorization: "NONE",
httpMethod: "GET",
resourceId: myDemoResource.id,
restApi: myDemoAPI.id,
});
const myDemoIntegration = new aws.apigateway.Integration("MyDemoIntegration", {
httpMethod: myDemoMethod.httpMethod,
resourceId: myDemoResource.id,
restApi: myDemoAPI.id,
type: "MOCK",
});
const response200 = new aws.apigateway.MethodResponse("response_200", {
httpMethod: myDemoMethod.httpMethod,
resourceId: myDemoResource.id,
restApi: myDemoAPI.id,
statusCode: "200",
});
const myDemoIntegrationResponse = new aws.apigateway.IntegrationResponse("MyDemoIntegrationResponse", {
httpMethod: myDemoMethod.httpMethod,
resourceId: myDemoResource.id,
// Transforms the backend JSON response to XML
responseTemplates: {
"application/xml": `#set($inputRoot = $input.path('$'))
<?xml version="1.0" encoding="UTF-8"?>
<message>
$inputRoot.body
</message>
`,
},
restApi: myDemoAPI.id,
statusCode: response200.statusCode,
});constructor
new IntegrationResponse(name: string, args: IntegrationResponseArgs, opts?: pulumi.CustomResourceOptions)Create a IntegrationResponse resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: IntegrationResponseState, opts?: pulumi.CustomResourceOptions): IntegrationResponseGet an existing IntegrationResponse resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is IntegrationResponseReturns true if the given object is an instance of IntegrationResponse. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property contentHandling
public contentHandling: pulumi.Output<string | undefined>;Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT. If this property is not defined, the response payload will be passed through from the integration response to the method response without modification.
property httpMethod
public httpMethod: pulumi.Output<string>;The HTTP method (GET, POST, PUT, DELETE, HEAD, OPTIONS, ANY)
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property resourceId
public resourceId: pulumi.Output<string>;The API resource ID
property responseParameters
public responseParameters: pulumi.Output<{[key: string]: string} | undefined>;A map of response parameters that can be read from the backend response.
For example: responseParameters = { "method.response.header.X-Some-Header" = "integration.response.header.X-Some-Other-Header" }
property responseTemplates
public responseTemplates: pulumi.Output<{[key: string]: string} | undefined>;A map specifying the templates used to transform the integration response body
property restApi
public restApi: pulumi.Output<string>;The ID of the associated REST API
property selectionPattern
public selectionPattern: pulumi.Output<string | undefined>;Specifies the regular expression pattern used to choose
an integration response based on the response from the backend. Setting this to - makes the integration the default one.
If the backend is an AWS Lambda function, the AWS Lambda function error header is matched.
For all other HTTP and AWS backends, the HTTP status code is matched.
property statusCode
public statusCode: pulumi.Output<string>;The HTTP status code
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource Method
class Method extends CustomResourceProvides a HTTP Method for an API Gateway Resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const myDemoAPI = new aws.apigateway.RestApi("MyDemoAPI", {
description: "This is my API for demonstration purposes",
});
const myDemoResource = new aws.apigateway.Resource("MyDemoResource", {
parentId: myDemoAPI.rootResourceId,
pathPart: "mydemoresource",
restApi: myDemoAPI.id,
});
const myDemoMethod = new aws.apigateway.Method("MyDemoMethod", {
authorization: "NONE",
httpMethod: "GET",
resourceId: myDemoResource.id,
restApi: myDemoAPI.id,
});Usage with Cognito User Pool Authorizer
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const config = new pulumi.Config();
const cognitoUserPoolName = config.require("cognitoUserPoolName");
const thisUserPools = pulumi.output(aws.cognito.getUserPools({
name: cognitoUserPoolName,
}, { async: true }));
const thisRestApi = new aws.apigateway.RestApi("this", {});
const thisResource = new aws.apigateway.Resource("this", {
parentId: thisRestApi.rootResourceId,
pathPart: "{proxy+}",
restApi: thisRestApi.id,
});
const thisAuthorizer = new aws.apigateway.Authorizer("this", {
providerArns: thisUserPools.arns,
restApi: thisRestApi.id,
type: "COGNITO_USER_POOLS",
});
const any = new aws.apigateway.Method("any", {
authorization: "COGNITO_USER_POOLS",
authorizerId: thisAuthorizer.id,
httpMethod: "ANY",
requestParameters: {
"method.request.path.proxy": true,
},
resourceId: thisResource.id,
restApi: thisRestApi.id,
});constructor
new Method(name: string, args: MethodArgs, opts?: pulumi.CustomResourceOptions)Create a Method resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: MethodState, opts?: pulumi.CustomResourceOptions): MethodGet an existing Method resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is MethodReturns true if the given object is an instance of Method. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property apiKeyRequired
public apiKeyRequired: pulumi.Output<boolean | undefined>;Specify if the method requires an API key
property authorization
public authorization: pulumi.Output<string>;The type of authorization used for the method (NONE, CUSTOM, AWS_IAM, COGNITO_USER_POOLS)
property authorizationScopes
public authorizationScopes: pulumi.Output<string[] | undefined>;The authorization scopes used when the authorization is COGNITO_USER_POOLS
property authorizerId
public authorizerId: pulumi.Output<string | undefined>;The authorizer id to be used when the authorization is CUSTOM or COGNITO_USER_POOLS
property httpMethod
public httpMethod: pulumi.Output<string>;The HTTP Method (GET, POST, PUT, DELETE, HEAD, OPTIONS, ANY)
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property requestModels
public requestModels: pulumi.Output<{[key: string]: string} | undefined>;A map of the API models used for the request’s content type
where key is the content type (e.g. application/json)
and value is either Error, Empty (built-in models) or aws.apigateway.Model’s name.
property requestParameters
public requestParameters: pulumi.Output<{[key: string]: boolean} | undefined>;A map of request parameters (from the path, query string and headers) that should be passed to the integration. The boolean value indicates whether the parameter is required (true) or optional (false).
For example: requestParameters = {"method.request.header.X-Some-Header" = true "method.request.querystring.some-query-param" = true} would define that the header X-Some-Header and the query string some-query-param must be provided in the request.
property requestValidatorId
public requestValidatorId: pulumi.Output<string | undefined>;The ID of a aws.apigateway.RequestValidator
property resourceId
public resourceId: pulumi.Output<string>;The API resource ID
property restApi
public restApi: pulumi.Output<string>;The ID of the associated REST API
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource MethodResponse
class MethodResponse extends CustomResourceProvides an HTTP Method Response for an API Gateway Resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const myDemoAPI = new aws.apigateway.RestApi("MyDemoAPI", {
description: "This is my API for demonstration purposes",
});
const myDemoResource = new aws.apigateway.Resource("MyDemoResource", {
parentId: myDemoAPI.rootResourceId,
pathPart: "mydemoresource",
restApi: myDemoAPI.id,
});
const myDemoMethod = new aws.apigateway.Method("MyDemoMethod", {
authorization: "NONE",
httpMethod: "GET",
resourceId: myDemoResource.id,
restApi: myDemoAPI.id,
});
const myDemoIntegration = new aws.apigateway.Integration("MyDemoIntegration", {
httpMethod: myDemoMethod.httpMethod,
resourceId: myDemoResource.id,
restApi: myDemoAPI.id,
type: "MOCK",
});
const response200 = new aws.apigateway.MethodResponse("response_200", {
httpMethod: myDemoMethod.httpMethod,
resourceId: myDemoResource.id,
restApi: myDemoAPI.id,
statusCode: "200",
});constructor
new MethodResponse(name: string, args: MethodResponseArgs, opts?: pulumi.CustomResourceOptions)Create a MethodResponse resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: MethodResponseState, opts?: pulumi.CustomResourceOptions): MethodResponseGet an existing MethodResponse resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is MethodResponseReturns true if the given object is an instance of MethodResponse. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property httpMethod
public httpMethod: pulumi.Output<string>;The HTTP Method (GET, POST, PUT, DELETE, HEAD, OPTIONS, ANY)
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property resourceId
public resourceId: pulumi.Output<string>;The API resource ID
property responseModels
public responseModels: pulumi.Output<{[key: string]: string} | undefined>;A map of the API models used for the response’s content type
property responseParameters
public responseParameters: pulumi.Output<{[key: string]: boolean} | undefined>;A map of response parameters that can be sent to the caller.
For example: responseParameters = { "method.response.header.X-Some-Header" = true }
would define that the header X-Some-Header can be provided on the response.
property restApi
public restApi: pulumi.Output<string>;The ID of the associated REST API
property statusCode
public statusCode: pulumi.Output<string>;The HTTP status code
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource MethodSettings
class MethodSettings extends CustomResourceProvides an API Gateway Method Settings, e.g. logging or monitoring.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const testRestApi = new aws.apigateway.RestApi("test", {
description: "This is my API for demonstration purposes",
});
const testResource = new aws.apigateway.Resource("test", {
parentId: testRestApi.rootResourceId,
pathPart: "mytestresource",
restApi: testRestApi.id,
});
const testMethod = new aws.apigateway.Method("test", {
authorization: "NONE",
httpMethod: "GET",
resourceId: testResource.id,
restApi: testRestApi.id,
});
const testIntegration = new aws.apigateway.Integration("test", {
httpMethod: testMethod.httpMethod,
requestTemplates: {
"application/xml": `{
"body" : $input.json('$')
}
`,
},
resourceId: testResource.id,
restApi: testRestApi.id,
type: "MOCK",
});
const testDeployment = new aws.apigateway.Deployment("test", {
restApi: testRestApi.id,
stageName: "dev",
}, { dependsOn: [testIntegration] });
const testStage = new aws.apigateway.Stage("test", {
deployment: testDeployment.id,
restApi: testRestApi.id,
stageName: "prod",
});
const methodSettings = new aws.apigateway.MethodSettings("s", {
methodPath: pulumi.interpolate`${testResource.pathPart}/${testMethod.httpMethod}`,
restApi: testRestApi.id,
settings: {
loggingLevel: "INFO",
metricsEnabled: true,
},
stageName: testStage.stageName,
});constructor
new MethodSettings(name: string, args: MethodSettingsArgs, opts?: pulumi.CustomResourceOptions)Create a MethodSettings resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: MethodSettingsState, opts?: pulumi.CustomResourceOptions): MethodSettingsGet an existing MethodSettings resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is MethodSettingsReturns true if the given object is an instance of MethodSettings. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property methodPath
public methodPath: pulumi.Output<string>;Method path defined as {resource_path}/{http_method} for an individual method override, or */* for overriding all methods in the stage.
property restApi
public restApi: pulumi.Output<string>;The ID of the REST API
property settings
public settings: pulumi.Output<MethodSettingsSettings>;The settings block, see below.
property stageName
public stageName: pulumi.Output<string>;The name of the stage
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource Model
class Model extends CustomResourceProvides a Model for a REST API Gateway.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const myDemoAPI = new aws.apigateway.RestApi("MyDemoAPI", {
description: "This is my API for demonstration purposes",
});
const myDemoModel = new aws.apigateway.Model("MyDemoModel", {
contentType: "application/json",
description: "a JSON schema",
restApi: myDemoAPI.id,
schema: `{
"type": "object"
}
`,
});constructor
new Model(name: string, args: ModelArgs, opts?: pulumi.CustomResourceOptions)Create a Model resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ModelState, opts?: pulumi.CustomResourceOptions): ModelGet an existing Model resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ModelReturns true if the given object is an instance of Model. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property contentType
public contentType: pulumi.Output<string>;The content type of the model
property description
public description: pulumi.Output<string | undefined>;The description of the model
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property name
public name: pulumi.Output<string>;The name of the model
property restApi
public restApi: pulumi.Output<string>;The ID of the associated REST API
property schema
public schema: pulumi.Output<string | undefined>;The schema of the model in a JSON form
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource RequestValidator
class RequestValidator extends CustomResourceManages an API Gateway Request Validator.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.apigateway.RequestValidator("example", {
restApi: aws_api_gateway_rest_api_example.id,
validateRequestBody: true,
validateRequestParameters: true,
});constructor
new RequestValidator(name: string, args: RequestValidatorArgs, opts?: pulumi.CustomResourceOptions)Create a RequestValidator resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RequestValidatorState, opts?: pulumi.CustomResourceOptions): RequestValidatorGet an existing RequestValidator resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is RequestValidatorReturns true if the given object is an instance of RequestValidator. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property name
public name: pulumi.Output<string>;The name of the request validator
property restApi
public restApi: pulumi.Output<string>;The ID of the associated Rest API
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property validateRequestBody
public validateRequestBody: pulumi.Output<boolean | undefined>;Boolean whether to validate request body. Defaults to false.
property validateRequestParameters
public validateRequestParameters: pulumi.Output<boolean | undefined>;Boolean whether to validate request parameters. Defaults to false.
Resource Resource
class Resource extends CustomResourceProvides an API Gateway Resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const myDemoAPI = new aws.apigateway.RestApi("MyDemoAPI", {
description: "This is my API for demonstration purposes",
});
const myDemoResource = new aws.apigateway.Resource("MyDemoResource", {
parentId: myDemoAPI.rootResourceId,
pathPart: "mydemoresource",
restApi: myDemoAPI.id,
});constructor
new Resource(name: string, args: ResourceArgs, opts?: pulumi.CustomResourceOptions)Create a Resource resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ResourceState, opts?: pulumi.CustomResourceOptions): ResourceGet an existing Resource resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ResourceReturns true if the given object is an instance of Resource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property parentId
public parentId: pulumi.Output<string>;The ID of the parent API resource
property path
public path: pulumi.Output<string>;The complete path for this API resource, including all parent paths.
property pathPart
public pathPart: pulumi.Output<string>;The last path segment of this API resource.
property restApi
public restApi: pulumi.Output<string>;The ID of the associated REST API
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource Response
class Response extends CustomResourceProvides an API Gateway Gateway Response for a REST API Gateway.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const main = new aws.apigateway.RestApi("main", {});
const test = new aws.apigateway.Response("test", {
responseParameters: {
"gatewayresponse.header.Authorization": "'Basic'",
},
responseTemplates: {
"application/json": "{'message':$context.error.messageString}",
},
responseType: "UNAUTHORIZED",
restApiId: main.id,
statusCode: "401",
});constructor
new Response(name: string, args: ResponseArgs, opts?: pulumi.CustomResourceOptions)Create a Response resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ResponseState, opts?: pulumi.CustomResourceOptions): ResponseGet an existing Response resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ResponseReturns true if the given object is an instance of Response. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property responseParameters
public responseParameters: pulumi.Output<{[key: string]: string} | undefined>;A map specifying the parameters (paths, query strings and headers) of the Gateway Response.
property responseTemplates
public responseTemplates: pulumi.Output<{[key: string]: string} | undefined>;A map specifying the templates used to transform the response body.
property responseType
public responseType: pulumi.Output<string>;The response type of the associated GatewayResponse.
property restApiId
public restApiId: pulumi.Output<string>;The string identifier of the associated REST API.
property statusCode
public statusCode: pulumi.Output<string | undefined>;The HTTP status code of the Gateway Response.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource RestApi
class RestApi extends CustomResourceProvides an API Gateway REST API.
Note: Amazon API Gateway Version 1 resources are used for creating and deploying REST APIs. To create and deploy WebSocket and HTTP APIs, use Amazon API Gateway Version 2.
Example Usage
Basic
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const myDemoAPI = new aws.apigateway.RestApi("MyDemoAPI", {
description: "This is my API for demonstration purposes",
});Regional Endpoint Type
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.apigateway.RestApi("example", {
endpointConfiguration: {
types: "REGIONAL",
},
});constructor
new RestApi(name: string, args?: RestApiArgs, opts?: pulumi.CustomResourceOptions)Create a RestApi resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RestApiState, opts?: pulumi.CustomResourceOptions): RestApiGet an existing RestApi resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is RestApiReturns true if the given object is an instance of RestApi. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property apiKeySource
public apiKeySource: pulumi.Output<string | undefined>;The source of the API key for requests. Valid values are HEADER (default) and AUTHORIZER.
property arn
public arn: pulumi.Output<string>;Amazon Resource Name (ARN)
property binaryMediaTypes
public binaryMediaTypes: pulumi.Output<string[] | undefined>;The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.
property body
public body: pulumi.Output<string | undefined>;An OpenAPI specification that defines the set of routes and integrations to create as part of the REST API.
property createdDate
public createdDate: pulumi.Output<string>;The creation date of the REST API
property description
public description: pulumi.Output<string | undefined>;The description of the REST API
property endpointConfiguration
public endpointConfiguration: pulumi.Output<RestApiEndpointConfiguration>;Nested argument defining API endpoint configuration including endpoint type. Defined below.
property executionArn
public executionArn: pulumi.Output<string>;The execution ARN part to be used in lambdaPermission’s sourceArn
when allowing API Gateway to invoke a Lambda function,
e.g. arn:aws:execute-api:eu-west-2:123456789012:z4675bid1j, which can be concatenated with allowed stage, method and resource path.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property minimumCompressionSize
public minimumCompressionSize: pulumi.Output<number | undefined>;Minimum response size to compress for the REST API. Integer between -1 and 10485760 (10MB). Setting a value greater than -1 will enable compression, -1 disables compression (default).
property name
public name: pulumi.Output<string>;The name of the REST API
property policy
public policy: pulumi.Output<string | undefined>;JSON formatted policy document that controls access to the API Gateway.
property rootResourceId
public rootResourceId: pulumi.Output<string>;The resource ID of the REST API’s root
property tags
public tags: pulumi.Output<{[key: string]: any} | undefined>;Key-value map of resource tags
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource Stage
class Stage extends CustomResourceProvides an API Gateway Stage.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const testRestApi = new aws.apigateway.RestApi("test", {
description: "This is my API for demonstration purposes",
});
const testResource = new aws.apigateway.Resource("test", {
parentId: testRestApi.rootResourceId,
pathPart: "mytestresource",
restApi: testRestApi.id,
});
const testMethod = new aws.apigateway.Method("test", {
authorization: "NONE",
httpMethod: "GET",
resourceId: testResource.id,
restApi: testRestApi.id,
});
const testIntegration = new aws.apigateway.Integration("test", {
httpMethod: testMethod.httpMethod,
resourceId: testResource.id,
restApi: testRestApi.id,
type: "MOCK",
});
const testDeployment = new aws.apigateway.Deployment("test", {
restApi: testRestApi.id,
stageName: "dev",
}, { dependsOn: [testIntegration] });
const testStage = new aws.apigateway.Stage("test", {
deployment: testDeployment.id,
restApi: testRestApi.id,
stageName: "prod",
});
const methodSettings = new aws.apigateway.MethodSettings("s", {
methodPath: pulumi.interpolate`${testResource.pathPart}/${testMethod.httpMethod}`,
restApi: testRestApi.id,
settings: {
loggingLevel: "INFO",
metricsEnabled: true,
},
stageName: testStage.stageName,
});Managing the API Logging CloudWatch Log Group
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const config = new pulumi.Config();
const stageName = config.get("stageName") || "example";
const exampleRestApi = new aws.apigateway.RestApi("example", {});
const exampleLogGroup = new aws.cloudwatch.LogGroup("example", {
retentionInDays: 7,
});
const exampleStage = new aws.apigateway.Stage("example", {
name: stageName,
}, { dependsOn: [exampleLogGroup] });constructor
new Stage(name: string, args: StageArgs, opts?: pulumi.CustomResourceOptions)Create a Stage resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: StageState, opts?: pulumi.CustomResourceOptions): StageGet an existing Stage resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is StageReturns true if the given object is an instance of Stage. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property accessLogSettings
public accessLogSettings: pulumi.Output<StageAccessLogSettings | undefined>;Enables access logs for the API stage. Detailed below.
property arn
public arn: pulumi.Output<string>;Amazon Resource Name (ARN)
property cacheClusterEnabled
public cacheClusterEnabled: pulumi.Output<boolean | undefined>;Specifies whether a cache cluster is enabled for the stage
property cacheClusterSize
public cacheClusterSize: pulumi.Output<string | undefined>;The size of the cache cluster for the stage, if enabled.
Allowed values include 0.5, 1.6, 6.1, 13.5, 28.4, 58.2, 118 and 237.
property clientCertificateId
public clientCertificateId: pulumi.Output<string | undefined>;The identifier of a client certificate for the stage.
property deployment
public deployment: pulumi.Output<string>;The ID of the deployment that the stage points to
property description
public description: pulumi.Output<string | undefined>;The description of the stage
property documentationVersion
public documentationVersion: pulumi.Output<string | undefined>;The version of the associated API documentation
property executionArn
public executionArn: pulumi.Output<string>;The execution ARN to be used in lambdaPermission’s sourceArn
when allowing API Gateway to invoke a Lambda function,
e.g. arn:aws:execute-api:eu-west-2:123456789012:z4675bid1j/prod
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property invokeUrl
public invokeUrl: pulumi.Output<string>;The URL to invoke the API pointing to the stage,
e.g. https://z4675bid1j.execute-api.eu-west-2.amazonaws.com/prod
property restApi
public restApi: pulumi.Output<string>;The ID of the associated REST API
property stageName
public stageName: pulumi.Output<string>;The name of the stage
property tags
public tags: pulumi.Output<{[key: string]: any} | undefined>;A map of tags to assign to the resource.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property variables
public variables: pulumi.Output<{[key: string]: any} | undefined>;A map that defines the stage variables
property xrayTracingEnabled
public xrayTracingEnabled: pulumi.Output<boolean | undefined>;Whether active tracing with X-ray is enabled. Defaults to false.
Resource UsagePlan
class UsagePlan extends CustomResourceProvides an API Gateway Usage Plan.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const myapi = new aws.apigateway.RestApi("myapi", {});
const dev = new aws.apigateway.Deployment("dev", {
restApi: myapi.id,
stageName: "dev",
});
const prod = new aws.apigateway.Deployment("prod", {
restApi: myapi.id,
stageName: "prod",
});
const myUsagePlan = new aws.apigateway.UsagePlan("MyUsagePlan", {
apiStages: [
{
apiId: myapi.id,
stage: dev.stageName,
},
{
apiId: myapi.id,
stage: prod.stageName,
},
],
description: "my description",
productCode: "MYCODE",
quotaSettings: {
limit: 20,
offset: 2,
period: "WEEK",
},
throttleSettings: {
burstLimit: 5,
rateLimit: 10,
},
});constructor
new UsagePlan(name: string, args?: UsagePlanArgs, opts?: pulumi.CustomResourceOptions)Create a UsagePlan resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: UsagePlanState, opts?: pulumi.CustomResourceOptions): UsagePlanGet an existing UsagePlan resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is UsagePlanReturns true if the given object is an instance of UsagePlan. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property apiStages
public apiStages: pulumi.Output<UsagePlanApiStage[] | undefined>;The associated API stages of the usage plan.
property arn
public arn: pulumi.Output<string>;Amazon Resource Name (ARN)
property description
public description: pulumi.Output<string | undefined>;The description of a usage plan.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property name
public name: pulumi.Output<string>;The name of the usage plan.
property productCode
public productCode: pulumi.Output<string | undefined>;The AWS Markeplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.
property quotaSettings
public quotaSettings: pulumi.Output<UsagePlanQuotaSettings | undefined>;The quota settings of the usage plan.
property tags
public tags: pulumi.Output<{[key: string]: any} | undefined>;Key-value map of resource tags
property throttleSettings
public throttleSettings: pulumi.Output<UsagePlanThrottleSettings | undefined>;The throttling limits of the usage plan.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource UsagePlanKey
class UsagePlanKey extends CustomResourceProvides an API Gateway Usage Plan Key.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = new aws.apigateway.RestApi("test", {});
const myusageplan = new aws.apigateway.UsagePlan("myusageplan", {
apiStages: [{
apiId: test.id,
stage: aws_api_gateway_deployment_foo.stageName,
}],
});
const mykey = new aws.apigateway.ApiKey("mykey", {});
const main = new aws.apigateway.UsagePlanKey("main", {
keyId: mykey.id,
keyType: "API_KEY",
usagePlanId: myusageplan.id,
});constructor
new UsagePlanKey(name: string, args: UsagePlanKeyArgs, opts?: pulumi.CustomResourceOptions)Create a UsagePlanKey resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: UsagePlanKeyState, opts?: pulumi.CustomResourceOptions): UsagePlanKeyGet an existing UsagePlanKey resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is UsagePlanKeyReturns true if the given object is an instance of UsagePlanKey. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property keyId
public keyId: pulumi.Output<string>;The identifier of the API key resource.
property keyType
public keyType: pulumi.Output<string>;The type of the API key resource. Currently, the valid key type is API_KEY.
property name
public name: pulumi.Output<string>;The name of a usage plan key.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property usagePlanId
public usagePlanId: pulumi.Output<string>;The Id of the usage plan resource representing to associate the key to.
property value
public value: pulumi.Output<string>;The value of a usage plan key.
Resource VpcLink
class VpcLink extends CustomResourceProvides an API Gateway VPC Link.
Note: Amazon API Gateway Version 1 VPC Links enable private integrations that connect REST APIs to private resources in a VPC. To enable private integration for HTTP APIs, use the
Amazon API Gateway Version 2 VPC Linkresource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleLoadBalancer = new aws.lb.LoadBalancer("example", {
internal: true,
loadBalancerType: "network",
subnetMappings: [{
subnetId: "12345",
}],
});
const exampleVpcLink = new aws.apigateway.VpcLink("example", {
description: "example description",
targetArn: exampleLoadBalancer.arn,
});constructor
new VpcLink(name: string, args: VpcLinkArgs, opts?: pulumi.CustomResourceOptions)Create a VpcLink resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: VpcLinkState, opts?: pulumi.CustomResourceOptions): VpcLinkGet an existing VpcLink resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is VpcLinkReturns true if the given object is an instance of VpcLink. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property arn
public arn: pulumi.Output<string>;property description
public description: pulumi.Output<string | undefined>;The description of the VPC link.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property name
public name: pulumi.Output<string>;The name used to label and identify the VPC link.
property tags
public tags: pulumi.Output<{[key: string]: any} | undefined>;Key-value map of resource tags
property targetArn
public targetArn: pulumi.Output<string>;The list of network load balancer arns in the VPC targeted by the VPC link. Currently AWS only supports 1 target.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Functions
Function getKey
getKey(args: GetKeyArgs, opts?: pulumi.InvokeOptions): Promise<GetKeyResult>Use this data source to get the name and value of a pre-existing API Key, for example to supply credentials for a dependency microservice.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const myApiKey = pulumi.output(aws.apigateway.getKey({
id: "ru3mpjgse6",
}, { async: true }));Function getResource
getResource(args: GetResourceArgs, opts?: pulumi.InvokeOptions): Promise<GetResourceResult>Use this data source to get the id of a Resource in API Gateway. To fetch the Resource, you must provide the REST API id as well as the full path.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const myRestApi = pulumi.output(aws.apigateway.getRestApi({
name: "my-rest-api",
}, { async: true }));
const myResource = myRestApi.apply(myRestApi => aws.apigateway.getResource({
path: "/endpoint/path",
restApiId: myRestApi.id,
}, { async: true }));Function getRestApi
getRestApi(args: GetRestApiArgs, opts?: pulumi.InvokeOptions): Promise<GetRestApiResult>Use this data source to get the id and rootResourceId of a REST API in API Gateway. To fetch the REST API you must provide a name to match against. As there is no unique name constraint on REST APIs this data source will error if there is more than one match.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const myRestApi = pulumi.output(aws.apigateway.getRestApi({
name: "my-rest-api",
}, { async: true }));Function getVpcLink
getVpcLink(args: GetVpcLinkArgs, opts?: pulumi.InvokeOptions): Promise<GetVpcLinkResult>Use this data source to get the id of a VPC Link in API Gateway. To fetch the VPC Link you must provide a name to match against. As there is no unique name constraint on API Gateway VPC Links this data source will error if there is more than one match.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const myApiGatewayVpcLink = pulumi.output(aws.apigateway.getVpcLink({
name: "my-vpc-link",
}, { async: true }));Others
interface AccountArgs
interface AccountArgsThe set of arguments for constructing a Account resource.
property cloudwatchRoleArn
cloudwatchRoleArn?: pulumi.Input<string>;The ARN of an IAM role for CloudWatch (to allow logging & monitoring). See more in AWS Docs. Logging & monitoring can be enabled/disabled and otherwise tuned on the API Gateway Stage level.
interface AccountState
interface AccountStateInput properties used for looking up and filtering Account resources.
property cloudwatchRoleArn
cloudwatchRoleArn?: pulumi.Input<string>;The ARN of an IAM role for CloudWatch (to allow logging & monitoring). See more in AWS Docs. Logging & monitoring can be enabled/disabled and otherwise tuned on the API Gateway Stage level.
property throttleSettings
throttleSettings?: pulumi.Input<AccountThrottleSettings>;Account-Level throttle settings. See exported fields below.
interface ApiKeyArgs
interface ApiKeyArgsThe set of arguments for constructing a ApiKey resource.
property description
description?: pulumi.Input<string>;The API key description. Defaults to “Managed by Pulumi”.
property enabled
enabled?: pulumi.Input<boolean>;Specifies whether the API key can be used by callers. Defaults to true.
property name
name?: pulumi.Input<string>;The name of the API key
property tags
tags?: pulumi.Input<{[key: string]: any}>;Key-value map of resource tags
property value
value?: pulumi.Input<string>;The value of the API key. If not specified, it will be automatically generated by AWS on creation.
interface ApiKeyState
interface ApiKeyStateInput properties used for looking up and filtering ApiKey resources.
property arn
arn?: pulumi.Input<string>;Amazon Resource Name (ARN)
property createdDate
createdDate?: pulumi.Input<string>;The creation date of the API key
property description
description?: pulumi.Input<string>;The API key description. Defaults to “Managed by Pulumi”.
property enabled
enabled?: pulumi.Input<boolean>;Specifies whether the API key can be used by callers. Defaults to true.
property lastUpdatedDate
lastUpdatedDate?: pulumi.Input<string>;The last update date of the API key
property name
name?: pulumi.Input<string>;The name of the API key
property tags
tags?: pulumi.Input<{[key: string]: any}>;Key-value map of resource tags
property value
value?: pulumi.Input<string>;The value of the API key. If not specified, it will be automatically generated by AWS on creation.
interface AuthorizerArgs
interface AuthorizerArgsThe set of arguments for constructing a Authorizer resource.
property authorizerCredentials
authorizerCredentials?: pulumi.Input<string>;The credentials required for the authorizer. To specify an IAM Role for API Gateway to assume, use the IAM Role ARN.
property authorizerResultTtlInSeconds
authorizerResultTtlInSeconds?: pulumi.Input<number>;The TTL of cached authorizer results in seconds.
Defaults to 300.
property authorizerUri
authorizerUri?: pulumi.Input<string>;The authorizer’s Uniform Resource Identifier (URI).
This must be a well-formed Lambda function URI in the form of arn:aws:apigateway:{region}:lambda:path/{service_api},
e.g. arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:012345678912:function:my-function/invocations
property identitySource
identitySource?: pulumi.Input<string>;The source of the identity in an incoming request.
Defaults to method.request.header.Authorization. For REQUEST type, this may be a comma-separated list of values, including headers, query string parameters and stage variables - e.g. "method.request.header.SomeHeaderName,method.request.querystring.SomeQueryStringName,stageVariables.SomeStageVariableName"
property identityValidationExpression
identityValidationExpression?: pulumi.Input<string>;A validation expression for the incoming identity.
For TOKEN type, this value should be a regular expression. The incoming token from the client is matched
against this expression, and will proceed if the token matches. If the token doesn’t match,
the client receives a 401 Unauthorized response.
property name
name?: pulumi.Input<string>;The name of the authorizer
property providerArns
providerArns?: pulumi.Input<pulumi.Input<string>[]>;A list of the Amazon Cognito user pool ARNs.
Each element is of this format: arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}.
property restApi
restApi: pulumi.Input<string | RestApi>;The ID of the associated REST API
property type
type?: pulumi.Input<string>;The type of the authorizer. Possible values are TOKEN for a Lambda function using a single authorization token submitted in a custom header, REQUEST for a Lambda function using incoming request parameters, or COGNITO_USER_POOLS for using an Amazon Cognito user pool.
Defaults to TOKEN.
interface AuthorizerState
interface AuthorizerStateInput properties used for looking up and filtering Authorizer resources.
property authorizerCredentials
authorizerCredentials?: pulumi.Input<string>;The credentials required for the authorizer. To specify an IAM Role for API Gateway to assume, use the IAM Role ARN.
property authorizerResultTtlInSeconds
authorizerResultTtlInSeconds?: pulumi.Input<number>;The TTL of cached authorizer results in seconds.
Defaults to 300.
property authorizerUri
authorizerUri?: pulumi.Input<string>;The authorizer’s Uniform Resource Identifier (URI).
This must be a well-formed Lambda function URI in the form of arn:aws:apigateway:{region}:lambda:path/{service_api},
e.g. arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:012345678912:function:my-function/invocations
property identitySource
identitySource?: pulumi.Input<string>;The source of the identity in an incoming request.
Defaults to method.request.header.Authorization. For REQUEST type, this may be a comma-separated list of values, including headers, query string parameters and stage variables - e.g. "method.request.header.SomeHeaderName,method.request.querystring.SomeQueryStringName,stageVariables.SomeStageVariableName"
property identityValidationExpression
identityValidationExpression?: pulumi.Input<string>;A validation expression for the incoming identity.
For TOKEN type, this value should be a regular expression. The incoming token from the client is matched
against this expression, and will proceed if the token matches. If the token doesn’t match,
the client receives a 401 Unauthorized response.
property name
name?: pulumi.Input<string>;The name of the authorizer
property providerArns
providerArns?: pulumi.Input<pulumi.Input<string>[]>;A list of the Amazon Cognito user pool ARNs.
Each element is of this format: arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}.
property restApi
restApi?: pulumi.Input<string | RestApi>;The ID of the associated REST API
property type
type?: pulumi.Input<string>;The type of the authorizer. Possible values are TOKEN for a Lambda function using a single authorization token submitted in a custom header, REQUEST for a Lambda function using incoming request parameters, or COGNITO_USER_POOLS for using an Amazon Cognito user pool.
Defaults to TOKEN.
interface BasePathMappingArgs
interface BasePathMappingArgsThe set of arguments for constructing a BasePathMapping resource.
property basePath
basePath?: pulumi.Input<string>;Path segment that must be prepended to the path when accessing the API via this mapping. If omitted, the API is exposed at the root of the given domain.
property domainName
domainName: pulumi.Input<string>;The already-registered domain name to connect the API to.
property restApi
restApi: pulumi.Input<string | RestApi>;The id of the API to connect.
property stageName
stageName?: pulumi.Input<string>;The name of a specific deployment stage to expose at the given path. If omitted, callers may select any stage by including its name as a path element after the base path.
interface BasePathMappingState
interface BasePathMappingStateInput properties used for looking up and filtering BasePathMapping resources.
property basePath
basePath?: pulumi.Input<string>;Path segment that must be prepended to the path when accessing the API via this mapping. If omitted, the API is exposed at the root of the given domain.
property domainName
domainName?: pulumi.Input<string>;The already-registered domain name to connect the API to.
property restApi
restApi?: pulumi.Input<string | RestApi>;The id of the API to connect.
property stageName
stageName?: pulumi.Input<string>;The name of a specific deployment stage to expose at the given path. If omitted, callers may select any stage by including its name as a path element after the base path.
interface ClientCertificateArgs
interface ClientCertificateArgsThe set of arguments for constructing a ClientCertificate resource.
property description
description?: pulumi.Input<string>;The description of the client certificate.
property tags
tags?: pulumi.Input<{[key: string]: any}>;Key-value map of resource tags
interface ClientCertificateState
interface ClientCertificateStateInput properties used for looking up and filtering ClientCertificate resources.
property arn
arn?: pulumi.Input<string>;Amazon Resource Name (ARN)
property createdDate
createdDate?: pulumi.Input<string>;The date when the client certificate was created.
property description
description?: pulumi.Input<string>;The description of the client certificate.
property expirationDate
expirationDate?: pulumi.Input<string>;The date when the client certificate will expire.
property pemEncodedCertificate
pemEncodedCertificate?: pulumi.Input<string>;The PEM-encoded public key of the client certificate.
property tags
tags?: pulumi.Input<{[key: string]: any}>;Key-value map of resource tags
interface DeploymentArgs
interface DeploymentArgsThe set of arguments for constructing a Deployment resource.
property description
description?: pulumi.Input<string>;The description of the deployment
property restApi
restApi: pulumi.Input<string | RestApi>;The ID of the associated REST API
property stageDescription
stageDescription?: pulumi.Input<string>;The description of the stage
property stageName
stageName?: pulumi.Input<string>;The name of the stage. If the specified stage already exists, it will be updated to point to the new deployment. If the stage does not exist, a new one will be created and point to this deployment.
property triggers
triggers?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A map of arbitrary keys and values that, when changed, will trigger a redeployment.
property variables
variables?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A map that defines variables for the stage
interface DeploymentState
interface DeploymentStateInput properties used for looking up and filtering Deployment resources.
property createdDate
createdDate?: pulumi.Input<string>;The creation date of the deployment
property description
description?: pulumi.Input<string>;The description of the deployment
property executionArn
executionArn?: pulumi.Input<string>;The execution ARN to be used in lambdaPermission resource’s sourceArn
when allowing API Gateway to invoke a Lambda function,
e.g. arn:aws:execute-api:eu-west-2:123456789012:z4675bid1j/prod
property invokeUrl
invokeUrl?: pulumi.Input<string>;The URL to invoke the API pointing to the stage,
e.g. https://z4675bid1j.execute-api.eu-west-2.amazonaws.com/prod
property restApi
restApi?: pulumi.Input<string | RestApi>;The ID of the associated REST API
property stageDescription
stageDescription?: pulumi.Input<string>;The description of the stage
property stageName
stageName?: pulumi.Input<string>;The name of the stage. If the specified stage already exists, it will be updated to point to the new deployment. If the stage does not exist, a new one will be created and point to this deployment.
property triggers
triggers?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A map of arbitrary keys and values that, when changed, will trigger a redeployment.
property variables
variables?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A map that defines variables for the stage
interface DocumentationPartArgs
interface DocumentationPartArgsThe set of arguments for constructing a DocumentationPart resource.
property location
location: pulumi.Input<DocumentationPartLocation>;The location of the targeted API entity of the to-be-created documentation part. See below.
property properties
properties: pulumi.Input<string>;A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a JSON string, e.g., “{ \“description\”: \“The API does …\” }“. Only Swagger-compliant key-value pairs can be exported and, hence, published.
property restApiId
restApiId: pulumi.Input<string>;The ID of the associated Rest API
interface DocumentationPartState
interface DocumentationPartStateInput properties used for looking up and filtering DocumentationPart resources.
property location
location?: pulumi.Input<DocumentationPartLocation>;The location of the targeted API entity of the to-be-created documentation part. See below.
property properties
properties?: pulumi.Input<string>;A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a JSON string, e.g., “{ \“description\”: \“The API does …\” }“. Only Swagger-compliant key-value pairs can be exported and, hence, published.
property restApiId
restApiId?: pulumi.Input<string>;The ID of the associated Rest API
interface DocumentationVersionArgs
interface DocumentationVersionArgsThe set of arguments for constructing a DocumentationVersion resource.
property description
description?: pulumi.Input<string>;The description of the API documentation version.
property restApiId
restApiId: pulumi.Input<string>;The ID of the associated Rest API
property version
version: pulumi.Input<string>;The version identifier of the API documentation snapshot.
interface DocumentationVersionState
interface DocumentationVersionStateInput properties used for looking up and filtering DocumentationVersion resources.
property description
description?: pulumi.Input<string>;The description of the API documentation version.
property restApiId
restApiId?: pulumi.Input<string>;The ID of the associated Rest API
property version
version?: pulumi.Input<string>;The version identifier of the API documentation snapshot.
interface DomainNameArgs
interface DomainNameArgsThe set of arguments for constructing a DomainName resource.
property certificateArn
certificateArn?: pulumi.Input<string>;The ARN for an AWS-managed certificate. AWS Certificate Manager is the only supported source. Used when an edge-optimized domain name is desired. Conflicts with certificateName, certificateBody, certificateChain, certificatePrivateKey, regionalCertificateArn, and regionalCertificateName.
property certificateBody
certificateBody?: pulumi.Input<string>;The certificate issued for the domain name
being registered, in PEM format. Only valid for EDGE endpoint configuration type. Conflicts with certificateArn, regionalCertificateArn, and
regionalCertificateName.
property certificateChain
certificateChain?: pulumi.Input<string>;The certificate for the CA that issued the
certificate, along with any intermediate CA certificates required to
create an unbroken chain to a certificate trusted by the intended API clients. Only valid for EDGE endpoint configuration type. Conflicts with certificateArn,
regionalCertificateArn, and regionalCertificateName.
property certificateName
certificateName?: pulumi.Input<string>;The unique name to use when registering this
certificate as an IAM server certificate. Conflicts with certificateArn, regionalCertificateArn, and
regionalCertificateName. Required if certificateArn is not set.
property certificatePrivateKey
certificatePrivateKey?: pulumi.Input<string>;The private key associated with the
domain certificate given in certificateBody. Only valid for EDGE endpoint configuration type. Conflicts with certificateArn, regionalCertificateArn, and regionalCertificateName.
property domainName
domainName: pulumi.Input<string>;The fully-qualified domain name to register
property endpointConfiguration
endpointConfiguration?: pulumi.Input<DomainNameEndpointConfiguration>;Configuration block defining API endpoint information including type. Defined below.
property regionalCertificateArn
regionalCertificateArn?: pulumi.Input<string>;The ARN for an AWS-managed certificate. AWS Certificate Manager is the only supported source. Used when a regional domain name is desired. Conflicts with certificateArn, certificateName, certificateBody, certificateChain, and certificatePrivateKey.
property regionalCertificateName
regionalCertificateName?: pulumi.Input<string>;The user-friendly name of the certificate that will be used by regional endpoint for this domain name. Conflicts with certificateArn, certificateName, certificateBody, certificateChain, and
certificatePrivateKey.
property securityPolicy
securityPolicy?: pulumi.Input<string>;The Transport Layer Security (TLS) version + cipher suite for this DomainName. The valid values are TLS_1_0 and TLS_1_2. Must be configured to perform drift detection.
property tags
tags?: pulumi.Input<{[key: string]: any}>;Key-value map of resource tags
interface DomainNameState
interface DomainNameStateInput properties used for looking up and filtering DomainName resources.
property arn
arn?: pulumi.Input<string>;Amazon Resource Name (ARN)
property certificateArn
certificateArn?: pulumi.Input<string>;The ARN for an AWS-managed certificate. AWS Certificate Manager is the only supported source. Used when an edge-optimized domain name is desired. Conflicts with certificateName, certificateBody, certificateChain, certificatePrivateKey, regionalCertificateArn, and regionalCertificateName.
property certificateBody
certificateBody?: pulumi.Input<string>;The certificate issued for the domain name
being registered, in PEM format. Only valid for EDGE endpoint configuration type. Conflicts with certificateArn, regionalCertificateArn, and
regionalCertificateName.
property certificateChain
certificateChain?: pulumi.Input<string>;The certificate for the CA that issued the
certificate, along with any intermediate CA certificates required to
create an unbroken chain to a certificate trusted by the intended API clients. Only valid for EDGE endpoint configuration type. Conflicts with certificateArn,
regionalCertificateArn, and regionalCertificateName.
property certificateName
certificateName?: pulumi.Input<string>;The unique name to use when registering this
certificate as an IAM server certificate. Conflicts with certificateArn, regionalCertificateArn, and
regionalCertificateName. Required if certificateArn is not set.
property certificatePrivateKey
certificatePrivateKey?: pulumi.Input<string>;The private key associated with the
domain certificate given in certificateBody. Only valid for EDGE endpoint configuration type. Conflicts with certificateArn, regionalCertificateArn, and regionalCertificateName.
property certificateUploadDate
certificateUploadDate?: pulumi.Input<string>;The upload date associated with the domain certificate.
property cloudfrontDomainName
cloudfrontDomainName?: pulumi.Input<string>;The hostname created by Cloudfront to represent the distribution that implements this domain name mapping.
property cloudfrontZoneId
cloudfrontZoneId?: pulumi.Input<string>;For convenience, the hosted zone ID (Z2FDTNDATAQYW2)
that can be used to create a Route53 alias record for the distribution.
property domainName
domainName?: pulumi.Input<string>;The fully-qualified domain name to register
property endpointConfiguration
endpointConfiguration?: pulumi.Input<DomainNameEndpointConfiguration>;Configuration block defining API endpoint information including type. Defined below.
property regionalCertificateArn
regionalCertificateArn?: pulumi.Input<string>;The ARN for an AWS-managed certificate. AWS Certificate Manager is the only supported source. Used when a regional domain name is desired. Conflicts with certificateArn, certificateName, certificateBody, certificateChain, and certificatePrivateKey.
property regionalCertificateName
regionalCertificateName?: pulumi.Input<string>;The user-friendly name of the certificate that will be used by regional endpoint for this domain name. Conflicts with certificateArn, certificateName, certificateBody, certificateChain, and
certificatePrivateKey.
property regionalDomainName
regionalDomainName?: pulumi.Input<string>;The hostname for the custom domain’s regional endpoint.
property regionalZoneId
regionalZoneId?: pulumi.Input<string>;The hosted zone ID that can be used to create a Route53 alias record for the regional endpoint.
property securityPolicy
securityPolicy?: pulumi.Input<string>;The Transport Layer Security (TLS) version + cipher suite for this DomainName. The valid values are TLS_1_0 and TLS_1_2. Must be configured to perform drift detection.
property tags
tags?: pulumi.Input<{[key: string]: any}>;Key-value map of resource tags
interface GetKeyArgs
interface GetKeyArgsA collection of arguments for invoking getKey.
property id
id: string;The ID of the API Key to look up.
property tags
tags?: undefined | {[key: string]: any};A map of tags for the resource.
interface GetKeyResult
interface GetKeyResultA collection of values returned by getKey.
property createdDate
createdDate: string;The date and time when the API Key was created.
property description
description: string;The description of the API Key.
property enabled
enabled: boolean;Specifies whether the API Key is enabled.
property id
id: string;Set to the ID of the API Key.
property lastUpdatedDate
lastUpdatedDate: string;The date and time when the API Key was last updated.
property name
name: string;Set to the name of the API Key.
property tags
tags: {[key: string]: any};A map of tags for the resource.
property value
value: string;Set to the value of the API Key.
interface GetResourceArgs
interface GetResourceArgsA collection of arguments for invoking getResource.
property path
path: string;The full path of the resource. If no path is found, an error will be returned.
property restApiId
restApiId: string;The REST API id that owns the resource. If no REST API is found, an error will be returned.
interface GetResourceResult
interface GetResourceResultA collection of values returned by getResource.
property id
id: string;The provider-assigned unique ID for this managed resource.
property parentId
parentId: string;Set to the ID of the parent Resource.
property path
path: string;property pathPart
pathPart: string;Set to the path relative to the parent Resource.
property restApiId
restApiId: string;interface GetRestApiArgs
interface GetRestApiArgsA collection of arguments for invoking getRestApi.
property name
name: string;The name of the REST API to look up. If no REST API is found with this name, an error will be returned. If multiple REST APIs are found with this name, an error will be returned.
property tags
tags?: undefined | {[key: string]: any};Key-value map of resource tags.
interface GetRestApiResult
interface GetRestApiResultA collection of values returned by getRestApi.
property apiKeySource
apiKeySource: string;The source of the API key for requests.
property arn
arn: string;The ARN of the REST API.
property binaryMediaTypes
binaryMediaTypes: string[];The list of binary media types supported by the REST API.
property description
description: string;The description of the REST API.
property endpointConfigurations
endpointConfigurations: GetRestApiEndpointConfiguration[];The endpoint configuration of this RestApi showing the endpoint types of the API.
property executionArn
executionArn: string;The execution ARN part to be used in lambdaPermission’s sourceArn when allowing API Gateway to invoke a Lambda function, e.g. arn:aws:execute-api:eu-west-2:123456789012:z4675bid1j, which can be concatenated with allowed stage, method and resource path.
property id
id: string;The provider-assigned unique ID for this managed resource.
property minimumCompressionSize
minimumCompressionSize: number;Minimum response size to compress for the REST API.
property name
name: string;property policy
policy: string;JSON formatted policy document that controls access to the API Gateway.
property rootResourceId
rootResourceId: string;Set to the ID of the API Gateway Resource on the found REST API where the route matches ‘/’.
property tags
tags: {[key: string]: any};Key-value map of resource tags.
interface GetVpcLinkArgs
interface GetVpcLinkArgsA collection of arguments for invoking getVpcLink.
property name
name: string;The name of the API Gateway VPC Link to look up. If no API Gateway VPC Link is found with this name, an error will be returned. If multiple API Gateway VPC Links are found with this name, an error will be returned.
property tags
tags?: undefined | {[key: string]: any};Key-value map of resource tags
interface GetVpcLinkResult
interface GetVpcLinkResultA collection of values returned by getVpcLink.
property description
description: string;The description of the VPC link.
property id
id: string;Set to the ID of the found API Gateway VPC Link.
property name
name: string;property status
status: string;The status of the VPC link.
property statusMessage
statusMessage: string;The status message of the VPC link.
property tags
tags: {[key: string]: any};Key-value map of resource tags
property targetArns
targetArns: string[];The list of network load balancer arns in the VPC targeted by the VPC link. Currently AWS only supports 1 target.
interface IntegrationArgs
interface IntegrationArgsThe set of arguments for constructing a Integration resource.
property cacheKeyParameters
cacheKeyParameters?: pulumi.Input<pulumi.Input<string>[]>;A list of cache key parameters for the integration.
property cacheNamespace
cacheNamespace?: pulumi.Input<string>;The integration’s cache namespace.
property connectionId
connectionId?: pulumi.Input<string>;The id of the VpcLink used for the integration. Required if connectionType is VPC_LINK
property connectionType
connectionType?: pulumi.Input<string>;The integration input’s connectionType. Valid values are INTERNET (default for connections through the public routable internet), and VPC_LINK (for private connections between API Gateway and a network load balancer in a VPC).
property contentHandling
contentHandling?: pulumi.Input<string>;Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT. If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.
property credentials
credentials?: pulumi.Input<string>;The credentials required for the integration. For AWS integrations, 2 options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role’s ARN. To require that the caller’s identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*.
property httpMethod
httpMethod: pulumi.Input<string>;The HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY)
when calling the associated resource.
property integrationHttpMethod
integrationHttpMethod?: pulumi.Input<string>;The integration HTTP method
(GET, POST, PUT, DELETE, HEAD, OPTIONs, ANY, PATCH) specifying how API Gateway will interact with the back end.
Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY.
Not all methods are compatible with all AWS integrations.
e.g. Lambda function can only be invoked via POST.
property passthroughBehavior
passthroughBehavior?: pulumi.Input<string>;The integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if requestTemplates is used.
property requestParameters
requestParameters?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A map of request query string parameters and headers that should be passed to the backend responder.
For example: requestParameters = { "integration.request.header.X-Some-Other-Header" = "method.request.header.X-Some-Header" }
property requestTemplates
requestTemplates?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A map of the integration’s request templates.
property resourceId
resourceId: pulumi.Input<string>;The API resource ID.
property restApi
restApi: pulumi.Input<string | RestApi>;The ID of the associated REST API.
property timeoutMilliseconds
timeoutMilliseconds?: pulumi.Input<number>;Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds.
property type
type: pulumi.Input<string>;The integration input’s type. Valid values are HTTP (for HTTP backends), MOCK (not calling any real backend), AWS (for AWS services), AWS_PROXY (for Lambda proxy integration) and HTTP_PROXY (for HTTP proxy integration). An HTTP or HTTP_PROXY integration with a connectionType of VPC_LINK is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.
property uri
uri?: pulumi.Input<string>;The input’s URI. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY.
For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification . For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. region, subdomain and service are used to determine the right endpoint.
e.g. arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:012345678901:function:my-func/invocations. For private integrations, the URI parameter is not used for routing requests to your endpoint, but is used for setting the Host header and for certificate validation.
interface IntegrationResponseArgs
interface IntegrationResponseArgsThe set of arguments for constructing a IntegrationResponse resource.
property contentHandling
contentHandling?: pulumi.Input<string>;Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT. If this property is not defined, the response payload will be passed through from the integration response to the method response without modification.
property httpMethod
httpMethod: pulumi.Input<string>;The HTTP method (GET, POST, PUT, DELETE, HEAD, OPTIONS, ANY)
property resourceId
resourceId: pulumi.Input<string>;The API resource ID
property responseParameters
responseParameters?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A map of response parameters that can be read from the backend response.
For example: responseParameters = { "method.response.header.X-Some-Header" = "integration.response.header.X-Some-Other-Header" }
property responseTemplates
responseTemplates?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A map specifying the templates used to transform the integration response body
property restApi
restApi: pulumi.Input<string | RestApi>;The ID of the associated REST API
property selectionPattern
selectionPattern?: pulumi.Input<string>;Specifies the regular expression pattern used to choose
an integration response based on the response from the backend. Setting this to - makes the integration the default one.
If the backend is an AWS Lambda function, the AWS Lambda function error header is matched.
For all other HTTP and AWS backends, the HTTP status code is matched.
property statusCode
statusCode: pulumi.Input<string>;The HTTP status code
interface IntegrationResponseState
interface IntegrationResponseStateInput properties used for looking up and filtering IntegrationResponse resources.
property contentHandling
contentHandling?: pulumi.Input<string>;Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT. If this property is not defined, the response payload will be passed through from the integration response to the method response without modification.
property httpMethod
httpMethod?: pulumi.Input<string>;The HTTP method (GET, POST, PUT, DELETE, HEAD, OPTIONS, ANY)
property resourceId
resourceId?: pulumi.Input<string>;The API resource ID
property responseParameters
responseParameters?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A map of response parameters that can be read from the backend response.
For example: responseParameters = { "method.response.header.X-Some-Header" = "integration.response.header.X-Some-Other-Header" }
property responseTemplates
responseTemplates?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A map specifying the templates used to transform the integration response body
property restApi
restApi?: pulumi.Input<string | RestApi>;The ID of the associated REST API
property selectionPattern
selectionPattern?: pulumi.Input<string>;Specifies the regular expression pattern used to choose
an integration response based on the response from the backend. Setting this to - makes the integration the default one.
If the backend is an AWS Lambda function, the AWS Lambda function error header is matched.
For all other HTTP and AWS backends, the HTTP status code is matched.
property statusCode
statusCode?: pulumi.Input<string>;The HTTP status code
interface IntegrationState
interface IntegrationStateInput properties used for looking up and filtering Integration resources.
property cacheKeyParameters
cacheKeyParameters?: pulumi.Input<pulumi.Input<string>[]>;A list of cache key parameters for the integration.
property cacheNamespace
cacheNamespace?: pulumi.Input<string>;The integration’s cache namespace.
property connectionId
connectionId?: pulumi.Input<string>;The id of the VpcLink used for the integration. Required if connectionType is VPC_LINK
property connectionType
connectionType?: pulumi.Input<string>;The integration input’s connectionType. Valid values are INTERNET (default for connections through the public routable internet), and VPC_LINK (for private connections between API Gateway and a network load balancer in a VPC).
property contentHandling
contentHandling?: pulumi.Input<string>;Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT. If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.
property credentials
credentials?: pulumi.Input<string>;The credentials required for the integration. For AWS integrations, 2 options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role’s ARN. To require that the caller’s identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*.
property httpMethod
httpMethod?: pulumi.Input<string>;The HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY)
when calling the associated resource.
property integrationHttpMethod
integrationHttpMethod?: pulumi.Input<string>;The integration HTTP method
(GET, POST, PUT, DELETE, HEAD, OPTIONs, ANY, PATCH) specifying how API Gateway will interact with the back end.
Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY.
Not all methods are compatible with all AWS integrations.
e.g. Lambda function can only be invoked via POST.
property passthroughBehavior
passthroughBehavior?: pulumi.Input<string>;The integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if requestTemplates is used.
property requestParameters
requestParameters?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A map of request query string parameters and headers that should be passed to the backend responder.
For example: requestParameters = { "integration.request.header.X-Some-Other-Header" = "method.request.header.X-Some-Header" }
property requestTemplates
requestTemplates?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A map of the integration’s request templates.
property resourceId
resourceId?: pulumi.Input<string>;The API resource ID.
property restApi
restApi?: pulumi.Input<string | RestApi>;The ID of the associated REST API.
property timeoutMilliseconds
timeoutMilliseconds?: pulumi.Input<number>;Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds.
property type
type?: pulumi.Input<string>;The integration input’s type. Valid values are HTTP (for HTTP backends), MOCK (not calling any real backend), AWS (for AWS services), AWS_PROXY (for Lambda proxy integration) and HTTP_PROXY (for HTTP proxy integration). An HTTP or HTTP_PROXY integration with a connectionType of VPC_LINK is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.
property uri
uri?: pulumi.Input<string>;The input’s URI. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY.
For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification . For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. region, subdomain and service are used to determine the right endpoint.
e.g. arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:012345678901:function:my-func/invocations. For private integrations, the URI parameter is not used for routing requests to your endpoint, but is used for setting the Host header and for certificate validation.
interface MethodArgs
interface MethodArgsThe set of arguments for constructing a Method resource.
property apiKeyRequired
apiKeyRequired?: pulumi.Input<boolean>;Specify if the method requires an API key
property authorization
authorization: pulumi.Input<string>;The type of authorization used for the method (NONE, CUSTOM, AWS_IAM, COGNITO_USER_POOLS)
property authorizationScopes
authorizationScopes?: pulumi.Input<pulumi.Input<string>[]>;The authorization scopes used when the authorization is COGNITO_USER_POOLS
property authorizerId
authorizerId?: pulumi.Input<string>;The authorizer id to be used when the authorization is CUSTOM or COGNITO_USER_POOLS
property httpMethod
httpMethod: pulumi.Input<string>;The HTTP Method (GET, POST, PUT, DELETE, HEAD, OPTIONS, ANY)
property requestModels
requestModels?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A map of the API models used for the request’s content type
where key is the content type (e.g. application/json)
and value is either Error, Empty (built-in models) or aws.apigateway.Model’s name.
property requestParameters
requestParameters?: pulumi.Input<{[key: string]: pulumi.Input<boolean>}>;A map of request parameters (from the path, query string and headers) that should be passed to the integration. The boolean value indicates whether the parameter is required (true) or optional (false).
For example: requestParameters = {"method.request.header.X-Some-Header" = true "method.request.querystring.some-query-param" = true} would define that the header X-Some-Header and the query string some-query-param must be provided in the request.
property requestValidatorId
requestValidatorId?: pulumi.Input<string>;The ID of a aws.apigateway.RequestValidator
property resourceId
resourceId: pulumi.Input<string>;The API resource ID
property restApi
restApi: pulumi.Input<string | RestApi>;The ID of the associated REST API
interface MethodResponseArgs
interface MethodResponseArgsThe set of arguments for constructing a MethodResponse resource.
property httpMethod
httpMethod: pulumi.Input<string>;The HTTP Method (GET, POST, PUT, DELETE, HEAD, OPTIONS, ANY)
property resourceId
resourceId: pulumi.Input<string>;The API resource ID
property responseModels
responseModels?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A map of the API models used for the response’s content type
property responseParameters
responseParameters?: pulumi.Input<{[key: string]: pulumi.Input<boolean>}>;A map of response parameters that can be sent to the caller.
For example: responseParameters = { "method.response.header.X-Some-Header" = true }
would define that the header X-Some-Header can be provided on the response.
property restApi
restApi: pulumi.Input<string | RestApi>;The ID of the associated REST API
property statusCode
statusCode: pulumi.Input<string>;The HTTP status code
interface MethodResponseState
interface MethodResponseStateInput properties used for looking up and filtering MethodResponse resources.
property httpMethod
httpMethod?: pulumi.Input<string>;The HTTP Method (GET, POST, PUT, DELETE, HEAD, OPTIONS, ANY)
property resourceId
resourceId?: pulumi.Input<string>;The API resource ID
property responseModels
responseModels?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A map of the API models used for the response’s content type
property responseParameters
responseParameters?: pulumi.Input<{[key: string]: pulumi.Input<boolean>}>;A map of response parameters that can be sent to the caller.
For example: responseParameters = { "method.response.header.X-Some-Header" = true }
would define that the header X-Some-Header can be provided on the response.
property restApi
restApi?: pulumi.Input<string | RestApi>;The ID of the associated REST API
property statusCode
statusCode?: pulumi.Input<string>;The HTTP status code
interface MethodSettingsArgs
interface MethodSettingsArgsThe set of arguments for constructing a MethodSettings resource.
property methodPath
methodPath: pulumi.Input<string>;Method path defined as {resource_path}/{http_method} for an individual method override, or */* for overriding all methods in the stage.
property restApi
restApi: pulumi.Input<string | RestApi>;The ID of the REST API
property settings
settings: pulumi.Input<MethodSettingsSettings>;The settings block, see below.
property stageName
stageName: pulumi.Input<string>;The name of the stage
interface MethodSettingsState
interface MethodSettingsStateInput properties used for looking up and filtering MethodSettings resources.
property methodPath
methodPath?: pulumi.Input<string>;Method path defined as {resource_path}/{http_method} for an individual method override, or */* for overriding all methods in the stage.
property restApi
restApi?: pulumi.Input<string | RestApi>;The ID of the REST API
property settings
settings?: pulumi.Input<MethodSettingsSettings>;The settings block, see below.
property stageName
stageName?: pulumi.Input<string>;The name of the stage
interface MethodState
interface MethodStateInput properties used for looking up and filtering Method resources.
property apiKeyRequired
apiKeyRequired?: pulumi.Input<boolean>;Specify if the method requires an API key
property authorization
authorization?: pulumi.Input<string>;The type of authorization used for the method (NONE, CUSTOM, AWS_IAM, COGNITO_USER_POOLS)
property authorizationScopes
authorizationScopes?: pulumi.Input<pulumi.Input<string>[]>;The authorization scopes used when the authorization is COGNITO_USER_POOLS
property authorizerId
authorizerId?: pulumi.Input<string>;The authorizer id to be used when the authorization is CUSTOM or COGNITO_USER_POOLS
property httpMethod
httpMethod?: pulumi.Input<string>;The HTTP Method (GET, POST, PUT, DELETE, HEAD, OPTIONS, ANY)
property requestModels
requestModels?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A map of the API models used for the request’s content type
where key is the content type (e.g. application/json)
and value is either Error, Empty (built-in models) or aws.apigateway.Model’s name.
property requestParameters
requestParameters?: pulumi.Input<{[key: string]: pulumi.Input<boolean>}>;A map of request parameters (from the path, query string and headers) that should be passed to the integration. The boolean value indicates whether the parameter is required (true) or optional (false).
For example: requestParameters = {"method.request.header.X-Some-Header" = true "method.request.querystring.some-query-param" = true} would define that the header X-Some-Header and the query string some-query-param must be provided in the request.
property requestValidatorId
requestValidatorId?: pulumi.Input<string>;The ID of a aws.apigateway.RequestValidator
property resourceId
resourceId?: pulumi.Input<string>;The API resource ID
property restApi
restApi?: pulumi.Input<string | RestApi>;The ID of the associated REST API
interface ModelArgs
interface ModelArgsThe set of arguments for constructing a Model resource.
property contentType
contentType: pulumi.Input<string>;The content type of the model
property description
description?: pulumi.Input<string>;The description of the model
property name
name?: pulumi.Input<string>;The name of the model
property restApi
restApi: pulumi.Input<string | RestApi>;The ID of the associated REST API
property schema
schema?: pulumi.Input<string>;The schema of the model in a JSON form
interface ModelState
interface ModelStateInput properties used for looking up and filtering Model resources.
property contentType
contentType?: pulumi.Input<string>;The content type of the model
property description
description?: pulumi.Input<string>;The description of the model
property name
name?: pulumi.Input<string>;The name of the model
property restApi
restApi?: pulumi.Input<string | RestApi>;The ID of the associated REST API
property schema
schema?: pulumi.Input<string>;The schema of the model in a JSON form
interface RequestValidatorArgs
interface RequestValidatorArgsThe set of arguments for constructing a RequestValidator resource.
property name
name?: pulumi.Input<string>;The name of the request validator
property restApi
restApi: pulumi.Input<string | RestApi>;The ID of the associated Rest API
property validateRequestBody
validateRequestBody?: pulumi.Input<boolean>;Boolean whether to validate request body. Defaults to false.
property validateRequestParameters
validateRequestParameters?: pulumi.Input<boolean>;Boolean whether to validate request parameters. Defaults to false.
interface RequestValidatorState
interface RequestValidatorStateInput properties used for looking up and filtering RequestValidator resources.
property name
name?: pulumi.Input<string>;The name of the request validator
property restApi
restApi?: pulumi.Input<string | RestApi>;The ID of the associated Rest API
property validateRequestBody
validateRequestBody?: pulumi.Input<boolean>;Boolean whether to validate request body. Defaults to false.
property validateRequestParameters
validateRequestParameters?: pulumi.Input<boolean>;Boolean whether to validate request parameters. Defaults to false.
interface ResourceArgs
interface ResourceArgsThe set of arguments for constructing a Resource resource.
property parentId
parentId: pulumi.Input<string>;The ID of the parent API resource
property pathPart
pathPart: pulumi.Input<string>;The last path segment of this API resource.
property restApi
restApi: pulumi.Input<string | RestApi>;The ID of the associated REST API
interface ResourceState
interface ResourceStateInput properties used for looking up and filtering Resource resources.
property parentId
parentId?: pulumi.Input<string>;The ID of the parent API resource
property path
path?: pulumi.Input<string>;The complete path for this API resource, including all parent paths.
property pathPart
pathPart?: pulumi.Input<string>;The last path segment of this API resource.
property restApi
restApi?: pulumi.Input<string | RestApi>;The ID of the associated REST API
interface ResponseArgs
interface ResponseArgsThe set of arguments for constructing a Response resource.
property responseParameters
responseParameters?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A map specifying the parameters (paths, query strings and headers) of the Gateway Response.
property responseTemplates
responseTemplates?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A map specifying the templates used to transform the response body.
property responseType
responseType: pulumi.Input<string>;The response type of the associated GatewayResponse.
property restApiId
restApiId: pulumi.Input<string>;The string identifier of the associated REST API.
property statusCode
statusCode?: pulumi.Input<string>;The HTTP status code of the Gateway Response.
interface ResponseState
interface ResponseStateInput properties used for looking up and filtering Response resources.
property responseParameters
responseParameters?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A map specifying the parameters (paths, query strings and headers) of the Gateway Response.
property responseTemplates
responseTemplates?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A map specifying the templates used to transform the response body.
property responseType
responseType?: pulumi.Input<string>;The response type of the associated GatewayResponse.
property restApiId
restApiId?: pulumi.Input<string>;The string identifier of the associated REST API.
property statusCode
statusCode?: pulumi.Input<string>;The HTTP status code of the Gateway Response.
interface RestApiArgs
interface RestApiArgsThe set of arguments for constructing a RestApi resource.
property apiKeySource
apiKeySource?: pulumi.Input<string>;The source of the API key for requests. Valid values are HEADER (default) and AUTHORIZER.
property binaryMediaTypes
binaryMediaTypes?: pulumi.Input<pulumi.Input<string>[]>;The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.
property body
body?: pulumi.Input<string>;An OpenAPI specification that defines the set of routes and integrations to create as part of the REST API.
property description
description?: pulumi.Input<string>;The description of the REST API
property endpointConfiguration
endpointConfiguration?: pulumi.Input<RestApiEndpointConfiguration>;Nested argument defining API endpoint configuration including endpoint type. Defined below.
property minimumCompressionSize
minimumCompressionSize?: pulumi.Input<number>;Minimum response size to compress for the REST API. Integer between -1 and 10485760 (10MB). Setting a value greater than -1 will enable compression, -1 disables compression (default).
property name
name?: pulumi.Input<string>;The name of the REST API
property policy
policy?: pulumi.Input<string>;JSON formatted policy document that controls access to the API Gateway.
property tags
tags?: pulumi.Input<{[key: string]: any}>;Key-value map of resource tags
interface RestApiState
interface RestApiStateInput properties used for looking up and filtering RestApi resources.
property apiKeySource
apiKeySource?: pulumi.Input<string>;The source of the API key for requests. Valid values are HEADER (default) and AUTHORIZER.
property arn
arn?: pulumi.Input<string>;Amazon Resource Name (ARN)
property binaryMediaTypes
binaryMediaTypes?: pulumi.Input<pulumi.Input<string>[]>;The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.
property body
body?: pulumi.Input<string>;An OpenAPI specification that defines the set of routes and integrations to create as part of the REST API.
property createdDate
createdDate?: pulumi.Input<string>;The creation date of the REST API
property description
description?: pulumi.Input<string>;The description of the REST API
property endpointConfiguration
endpointConfiguration?: pulumi.Input<RestApiEndpointConfiguration>;Nested argument defining API endpoint configuration including endpoint type. Defined below.
property executionArn
executionArn?: pulumi.Input<string>;The execution ARN part to be used in lambdaPermission’s sourceArn
when allowing API Gateway to invoke a Lambda function,
e.g. arn:aws:execute-api:eu-west-2:123456789012:z4675bid1j, which can be concatenated with allowed stage, method and resource path.
property minimumCompressionSize
minimumCompressionSize?: pulumi.Input<number>;Minimum response size to compress for the REST API. Integer between -1 and 10485760 (10MB). Setting a value greater than -1 will enable compression, -1 disables compression (default).
property name
name?: pulumi.Input<string>;The name of the REST API
property policy
policy?: pulumi.Input<string>;JSON formatted policy document that controls access to the API Gateway.
property rootResourceId
rootResourceId?: pulumi.Input<string>;The resource ID of the REST API’s root
property tags
tags?: pulumi.Input<{[key: string]: any}>;Key-value map of resource tags
interface StageArgs
interface StageArgsThe set of arguments for constructing a Stage resource.
property accessLogSettings
accessLogSettings?: pulumi.Input<StageAccessLogSettings>;Enables access logs for the API stage. Detailed below.
property cacheClusterEnabled
cacheClusterEnabled?: pulumi.Input<boolean>;Specifies whether a cache cluster is enabled for the stage
property cacheClusterSize
cacheClusterSize?: pulumi.Input<string>;The size of the cache cluster for the stage, if enabled.
Allowed values include 0.5, 1.6, 6.1, 13.5, 28.4, 58.2, 118 and 237.
property clientCertificateId
clientCertificateId?: pulumi.Input<string>;The identifier of a client certificate for the stage.
property deployment
deployment: pulumi.Input<string | Deployment>;The ID of the deployment that the stage points to
property description
description?: pulumi.Input<string>;The description of the stage
property documentationVersion
documentationVersion?: pulumi.Input<string>;The version of the associated API documentation
property restApi
restApi: pulumi.Input<string | RestApi>;The ID of the associated REST API
property stageName
stageName: pulumi.Input<string>;The name of the stage
property tags
tags?: pulumi.Input<{[key: string]: any}>;A map of tags to assign to the resource.
property variables
variables?: pulumi.Input<{[key: string]: any}>;A map that defines the stage variables
property xrayTracingEnabled
xrayTracingEnabled?: pulumi.Input<boolean>;Whether active tracing with X-ray is enabled. Defaults to false.
interface StageState
interface StageStateInput properties used for looking up and filtering Stage resources.
property accessLogSettings
accessLogSettings?: pulumi.Input<StageAccessLogSettings>;Enables access logs for the API stage. Detailed below.
property arn
arn?: pulumi.Input<string>;Amazon Resource Name (ARN)
property cacheClusterEnabled
cacheClusterEnabled?: pulumi.Input<boolean>;Specifies whether a cache cluster is enabled for the stage
property cacheClusterSize
cacheClusterSize?: pulumi.Input<string>;The size of the cache cluster for the stage, if enabled.
Allowed values include 0.5, 1.6, 6.1, 13.5, 28.4, 58.2, 118 and 237.
property clientCertificateId
clientCertificateId?: pulumi.Input<string>;The identifier of a client certificate for the stage.
property deployment
deployment?: pulumi.Input<string | Deployment>;The ID of the deployment that the stage points to
property description
description?: pulumi.Input<string>;The description of the stage
property documentationVersion
documentationVersion?: pulumi.Input<string>;The version of the associated API documentation
property executionArn
executionArn?: pulumi.Input<string>;The execution ARN to be used in lambdaPermission’s sourceArn
when allowing API Gateway to invoke a Lambda function,
e.g. arn:aws:execute-api:eu-west-2:123456789012:z4675bid1j/prod
property invokeUrl
invokeUrl?: pulumi.Input<string>;The URL to invoke the API pointing to the stage,
e.g. https://z4675bid1j.execute-api.eu-west-2.amazonaws.com/prod
property restApi
restApi?: pulumi.Input<string | RestApi>;The ID of the associated REST API
property stageName
stageName?: pulumi.Input<string>;The name of the stage
property tags
tags?: pulumi.Input<{[key: string]: any}>;A map of tags to assign to the resource.
property variables
variables?: pulumi.Input<{[key: string]: any}>;A map that defines the stage variables
property xrayTracingEnabled
xrayTracingEnabled?: pulumi.Input<boolean>;Whether active tracing with X-ray is enabled. Defaults to false.
interface UsagePlanArgs
interface UsagePlanArgsThe set of arguments for constructing a UsagePlan resource.
property apiStages
apiStages?: pulumi.Input<pulumi.Input<UsagePlanApiStage>[]>;The associated API stages of the usage plan.
property description
description?: pulumi.Input<string>;The description of a usage plan.
property name
name?: pulumi.Input<string>;The name of the usage plan.
property productCode
productCode?: pulumi.Input<string>;The AWS Markeplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.
property quotaSettings
quotaSettings?: pulumi.Input<UsagePlanQuotaSettings>;The quota settings of the usage plan.
property tags
tags?: pulumi.Input<{[key: string]: any}>;Key-value map of resource tags
property throttleSettings
throttleSettings?: pulumi.Input<UsagePlanThrottleSettings>;The throttling limits of the usage plan.
interface UsagePlanKeyArgs
interface UsagePlanKeyArgsThe set of arguments for constructing a UsagePlanKey resource.
property keyId
keyId: pulumi.Input<string>;The identifier of the API key resource.
property keyType
keyType: pulumi.Input<string>;The type of the API key resource. Currently, the valid key type is API_KEY.
property usagePlanId
usagePlanId: pulumi.Input<string>;The Id of the usage plan resource representing to associate the key to.
interface UsagePlanKeyState
interface UsagePlanKeyStateInput properties used for looking up and filtering UsagePlanKey resources.
property keyId
keyId?: pulumi.Input<string>;The identifier of the API key resource.
property keyType
keyType?: pulumi.Input<string>;The type of the API key resource. Currently, the valid key type is API_KEY.
property name
name?: pulumi.Input<string>;The name of a usage plan key.
property usagePlanId
usagePlanId?: pulumi.Input<string>;The Id of the usage plan resource representing to associate the key to.
property value
value?: pulumi.Input<string>;The value of a usage plan key.
interface UsagePlanState
interface UsagePlanStateInput properties used for looking up and filtering UsagePlan resources.
property apiStages
apiStages?: pulumi.Input<pulumi.Input<UsagePlanApiStage>[]>;The associated API stages of the usage plan.
property arn
arn?: pulumi.Input<string>;Amazon Resource Name (ARN)
property description
description?: pulumi.Input<string>;The description of a usage plan.
property name
name?: pulumi.Input<string>;The name of the usage plan.
property productCode
productCode?: pulumi.Input<string>;The AWS Markeplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.
property quotaSettings
quotaSettings?: pulumi.Input<UsagePlanQuotaSettings>;The quota settings of the usage plan.
property tags
tags?: pulumi.Input<{[key: string]: any}>;Key-value map of resource tags
property throttleSettings
throttleSettings?: pulumi.Input<UsagePlanThrottleSettings>;The throttling limits of the usage plan.
interface VpcLinkArgs
interface VpcLinkArgsThe set of arguments for constructing a VpcLink resource.
property description
description?: pulumi.Input<string>;The description of the VPC link.
property name
name?: pulumi.Input<string>;The name used to label and identify the VPC link.
property tags
tags?: pulumi.Input<{[key: string]: any}>;Key-value map of resource tags
property targetArn
targetArn: pulumi.Input<string>;The list of network load balancer arns in the VPC targeted by the VPC link. Currently AWS only supports 1 target.
interface VpcLinkState
interface VpcLinkStateInput properties used for looking up and filtering VpcLink resources.
property arn
arn?: pulumi.Input<string>;property description
description?: pulumi.Input<string>;The description of the VPC link.
property name
name?: pulumi.Input<string>;The name used to label and identify the VPC link.
property tags
tags?: pulumi.Input<{[key: string]: any}>;Key-value map of resource tags
property targetArn
targetArn?: pulumi.Input<string>;The list of network load balancer arns in the VPC targeted by the VPC link. Currently AWS only supports 1 target.