1. Packages
  2. AWS
  3. API Docs
  4. apigateway
  5. DomainNameAccessAssociation
AWS v6.66.3 published on Monday, Jan 13, 2025 by Pulumi

aws.apigateway.DomainNameAccessAssociation

Explore with Pulumi AI

aws logo
AWS v6.66.3 published on Monday, Jan 13, 2025 by Pulumi

    Creates a domain name access association resource between an access association source and a private custom domain name.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.apigateway.DomainNameAccessAssociation("example", {
        accessAssociationSource: exampleAwsVpcEndpoint.id,
        accessAssociationSourceType: "VPCE",
        domainNameArn: exampleAwsApiGatewayDomainName.domainNameArn,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.apigateway.DomainNameAccessAssociation("example",
        access_association_source=example_aws_vpc_endpoint["id"],
        access_association_source_type="VPCE",
        domain_name_arn=example_aws_api_gateway_domain_name["domainNameArn"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigateway"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := apigateway.NewDomainNameAccessAssociation(ctx, "example", &apigateway.DomainNameAccessAssociationArgs{
    			AccessAssociationSource:     pulumi.Any(exampleAwsVpcEndpoint.Id),
    			AccessAssociationSourceType: pulumi.String("VPCE"),
    			DomainNameArn:               pulumi.Any(exampleAwsApiGatewayDomainName.DomainNameArn),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.ApiGateway.DomainNameAccessAssociation("example", new()
        {
            AccessAssociationSource = exampleAwsVpcEndpoint.Id,
            AccessAssociationSourceType = "VPCE",
            DomainNameArn = exampleAwsApiGatewayDomainName.DomainNameArn,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.apigateway.DomainNameAccessAssociation;
    import com.pulumi.aws.apigateway.DomainNameAccessAssociationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new DomainNameAccessAssociation("example", DomainNameAccessAssociationArgs.builder()
                .accessAssociationSource(exampleAwsVpcEndpoint.id())
                .accessAssociationSourceType("VPCE")
                .domainNameArn(exampleAwsApiGatewayDomainName.domainNameArn())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:apigateway:DomainNameAccessAssociation
        properties:
          accessAssociationSource: ${exampleAwsVpcEndpoint.id}
          accessAssociationSourceType: VPCE
          domainNameArn: ${exampleAwsApiGatewayDomainName.domainNameArn}
    

    Create DomainNameAccessAssociation Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DomainNameAccessAssociation(name: string, args: DomainNameAccessAssociationArgs, opts?: CustomResourceOptions);
    @overload
    def DomainNameAccessAssociation(resource_name: str,
                                    args: DomainNameAccessAssociationArgs,
                                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def DomainNameAccessAssociation(resource_name: str,
                                    opts: Optional[ResourceOptions] = None,
                                    access_association_source: Optional[str] = None,
                                    access_association_source_type: Optional[str] = None,
                                    domain_name_arn: Optional[str] = None,
                                    tags: Optional[Mapping[str, str]] = None)
    func NewDomainNameAccessAssociation(ctx *Context, name string, args DomainNameAccessAssociationArgs, opts ...ResourceOption) (*DomainNameAccessAssociation, error)
    public DomainNameAccessAssociation(string name, DomainNameAccessAssociationArgs args, CustomResourceOptions? opts = null)
    public DomainNameAccessAssociation(String name, DomainNameAccessAssociationArgs args)
    public DomainNameAccessAssociation(String name, DomainNameAccessAssociationArgs args, CustomResourceOptions options)
    
    type: aws:apigateway:DomainNameAccessAssociation
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

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

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var domainNameAccessAssociationResource = new Aws.ApiGateway.DomainNameAccessAssociation("domainNameAccessAssociationResource", new()
    {
        AccessAssociationSource = "string",
        AccessAssociationSourceType = "string",
        DomainNameArn = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := apigateway.NewDomainNameAccessAssociation(ctx, "domainNameAccessAssociationResource", &apigateway.DomainNameAccessAssociationArgs{
    	AccessAssociationSource:     pulumi.String("string"),
    	AccessAssociationSourceType: pulumi.String("string"),
    	DomainNameArn:               pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var domainNameAccessAssociationResource = new DomainNameAccessAssociation("domainNameAccessAssociationResource", DomainNameAccessAssociationArgs.builder()
        .accessAssociationSource("string")
        .accessAssociationSourceType("string")
        .domainNameArn("string")
        .tags(Map.of("string", "string"))
        .build());
    
    domain_name_access_association_resource = aws.apigateway.DomainNameAccessAssociation("domainNameAccessAssociationResource",
        access_association_source="string",
        access_association_source_type="string",
        domain_name_arn="string",
        tags={
            "string": "string",
        })
    
    const domainNameAccessAssociationResource = new aws.apigateway.DomainNameAccessAssociation("domainNameAccessAssociationResource", {
        accessAssociationSource: "string",
        accessAssociationSourceType: "string",
        domainNameArn: "string",
        tags: {
            string: "string",
        },
    });
    
    type: aws:apigateway:DomainNameAccessAssociation
    properties:
        accessAssociationSource: string
        accessAssociationSourceType: string
        domainNameArn: string
        tags:
            string: string
    

    DomainNameAccessAssociation Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The DomainNameAccessAssociation resource accepts the following input properties:

    AccessAssociationSource string
    The identifier of the domain name access association source. For a VPCE, the value is the VPC endpoint ID.
    AccessAssociationSourceType string
    The type of the domain name access association source. Valid values are VPCE.
    DomainNameArn string
    The ARN of the domain name.
    Tags Dictionary<string, string>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    AccessAssociationSource string
    The identifier of the domain name access association source. For a VPCE, the value is the VPC endpoint ID.
    AccessAssociationSourceType string
    The type of the domain name access association source. Valid values are VPCE.
    DomainNameArn string
    The ARN of the domain name.
    Tags map[string]string
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    accessAssociationSource String
    The identifier of the domain name access association source. For a VPCE, the value is the VPC endpoint ID.
    accessAssociationSourceType String
    The type of the domain name access association source. Valid values are VPCE.
    domainNameArn String
    The ARN of the domain name.
    tags Map<String,String>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    accessAssociationSource string
    The identifier of the domain name access association source. For a VPCE, the value is the VPC endpoint ID.
    accessAssociationSourceType string
    The type of the domain name access association source. Valid values are VPCE.
    domainNameArn string
    The ARN of the domain name.
    tags {[key: string]: string}
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    access_association_source str
    The identifier of the domain name access association source. For a VPCE, the value is the VPC endpoint ID.
    access_association_source_type str
    The type of the domain name access association source. Valid values are VPCE.
    domain_name_arn str
    The ARN of the domain name.
    tags Mapping[str, str]
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    accessAssociationSource String
    The identifier of the domain name access association source. For a VPCE, the value is the VPC endpoint ID.
    accessAssociationSourceType String
    The type of the domain name access association source. Valid values are VPCE.
    domainNameArn String
    The ARN of the domain name.
    tags Map<String>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

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

    Arn string
    ARN of the domain name access association.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll Dictionary<string, string>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    ARN of the domain name access association.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll map[string]string
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    ARN of the domain name access association.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String,String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    ARN of the domain name access association.
    id string
    The provider-assigned unique ID for this managed resource.
    tagsAll {[key: string]: string}
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    ARN of the domain name access association.
    id str
    The provider-assigned unique ID for this managed resource.
    tags_all Mapping[str, str]
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    ARN of the domain name access association.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Look up Existing DomainNameAccessAssociation Resource

    Get an existing DomainNameAccessAssociation 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?: DomainNameAccessAssociationState, opts?: CustomResourceOptions): DomainNameAccessAssociation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            access_association_source: Optional[str] = None,
            access_association_source_type: Optional[str] = None,
            arn: Optional[str] = None,
            domain_name_arn: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None) -> DomainNameAccessAssociation
    func GetDomainNameAccessAssociation(ctx *Context, name string, id IDInput, state *DomainNameAccessAssociationState, opts ...ResourceOption) (*DomainNameAccessAssociation, error)
    public static DomainNameAccessAssociation Get(string name, Input<string> id, DomainNameAccessAssociationState? state, CustomResourceOptions? opts = null)
    public static DomainNameAccessAssociation get(String name, Output<String> id, DomainNameAccessAssociationState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    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:
    AccessAssociationSource string
    The identifier of the domain name access association source. For a VPCE, the value is the VPC endpoint ID.
    AccessAssociationSourceType string
    The type of the domain name access association source. Valid values are VPCE.
    Arn string
    ARN of the domain name access association.
    DomainNameArn string
    The ARN of the domain name.
    Tags Dictionary<string, string>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    AccessAssociationSource string
    The identifier of the domain name access association source. For a VPCE, the value is the VPC endpoint ID.
    AccessAssociationSourceType string
    The type of the domain name access association source. Valid values are VPCE.
    Arn string
    ARN of the domain name access association.
    DomainNameArn string
    The ARN of the domain name.
    Tags map[string]string
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    accessAssociationSource String
    The identifier of the domain name access association source. For a VPCE, the value is the VPC endpoint ID.
    accessAssociationSourceType String
    The type of the domain name access association source. Valid values are VPCE.
    arn String
    ARN of the domain name access association.
    domainNameArn String
    The ARN of the domain name.
    tags Map<String,String>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    accessAssociationSource string
    The identifier of the domain name access association source. For a VPCE, the value is the VPC endpoint ID.
    accessAssociationSourceType string
    The type of the domain name access association source. Valid values are VPCE.
    arn string
    ARN of the domain name access association.
    domainNameArn string
    The ARN of the domain name.
    tags {[key: string]: string}
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    access_association_source str
    The identifier of the domain name access association source. For a VPCE, the value is the VPC endpoint ID.
    access_association_source_type str
    The type of the domain name access association source. Valid values are VPCE.
    arn str
    ARN of the domain name access association.
    domain_name_arn str
    The ARN of the domain name.
    tags Mapping[str, str]
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    accessAssociationSource String
    The identifier of the domain name access association source. For a VPCE, the value is the VPC endpoint ID.
    accessAssociationSourceType String
    The type of the domain name access association source. Valid values are VPCE.
    arn String
    ARN of the domain name access association.
    domainNameArn String
    The ARN of the domain name.
    tags Map<String>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Import

    Using pulumi import, import API Gateway domain name acces associations as using their arn. For example:

    $ pulumi import aws:apigateway/domainNameAccessAssociation:DomainNameAccessAssociation example arn:aws:apigateway:us-west-2:123456789012:/domainnameaccessassociations/domainname/12qmzgp2.9m7ilski.test+hykg7a12e7/vpcesource/vpce-05de3f8f82740a748
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.66.3 published on Monday, Jan 13, 2025 by Pulumi