ApiMapping
Manages an Amazon API Gateway Version 2 API mapping. More information can be found in the Amazon API Gateway Developer Guide.
Example Usage
Basic
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.ApiGatewayV2.ApiMapping("example", new Aws.ApiGatewayV2.ApiMappingArgs
{
ApiId = aws_apigatewayv2_api.Example.Id,
DomainName = aws_apigatewayv2_domain_name.Example.Id,
Stage = aws_apigatewayv2_stage.Example.Id,
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/apigatewayv2"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apigatewayv2.NewApiMapping(ctx, "example", &apigatewayv2.ApiMappingArgs{
ApiId: pulumi.String(aws_apigatewayv2_api.Example.Id),
DomainName: pulumi.String(aws_apigatewayv2_domain_name.Example.Id),
Stage: pulumi.String(aws_apigatewayv2_stage.Example.Id),
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
example = aws.apigatewayv2.ApiMapping("example",
api_id=aws_apigatewayv2_api["example"]["id"],
domain_name=aws_apigatewayv2_domain_name["example"]["id"],
stage=aws_apigatewayv2_stage["example"]["id"])import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.apigatewayv2.ApiMapping("example", {
apiId: aws_apigatewayv2_api_example.id,
domainName: aws_apigatewayv2_domain_name_example.id,
stage: aws_apigatewayv2_stage_example.id,
});Create a ApiMapping Resource
new ApiMapping(name: string, args: ApiMappingArgs, opts?: CustomResourceOptions);def ApiMapping(resource_name, opts=None, api_id=None, api_mapping_key=None, domain_name=None, stage=None, __props__=None);func NewApiMapping(ctx *Context, name string, args ApiMappingArgs, opts ...ResourceOption) (*ApiMapping, error)public ApiMapping(string name, ApiMappingArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args ApiMappingArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ApiMappingArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApiMappingArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
ApiMapping Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The ApiMapping resource accepts the following input properties:
- Api
Id string The API identifier.
- Domain
Name string The domain name. Use the
aws.apigatewayv2.DomainNameresource to configure a domain name.- Stage string
The API stage. Use the
aws.apigatewayv2.Stageresource to configure an API stage.- Api
Mapping stringKey The API mapping key.
- Api
Id string The API identifier.
- Domain
Name string The domain name. Use the
aws.apigatewayv2.DomainNameresource to configure a domain name.- Stage string
The API stage. Use the
aws.apigatewayv2.Stageresource to configure an API stage.- Api
Mapping stringKey The API mapping key.
- api
Id string The API identifier.
- domain
Name string The domain name. Use the
aws.apigatewayv2.DomainNameresource to configure a domain name.- stage string
The API stage. Use the
aws.apigatewayv2.Stageresource to configure an API stage.- api
Mapping stringKey The API mapping key.
- api_
id str The API identifier.
- domain_
name str The domain name. Use the
aws.apigatewayv2.DomainNameresource to configure a domain name.- stage str
The API stage. Use the
aws.apigatewayv2.Stageresource to configure an API stage.- api_
mapping_ strkey The API mapping key.
Outputs
All input properties are implicitly available as output properties. Additionally, the ApiMapping resource produces the following output properties:
Look up an Existing ApiMapping Resource
Get an existing ApiMapping resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ApiMappingState, opts?: CustomResourceOptions): ApiMappingstatic get(resource_name, id, opts=None, api_id=None, api_mapping_key=None, domain_name=None, stage=None, __props__=None);func GetApiMapping(ctx *Context, name string, id IDInput, state *ApiMappingState, opts ...ResourceOption) (*ApiMapping, error)public static ApiMapping Get(string name, Input<string> id, ApiMappingState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Api
Id string The API identifier.
- Api
Mapping stringKey The API mapping key.
- Domain
Name string The domain name. Use the
aws.apigatewayv2.DomainNameresource to configure a domain name.- Stage string
The API stage. Use the
aws.apigatewayv2.Stageresource to configure an API stage.
- Api
Id string The API identifier.
- Api
Mapping stringKey The API mapping key.
- Domain
Name string The domain name. Use the
aws.apigatewayv2.DomainNameresource to configure a domain name.- Stage string
The API stage. Use the
aws.apigatewayv2.Stageresource to configure an API stage.
- api
Id string The API identifier.
- api
Mapping stringKey The API mapping key.
- domain
Name string The domain name. Use the
aws.apigatewayv2.DomainNameresource to configure a domain name.- stage string
The API stage. Use the
aws.apigatewayv2.Stageresource to configure an API stage.
- api_
id str The API identifier.
- api_
mapping_ strkey The API mapping key.
- domain_
name str The domain name. Use the
aws.apigatewayv2.DomainNameresource to configure a domain name.- stage str
The API stage. Use the
aws.apigatewayv2.Stageresource to configure an API stage.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.