1. Packages
  2. Alicloud Provider
  3. API Docs
  4. dcdn
  5. IpaDomain
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.dcdn.IpaDomain

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    Provides a DCDN Ipa Domain resource.

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

    NOTE: Available since v1.158.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const defaultInteger = new random.index.Integer("default", {
        min: 10000,
        max: 99999,
    });
    const default = alicloud.resourcemanager.getResourceGroups({});
    const example = new alicloud.dcdn.IpaDomain("example", {
        domainName: `example-${defaultInteger.result}.com`,
        resourceGroupId: _default.then(_default => _default.groups?.[0]?.id),
        scope: "overseas",
        status: "online",
        sources: [{
            content: "www.alicloud-provider.cn",
            port: 8898,
            priority: "20",
            type: "domain",
            weight: 10,
        }],
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    default_integer = random.index.Integer("default",
        min=10000,
        max=99999)
    default = alicloud.resourcemanager.get_resource_groups()
    example = alicloud.dcdn.IpaDomain("example",
        domain_name=f"example-{default_integer['result']}.com",
        resource_group_id=default.groups[0].id,
        scope="overseas",
        status="online",
        sources=[{
            "content": "www.alicloud-provider.cn",
            "port": 8898,
            "priority": "20",
            "type": "domain",
            "weight": 10,
        }])
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dcdn"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		defaultInteger, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
    			Min: 10000,
    			Max: 99999,
    		})
    		if err != nil {
    			return err
    		}
    		_default, err := resourcemanager.GetResourceGroups(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		_, err = dcdn.NewIpaDomain(ctx, "example", &dcdn.IpaDomainArgs{
    			DomainName:      pulumi.Sprintf("example-%v.com", defaultInteger.Result),
    			ResourceGroupId: pulumi.String(_default.Groups[0].Id),
    			Scope:           pulumi.String("overseas"),
    			Status:          pulumi.String("online"),
    			Sources: dcdn.IpaDomainSourceArray{
    				&dcdn.IpaDomainSourceArgs{
    					Content:  pulumi.String("www.alicloud-provider.cn"),
    					Port:     pulumi.Int(8898),
    					Priority: pulumi.String("20"),
    					Type:     pulumi.String("domain"),
    					Weight:   pulumi.Int(10),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var defaultInteger = new Random.Index.Integer("default", new()
        {
            Min = 10000,
            Max = 99999,
        });
    
        var @default = AliCloud.ResourceManager.GetResourceGroups.Invoke();
    
        var example = new AliCloud.Dcdn.IpaDomain("example", new()
        {
            DomainName = $"example-{defaultInteger.Result}.com",
            ResourceGroupId = @default.Apply(@default => @default.Apply(getResourceGroupsResult => getResourceGroupsResult.Groups[0]?.Id)),
            Scope = "overseas",
            Status = "online",
            Sources = new[]
            {
                new AliCloud.Dcdn.Inputs.IpaDomainSourceArgs
                {
                    Content = "www.alicloud-provider.cn",
                    Port = 8898,
                    Priority = "20",
                    Type = "domain",
                    Weight = 10,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.integer;
    import com.pulumi.random.IntegerArgs;
    import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
    import com.pulumi.alicloud.resourcemanager.inputs.GetResourceGroupsArgs;
    import com.pulumi.alicloud.dcdn.IpaDomain;
    import com.pulumi.alicloud.dcdn.IpaDomainArgs;
    import com.pulumi.alicloud.dcdn.inputs.IpaDomainSourceArgs;
    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 defaultInteger = new Integer("defaultInteger", IntegerArgs.builder()
                .min(10000)
                .max(99999)
                .build());
    
            final var default = ResourcemanagerFunctions.getResourceGroups();
    
            var example = new IpaDomain("example", IpaDomainArgs.builder()
                .domainName(String.format("example-%s.com", defaultInteger.result()))
                .resourceGroupId(default_.groups()[0].id())
                .scope("overseas")
                .status("online")
                .sources(IpaDomainSourceArgs.builder()
                    .content("www.alicloud-provider.cn")
                    .port(8898)
                    .priority("20")
                    .type("domain")
                    .weight(10)
                    .build())
                .build());
    
        }
    }
    
    resources:
      defaultInteger:
        type: random:integer
        name: default
        properties:
          min: 10000
          max: 99999
      example:
        type: alicloud:dcdn:IpaDomain
        properties:
          domainName: example-${defaultInteger.result}.com
          resourceGroupId: ${default.groups[0].id}
          scope: overseas
          status: online
          sources:
            - content: www.alicloud-provider.cn
              port: 8898
              priority: '20'
              type: domain
              weight: 10
    variables:
      default:
        fn::invoke:
          Function: alicloud:resourcemanager:getResourceGroups
          Arguments: {}
    

    Create IpaDomain Resource

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

    Constructor syntax

    new IpaDomain(name: string, args: IpaDomainArgs, opts?: CustomResourceOptions);
    @overload
    def IpaDomain(resource_name: str,
                  args: IpaDomainArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def IpaDomain(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  domain_name: Optional[str] = None,
                  sources: Optional[Sequence[IpaDomainSourceArgs]] = None,
                  resource_group_id: Optional[str] = None,
                  scope: Optional[str] = None,
                  status: Optional[str] = None)
    func NewIpaDomain(ctx *Context, name string, args IpaDomainArgs, opts ...ResourceOption) (*IpaDomain, error)
    public IpaDomain(string name, IpaDomainArgs args, CustomResourceOptions? opts = null)
    public IpaDomain(String name, IpaDomainArgs args)
    public IpaDomain(String name, IpaDomainArgs args, CustomResourceOptions options)
    
    type: alicloud:dcdn:IpaDomain
    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 IpaDomainArgs
    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 IpaDomainArgs
    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 IpaDomainArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IpaDomainArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IpaDomainArgs
    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 ipaDomainResource = new AliCloud.Dcdn.IpaDomain("ipaDomainResource", new()
    {
        DomainName = "string",
        Sources = new[]
        {
            new AliCloud.Dcdn.Inputs.IpaDomainSourceArgs
            {
                Content = "string",
                Port = 0,
                Priority = "string",
                Type = "string",
                Weight = 0,
            },
        },
        ResourceGroupId = "string",
        Scope = "string",
        Status = "string",
    });
    
    example, err := dcdn.NewIpaDomain(ctx, "ipaDomainResource", &dcdn.IpaDomainArgs{
    	DomainName: pulumi.String("string"),
    	Sources: dcdn.IpaDomainSourceArray{
    		&dcdn.IpaDomainSourceArgs{
    			Content:  pulumi.String("string"),
    			Port:     pulumi.Int(0),
    			Priority: pulumi.String("string"),
    			Type:     pulumi.String("string"),
    			Weight:   pulumi.Int(0),
    		},
    	},
    	ResourceGroupId: pulumi.String("string"),
    	Scope:           pulumi.String("string"),
    	Status:          pulumi.String("string"),
    })
    
    var ipaDomainResource = new IpaDomain("ipaDomainResource", IpaDomainArgs.builder()
        .domainName("string")
        .sources(IpaDomainSourceArgs.builder()
            .content("string")
            .port(0)
            .priority("string")
            .type("string")
            .weight(0)
            .build())
        .resourceGroupId("string")
        .scope("string")
        .status("string")
        .build());
    
    ipa_domain_resource = alicloud.dcdn.IpaDomain("ipaDomainResource",
        domain_name="string",
        sources=[alicloud.dcdn.IpaDomainSourceArgs(
            content="string",
            port=0,
            priority="string",
            type="string",
            weight=0,
        )],
        resource_group_id="string",
        scope="string",
        status="string")
    
    const ipaDomainResource = new alicloud.dcdn.IpaDomain("ipaDomainResource", {
        domainName: "string",
        sources: [{
            content: "string",
            port: 0,
            priority: "string",
            type: "string",
            weight: 0,
        }],
        resourceGroupId: "string",
        scope: "string",
        status: "string",
    });
    
    type: alicloud:dcdn:IpaDomain
    properties:
        domainName: string
        resourceGroupId: string
        scope: string
        sources:
            - content: string
              port: 0
              priority: string
              type: string
              weight: 0
        status: string
    

    IpaDomain Resource Properties

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

    Inputs

    The IpaDomain resource accepts the following input properties:

    DomainName string
    The domain name to be added to IPA. Wildcard domain names are supported. A wildcard domain name must start with a period (.).
    Sources List<Pulumi.AliCloud.Dcdn.Inputs.IpaDomainSource>
    Sources. See sources below.
    ResourceGroupId string
    The ID of the resource group. If you do not set this parameter, the system automatically assigns the ID of the default resource group.
    Scope string
    The accelerated region. Valid values: domestic, global, overseas.
    Status string
    The status of DCDN Ipa Domain. Valid values: online, offline. Default to online.
    DomainName string
    The domain name to be added to IPA. Wildcard domain names are supported. A wildcard domain name must start with a period (.).
    Sources []IpaDomainSourceArgs
    Sources. See sources below.
    ResourceGroupId string
    The ID of the resource group. If you do not set this parameter, the system automatically assigns the ID of the default resource group.
    Scope string
    The accelerated region. Valid values: domestic, global, overseas.
    Status string
    The status of DCDN Ipa Domain. Valid values: online, offline. Default to online.
    domainName String
    The domain name to be added to IPA. Wildcard domain names are supported. A wildcard domain name must start with a period (.).
    sources List<IpaDomainSource>
    Sources. See sources below.
    resourceGroupId String
    The ID of the resource group. If you do not set this parameter, the system automatically assigns the ID of the default resource group.
    scope String
    The accelerated region. Valid values: domestic, global, overseas.
    status String
    The status of DCDN Ipa Domain. Valid values: online, offline. Default to online.
    domainName string
    The domain name to be added to IPA. Wildcard domain names are supported. A wildcard domain name must start with a period (.).
    sources IpaDomainSource[]
    Sources. See sources below.
    resourceGroupId string
    The ID of the resource group. If you do not set this parameter, the system automatically assigns the ID of the default resource group.
    scope string
    The accelerated region. Valid values: domestic, global, overseas.
    status string
    The status of DCDN Ipa Domain. Valid values: online, offline. Default to online.
    domain_name str
    The domain name to be added to IPA. Wildcard domain names are supported. A wildcard domain name must start with a period (.).
    sources Sequence[IpaDomainSourceArgs]
    Sources. See sources below.
    resource_group_id str
    The ID of the resource group. If you do not set this parameter, the system automatically assigns the ID of the default resource group.
    scope str
    The accelerated region. Valid values: domestic, global, overseas.
    status str
    The status of DCDN Ipa Domain. Valid values: online, offline. Default to online.
    domainName String
    The domain name to be added to IPA. Wildcard domain names are supported. A wildcard domain name must start with a period (.).
    sources List<Property Map>
    Sources. See sources below.
    resourceGroupId String
    The ID of the resource group. If you do not set this parameter, the system automatically assigns the ID of the default resource group.
    scope String
    The accelerated region. Valid values: domestic, global, overseas.
    status String
    The status of DCDN Ipa Domain. Valid values: online, offline. Default to online.

    Outputs

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

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

    Look up Existing IpaDomain Resource

    Get an existing IpaDomain 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?: IpaDomainState, opts?: CustomResourceOptions): IpaDomain
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            domain_name: Optional[str] = None,
            resource_group_id: Optional[str] = None,
            scope: Optional[str] = None,
            sources: Optional[Sequence[IpaDomainSourceArgs]] = None,
            status: Optional[str] = None) -> IpaDomain
    func GetIpaDomain(ctx *Context, name string, id IDInput, state *IpaDomainState, opts ...ResourceOption) (*IpaDomain, error)
    public static IpaDomain Get(string name, Input<string> id, IpaDomainState? state, CustomResourceOptions? opts = null)
    public static IpaDomain get(String name, Output<String> id, IpaDomainState 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:
    DomainName string
    The domain name to be added to IPA. Wildcard domain names are supported. A wildcard domain name must start with a period (.).
    ResourceGroupId string
    The ID of the resource group. If you do not set this parameter, the system automatically assigns the ID of the default resource group.
    Scope string
    The accelerated region. Valid values: domestic, global, overseas.
    Sources List<Pulumi.AliCloud.Dcdn.Inputs.IpaDomainSource>
    Sources. See sources below.
    Status string
    The status of DCDN Ipa Domain. Valid values: online, offline. Default to online.
    DomainName string
    The domain name to be added to IPA. Wildcard domain names are supported. A wildcard domain name must start with a period (.).
    ResourceGroupId string
    The ID of the resource group. If you do not set this parameter, the system automatically assigns the ID of the default resource group.
    Scope string
    The accelerated region. Valid values: domestic, global, overseas.
    Sources []IpaDomainSourceArgs
    Sources. See sources below.
    Status string
    The status of DCDN Ipa Domain. Valid values: online, offline. Default to online.
    domainName String
    The domain name to be added to IPA. Wildcard domain names are supported. A wildcard domain name must start with a period (.).
    resourceGroupId String
    The ID of the resource group. If you do not set this parameter, the system automatically assigns the ID of the default resource group.
    scope String
    The accelerated region. Valid values: domestic, global, overseas.
    sources List<IpaDomainSource>
    Sources. See sources below.
    status String
    The status of DCDN Ipa Domain. Valid values: online, offline. Default to online.
    domainName string
    The domain name to be added to IPA. Wildcard domain names are supported. A wildcard domain name must start with a period (.).
    resourceGroupId string
    The ID of the resource group. If you do not set this parameter, the system automatically assigns the ID of the default resource group.
    scope string
    The accelerated region. Valid values: domestic, global, overseas.
    sources IpaDomainSource[]
    Sources. See sources below.
    status string
    The status of DCDN Ipa Domain. Valid values: online, offline. Default to online.
    domain_name str
    The domain name to be added to IPA. Wildcard domain names are supported. A wildcard domain name must start with a period (.).
    resource_group_id str
    The ID of the resource group. If you do not set this parameter, the system automatically assigns the ID of the default resource group.
    scope str
    The accelerated region. Valid values: domestic, global, overseas.
    sources Sequence[IpaDomainSourceArgs]
    Sources. See sources below.
    status str
    The status of DCDN Ipa Domain. Valid values: online, offline. Default to online.
    domainName String
    The domain name to be added to IPA. Wildcard domain names are supported. A wildcard domain name must start with a period (.).
    resourceGroupId String
    The ID of the resource group. If you do not set this parameter, the system automatically assigns the ID of the default resource group.
    scope String
    The accelerated region. Valid values: domestic, global, overseas.
    sources List<Property Map>
    Sources. See sources below.
    status String
    The status of DCDN Ipa Domain. Valid values: online, offline. Default to online.

    Supporting Types

    IpaDomainSource, IpaDomainSourceArgs

    Content string
    The address of the origin server. You can specify an IP address or a domain name.
    Port int
    The custom port number. Valid values: 0 to 65535.
    Priority string
    The priority of the origin server. Valid values: 20 and 30. Default value: 20. A value of 20 specifies that the origin is a primary origin. A value of 30 specifies that the origin is a secondary origin.
    Type string
    The type of the origin server. Valid values: ipaddr, domain, oss.
    Weight int
    The weight of the origin server. You must specify a value that is less than 100. Default value: 10.
    Content string
    The address of the origin server. You can specify an IP address or a domain name.
    Port int
    The custom port number. Valid values: 0 to 65535.
    Priority string
    The priority of the origin server. Valid values: 20 and 30. Default value: 20. A value of 20 specifies that the origin is a primary origin. A value of 30 specifies that the origin is a secondary origin.
    Type string
    The type of the origin server. Valid values: ipaddr, domain, oss.
    Weight int
    The weight of the origin server. You must specify a value that is less than 100. Default value: 10.
    content String
    The address of the origin server. You can specify an IP address or a domain name.
    port Integer
    The custom port number. Valid values: 0 to 65535.
    priority String
    The priority of the origin server. Valid values: 20 and 30. Default value: 20. A value of 20 specifies that the origin is a primary origin. A value of 30 specifies that the origin is a secondary origin.
    type String
    The type of the origin server. Valid values: ipaddr, domain, oss.
    weight Integer
    The weight of the origin server. You must specify a value that is less than 100. Default value: 10.
    content string
    The address of the origin server. You can specify an IP address or a domain name.
    port number
    The custom port number. Valid values: 0 to 65535.
    priority string
    The priority of the origin server. Valid values: 20 and 30. Default value: 20. A value of 20 specifies that the origin is a primary origin. A value of 30 specifies that the origin is a secondary origin.
    type string
    The type of the origin server. Valid values: ipaddr, domain, oss.
    weight number
    The weight of the origin server. You must specify a value that is less than 100. Default value: 10.
    content str
    The address of the origin server. You can specify an IP address or a domain name.
    port int
    The custom port number. Valid values: 0 to 65535.
    priority str
    The priority of the origin server. Valid values: 20 and 30. Default value: 20. A value of 20 specifies that the origin is a primary origin. A value of 30 specifies that the origin is a secondary origin.
    type str
    The type of the origin server. Valid values: ipaddr, domain, oss.
    weight int
    The weight of the origin server. You must specify a value that is less than 100. Default value: 10.
    content String
    The address of the origin server. You can specify an IP address or a domain name.
    port Number
    The custom port number. Valid values: 0 to 65535.
    priority String
    The priority of the origin server. Valid values: 20 and 30. Default value: 20. A value of 20 specifies that the origin is a primary origin. A value of 30 specifies that the origin is a secondary origin.
    type String
    The type of the origin server. Valid values: ipaddr, domain, oss.
    weight Number
    The weight of the origin server. You must specify a value that is less than 100. Default value: 10.

    Import

    DCDN Ipa Domain can be imported using the id, e.g.

    $ pulumi import alicloud:dcdn/ipaDomain:IpaDomain example <domain_name>
    

    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.62.1 published on Monday, Sep 16, 2024 by Pulumi