1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ga
  5. Domain
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.ga.Domain

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    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,
    });
    
    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)
    
    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 {
    		_, 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
    	})
    }
    
    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,
        });
    
    });
    
    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());
    
        }
    }
    
    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}
    

    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 string
    The unique name of the resource.
    args DomainArgs
    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 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 string
    The unique name of the resource.
    args DomainArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DomainArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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",
    });
    
    example, err := ga.NewDomain(ctx, "exampledomainResourceResourceFromGadomain", &ga.DomainArgs{
    	AcceleratorId: pulumi.String("string"),
    	Domain:        pulumi.String("string"),
    })
    
    var exampledomainResourceResourceFromGadomain = new Domain("exampledomainResourceResourceFromGadomain", DomainArgs.builder()
        .acceleratorId("string")
        .domain("string")
        .build());
    
    exampledomain_resource_resource_from_gadomain = alicloud.ga.Domain("exampledomainResourceResourceFromGadomain",
        accelerator_id="string",
        domain="string")
    
    const exampledomainResourceResourceFromGadomain = new alicloud.ga.Domain("exampledomainResourceResourceFromGadomain", {
        acceleratorId: "string",
        domain: "string",
    });
    
    type: alicloud:ga:Domain
    properties:
        acceleratorId: string
        domain: string
    

    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 string
    The accelerated domain name to be added. only top-level domain names are supported, such as 'example.com'.
    AcceleratorId string
    The ID of the global acceleration instance.
    AcceleratorId string
    The ID of the global acceleration instance.
    Domain string
    The accelerated domain name to be added. only top-level domain names are supported, such as 'example.com'.
    acceleratorId String
    The ID of the global acceleration instance.
    domain String
    The accelerated domain name to be added. only top-level domain names are supported, such as 'example.com'.
    acceleratorId string
    The ID of the global acceleration instance.
    domain string
    The accelerated domain name to be added. only top-level domain names are supported, such as 'example.com'.
    accelerator_id str
    The ID of the global acceleration instance.
    domain str
    The accelerated domain name to be added. only top-level domain names are supported, such as 'example.com'.
    acceleratorId String
    The ID of the global acceleration instance.
    domain 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)
    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:
    AcceleratedDomain string
    The accelerated domain name to be added. only top-level domain names are supported, such as 'example.com'.
    AcceleratorId string
    The ID of the global acceleration instance.
    Status string
    The status of the resource
    AcceleratorId string
    The ID of the global acceleration instance.
    Domain 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 String
    The ID of the global acceleration instance.
    domain 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 string
    The ID of the global acceleration instance.
    domain 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 str
    The ID of the global acceleration instance.
    domain 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 String
    The ID of the global acceleration instance.
    domain 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>
    

    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.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi