1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ga
  5. Domain
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.ga.Domain

Explore with Pulumi AI

Provides a Ga Domain resource.

For information about Ga Domain and how to use it, see What is Domain.

NOTE: Available since v1.197.0.

Example Usage

Basic Usage

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

const _default = new alicloud.ga.Accelerator("default", {
    duration: 1,
    autoUseCoupon: true,
    spec: "1",
});
const defaultDomain = new alicloud.ga.Domain("default", {
    domain: "changes.com.cn",
    acceleratorId: _default.id,
});
Copy
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.ga.Accelerator("default",
    duration=1,
    auto_use_coupon=True,
    spec="1")
default_domain = alicloud.ga.Domain("default",
    domain="changes.com.cn",
    accelerator_id=default.id)
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ga"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := ga.NewAccelerator(ctx, "default", &ga.AcceleratorArgs{
			Duration:      pulumi.Int(1),
			AutoUseCoupon: pulumi.Bool(true),
			Spec:          pulumi.String("1"),
		})
		if err != nil {
			return err
		}
		_, err = ga.NewDomain(ctx, "default", &ga.DomainArgs{
			Domain:        pulumi.String("changes.com.cn"),
			AcceleratorId: _default.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var @default = new AliCloud.Ga.Accelerator("default", new()
    {
        Duration = 1,
        AutoUseCoupon = true,
        Spec = "1",
    });

    var defaultDomain = new AliCloud.Ga.Domain("default", new()
    {
        AcceleratedDomain = "changes.com.cn",
        AcceleratorId = @default.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ga.Accelerator;
import com.pulumi.alicloud.ga.AcceleratorArgs;
import com.pulumi.alicloud.ga.Domain;
import com.pulumi.alicloud.ga.DomainArgs;
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 default_ = new Accelerator("default", AcceleratorArgs.builder()
            .duration(1)
            .autoUseCoupon(true)
            .spec("1")
            .build());

        var defaultDomain = new Domain("defaultDomain", DomainArgs.builder()
            .domain("changes.com.cn")
            .acceleratorId(default_.id())
            .build());

    }
}
Copy
resources:
  default:
    type: alicloud:ga:Accelerator
    properties:
      duration: 1
      autoUseCoupon: true
      spec: '1'
  defaultDomain:
    type: alicloud:ga:Domain
    name: default
    properties:
      domain: changes.com.cn
      acceleratorId: ${default.id}
Copy

Create Domain Resource

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

Constructor syntax

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

@overload
def Domain(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           accelerator_id: Optional[str] = None,
           domain: Optional[str] = None)
func NewDomain(ctx *Context, name string, args DomainArgs, opts ...ResourceOption) (*Domain, error)
public Domain(string name, DomainArgs args, CustomResourceOptions? opts = null)
public Domain(String name, DomainArgs args)
public Domain(String name, DomainArgs args, CustomResourceOptions options)
type: alicloud:ga:Domain
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. DomainArgs
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. DomainArgs
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. DomainArgs
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. DomainArgs
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. DomainArgs
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 exampledomainResourceResourceFromGadomain = new AliCloud.Ga.Domain("exampledomainResourceResourceFromGadomain", new()
{
    AcceleratorId = "string",
    AcceleratedDomain = "string",
});
Copy
example, err := ga.NewDomain(ctx, "exampledomainResourceResourceFromGadomain", &ga.DomainArgs{
	AcceleratorId: pulumi.String("string"),
	Domain:        pulumi.String("string"),
})
Copy
var exampledomainResourceResourceFromGadomain = new Domain("exampledomainResourceResourceFromGadomain", DomainArgs.builder()
    .acceleratorId("string")
    .domain("string")
    .build());
Copy
exampledomain_resource_resource_from_gadomain = alicloud.ga.Domain("exampledomainResourceResourceFromGadomain",
    accelerator_id="string",
    domain="string")
Copy
const exampledomainResourceResourceFromGadomain = new alicloud.ga.Domain("exampledomainResourceResourceFromGadomain", {
    acceleratorId: "string",
    domain: "string",
});
Copy
type: alicloud:ga:Domain
properties:
    acceleratorId: string
    domain: string
Copy

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

AcceleratedDomain
This property is required.
Changes to this property will trigger replacement.
string
The accelerated domain name to be added. only top-level domain names are supported, such as 'example.com'.
AcceleratorId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the global acceleration instance.
AcceleratorId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the global acceleration instance.
Domain
This property is required.
Changes to this property will trigger replacement.
string
The accelerated domain name to be added. only top-level domain names are supported, such as 'example.com'.
acceleratorId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the global acceleration instance.
domain
This property is required.
Changes to this property will trigger replacement.
String
The accelerated domain name to be added. only top-level domain names are supported, such as 'example.com'.
acceleratorId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the global acceleration instance.
domain
This property is required.
Changes to this property will trigger replacement.
string
The accelerated domain name to be added. only top-level domain names are supported, such as 'example.com'.
accelerator_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the global acceleration instance.
domain
This property is required.
Changes to this property will trigger replacement.
str
The accelerated domain name to be added. only top-level domain names are supported, such as 'example.com'.
acceleratorId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the global acceleration instance.
domain
This property is required.
Changes to this property will trigger replacement.
String
The accelerated domain name to be added. only top-level domain names are supported, such as 'example.com'.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Status string
The status of the resource
Id string
The provider-assigned unique ID for this managed resource.
Status string
The status of the resource
id String
The provider-assigned unique ID for this managed resource.
status String
The status of the resource
id string
The provider-assigned unique ID for this managed resource.
status string
The status of the resource
id str
The provider-assigned unique ID for this managed resource.
status str
The status of the resource
id String
The provider-assigned unique ID for this managed resource.
status String
The status of the resource

Look up Existing Domain Resource

Get an existing Domain 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?: DomainState, opts?: CustomResourceOptions): Domain
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        accelerator_id: Optional[str] = None,
        domain: Optional[str] = None,
        status: Optional[str] = None) -> Domain
func GetDomain(ctx *Context, name string, id IDInput, state *DomainState, opts ...ResourceOption) (*Domain, error)
public static Domain Get(string name, Input<string> id, DomainState? state, CustomResourceOptions? opts = null)
public static Domain get(String name, Output<String> id, DomainState state, CustomResourceOptions options)
resources:  _:    type: alicloud:ga:Domain    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:
AcceleratedDomain Changes to this property will trigger replacement. string
The accelerated domain name to be added. only top-level domain names are supported, such as 'example.com'.
AcceleratorId Changes to this property will trigger replacement. string
The ID of the global acceleration instance.
Status string
The status of the resource
AcceleratorId Changes to this property will trigger replacement. string
The ID of the global acceleration instance.
Domain Changes to this property will trigger replacement. string
The accelerated domain name to be added. only top-level domain names are supported, such as 'example.com'.
Status string
The status of the resource
acceleratorId Changes to this property will trigger replacement. String
The ID of the global acceleration instance.
domain Changes to this property will trigger replacement. String
The accelerated domain name to be added. only top-level domain names are supported, such as 'example.com'.
status String
The status of the resource
acceleratorId Changes to this property will trigger replacement. string
The ID of the global acceleration instance.
domain Changes to this property will trigger replacement. string
The accelerated domain name to be added. only top-level domain names are supported, such as 'example.com'.
status string
The status of the resource
accelerator_id Changes to this property will trigger replacement. str
The ID of the global acceleration instance.
domain Changes to this property will trigger replacement. str
The accelerated domain name to be added. only top-level domain names are supported, such as 'example.com'.
status str
The status of the resource
acceleratorId Changes to this property will trigger replacement. String
The ID of the global acceleration instance.
domain Changes to this property will trigger replacement. String
The accelerated domain name to be added. only top-level domain names are supported, such as 'example.com'.
status String
The status of the resource

Import

Ga Domain can be imported using the id, e.g.

$ pulumi import alicloud:ga/domain:Domain example <accelerator_id>:<domain>
Copy

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

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.