1. Packages
  2. AWS
  3. API Docs
  4. appsync
  5. DomainName
AWS v6.75.0 published on Wednesday, Apr 2, 2025 by Pulumi

aws.appsync.DomainName

Explore with Pulumi AI

Provides an AppSync Domain Name.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.appsync.DomainName("example", {
    domainName: "api.example.com",
    certificateArn: exampleAwsAcmCertificate.arn,
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.appsync.DomainName("example",
    domain_name="api.example.com",
    certificate_arn=example_aws_acm_certificate["arn"])
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appsync"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := appsync.NewDomainName(ctx, "example", &appsync.DomainNameArgs{
			DomainName:     pulumi.String("api.example.com"),
			CertificateArn: pulumi.Any(exampleAwsAcmCertificate.Arn),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.AppSync.DomainName("example", new()
    {
        Name = "api.example.com",
        CertificateArn = exampleAwsAcmCertificate.Arn,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.appsync.DomainName;
import com.pulumi.aws.appsync.DomainNameArgs;
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 DomainName("example", DomainNameArgs.builder()
            .domainName("api.example.com")
            .certificateArn(exampleAwsAcmCertificate.arn())
            .build());

    }
}
Copy
resources:
  example:
    type: aws:appsync:DomainName
    properties:
      domainName: api.example.com
      certificateArn: ${exampleAwsAcmCertificate.arn}
Copy

Create DomainName Resource

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

Constructor syntax

new DomainName(name: string, args: DomainNameArgs, opts?: CustomResourceOptions);
@overload
def DomainName(resource_name: str,
               args: DomainNameArgs,
               opts: Optional[ResourceOptions] = None)

@overload
def DomainName(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               certificate_arn: Optional[str] = None,
               domain_name: Optional[str] = None,
               description: Optional[str] = None)
func NewDomainName(ctx *Context, name string, args DomainNameArgs, opts ...ResourceOption) (*DomainName, error)
public DomainName(string name, DomainNameArgs args, CustomResourceOptions? opts = null)
public DomainName(String name, DomainNameArgs args)
public DomainName(String name, DomainNameArgs args, CustomResourceOptions options)
type: aws:appsync:DomainName
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. DomainNameArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. DomainNameArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. DomainNameArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. DomainNameArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. DomainNameArgs
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 exampledomainNameResourceResourceFromAppsyncdomainName = new Aws.AppSync.DomainName("exampledomainNameResourceResourceFromAppsyncdomainName", new()
{
    CertificateArn = "string",
    Name = "string",
    Description = "string",
});
Copy
example, err := appsync.NewDomainName(ctx, "exampledomainNameResourceResourceFromAppsyncdomainName", &appsync.DomainNameArgs{
	CertificateArn: pulumi.String("string"),
	DomainName:     pulumi.String("string"),
	Description:    pulumi.String("string"),
})
Copy
var exampledomainNameResourceResourceFromAppsyncdomainName = new DomainName("exampledomainNameResourceResourceFromAppsyncdomainName", DomainNameArgs.builder()
    .certificateArn("string")
    .domainName("string")
    .description("string")
    .build());
Copy
exampledomain_name_resource_resource_from_appsyncdomain_name = aws.appsync.DomainName("exampledomainNameResourceResourceFromAppsyncdomainName",
    certificate_arn="string",
    domain_name="string",
    description="string")
Copy
const exampledomainNameResourceResourceFromAppsyncdomainName = new aws.appsync.DomainName("exampledomainNameResourceResourceFromAppsyncdomainName", {
    certificateArn: "string",
    domainName: "string",
    description: "string",
});
Copy
type: aws:appsync:DomainName
properties:
    certificateArn: string
    description: string
    domainName: string
Copy

DomainName 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 DomainName resource accepts the following input properties:

CertificateArn
This property is required.
Changes to this property will trigger replacement.
string
ARN of the certificate. This can be an Certificate Manager (ACM) certificate or an Identity and Access Management (IAM) server certificate. The certifiacte must reside in us-east-1.
Name
This property is required.
Changes to this property will trigger replacement.
string
Domain name.
Description string
A description of the Domain Name.
CertificateArn
This property is required.
Changes to this property will trigger replacement.
string
ARN of the certificate. This can be an Certificate Manager (ACM) certificate or an Identity and Access Management (IAM) server certificate. The certifiacte must reside in us-east-1.
DomainName
This property is required.
Changes to this property will trigger replacement.
string
Domain name.
Description string
A description of the Domain Name.
certificateArn
This property is required.
Changes to this property will trigger replacement.
String
ARN of the certificate. This can be an Certificate Manager (ACM) certificate or an Identity and Access Management (IAM) server certificate. The certifiacte must reside in us-east-1.
domainName
This property is required.
Changes to this property will trigger replacement.
String
Domain name.
description String
A description of the Domain Name.
certificateArn
This property is required.
Changes to this property will trigger replacement.
string
ARN of the certificate. This can be an Certificate Manager (ACM) certificate or an Identity and Access Management (IAM) server certificate. The certifiacte must reside in us-east-1.
domainName
This property is required.
Changes to this property will trigger replacement.
string
Domain name.
description string
A description of the Domain Name.
certificate_arn
This property is required.
Changes to this property will trigger replacement.
str
ARN of the certificate. This can be an Certificate Manager (ACM) certificate or an Identity and Access Management (IAM) server certificate. The certifiacte must reside in us-east-1.
domain_name
This property is required.
Changes to this property will trigger replacement.
str
Domain name.
description str
A description of the Domain Name.
certificateArn
This property is required.
Changes to this property will trigger replacement.
String
ARN of the certificate. This can be an Certificate Manager (ACM) certificate or an Identity and Access Management (IAM) server certificate. The certifiacte must reside in us-east-1.
domainName
This property is required.
Changes to this property will trigger replacement.
String
Domain name.
description String
A description of the Domain Name.

Outputs

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

AppsyncDomainName string
Domain name that AppSync provides.
HostedZoneId string
ID of your Amazon Route 53 hosted zone.
Id string
The provider-assigned unique ID for this managed resource.
AppsyncDomainName string
Domain name that AppSync provides.
HostedZoneId string
ID of your Amazon Route 53 hosted zone.
Id string
The provider-assigned unique ID for this managed resource.
appsyncDomainName String
Domain name that AppSync provides.
hostedZoneId String
ID of your Amazon Route 53 hosted zone.
id String
The provider-assigned unique ID for this managed resource.
appsyncDomainName string
Domain name that AppSync provides.
hostedZoneId string
ID of your Amazon Route 53 hosted zone.
id string
The provider-assigned unique ID for this managed resource.
appsync_domain_name str
Domain name that AppSync provides.
hosted_zone_id str
ID of your Amazon Route 53 hosted zone.
id str
The provider-assigned unique ID for this managed resource.
appsyncDomainName String
Domain name that AppSync provides.
hostedZoneId String
ID of your Amazon Route 53 hosted zone.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing DomainName Resource

Get an existing DomainName 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?: DomainNameState, opts?: CustomResourceOptions): DomainName
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        appsync_domain_name: Optional[str] = None,
        certificate_arn: Optional[str] = None,
        description: Optional[str] = None,
        domain_name: Optional[str] = None,
        hosted_zone_id: Optional[str] = None) -> DomainName
func GetDomainName(ctx *Context, name string, id IDInput, state *DomainNameState, opts ...ResourceOption) (*DomainName, error)
public static DomainName Get(string name, Input<string> id, DomainNameState? state, CustomResourceOptions? opts = null)
public static DomainName get(String name, Output<String> id, DomainNameState state, CustomResourceOptions options)
resources:  _:    type: aws:appsync:DomainName    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AppsyncDomainName string
Domain name that AppSync provides.
CertificateArn Changes to this property will trigger replacement. string
ARN of the certificate. This can be an Certificate Manager (ACM) certificate or an Identity and Access Management (IAM) server certificate. The certifiacte must reside in us-east-1.
Description string
A description of the Domain Name.
HostedZoneId string
ID of your Amazon Route 53 hosted zone.
Name Changes to this property will trigger replacement. string
Domain name.
AppsyncDomainName string
Domain name that AppSync provides.
CertificateArn Changes to this property will trigger replacement. string
ARN of the certificate. This can be an Certificate Manager (ACM) certificate or an Identity and Access Management (IAM) server certificate. The certifiacte must reside in us-east-1.
Description string
A description of the Domain Name.
DomainName Changes to this property will trigger replacement. string
Domain name.
HostedZoneId string
ID of your Amazon Route 53 hosted zone.
appsyncDomainName String
Domain name that AppSync provides.
certificateArn Changes to this property will trigger replacement. String
ARN of the certificate. This can be an Certificate Manager (ACM) certificate or an Identity and Access Management (IAM) server certificate. The certifiacte must reside in us-east-1.
description String
A description of the Domain Name.
domainName Changes to this property will trigger replacement. String
Domain name.
hostedZoneId String
ID of your Amazon Route 53 hosted zone.
appsyncDomainName string
Domain name that AppSync provides.
certificateArn Changes to this property will trigger replacement. string
ARN of the certificate. This can be an Certificate Manager (ACM) certificate or an Identity and Access Management (IAM) server certificate. The certifiacte must reside in us-east-1.
description string
A description of the Domain Name.
domainName Changes to this property will trigger replacement. string
Domain name.
hostedZoneId string
ID of your Amazon Route 53 hosted zone.
appsync_domain_name str
Domain name that AppSync provides.
certificate_arn Changes to this property will trigger replacement. str
ARN of the certificate. This can be an Certificate Manager (ACM) certificate or an Identity and Access Management (IAM) server certificate. The certifiacte must reside in us-east-1.
description str
A description of the Domain Name.
domain_name Changes to this property will trigger replacement. str
Domain name.
hosted_zone_id str
ID of your Amazon Route 53 hosted zone.
appsyncDomainName String
Domain name that AppSync provides.
certificateArn Changes to this property will trigger replacement. String
ARN of the certificate. This can be an Certificate Manager (ACM) certificate or an Identity and Access Management (IAM) server certificate. The certifiacte must reside in us-east-1.
description String
A description of the Domain Name.
domainName Changes to this property will trigger replacement. String
Domain name.
hostedZoneId String
ID of your Amazon Route 53 hosted zone.

Import

Using pulumi import, import aws_appsync_domain_name using the AppSync domain name. For example:

$ pulumi import aws:appsync/domainName:DomainName example example.com
Copy

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.