alicloud.dcdn.IpaDomain
Explore with Pulumi AI
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
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var domainName = config.Get("domainName") ?? "example.com";
var @default = AliCloud.ResourceManager.GetResourceGroups.Invoke();
var example = new AliCloud.Dcdn.IpaDomain("example", new()
{
DomainName = domainName,
ResourceGroupId = @default.Apply(@default => @default.Apply(getResourceGroupsResult => getResourceGroupsResult.Groups[0]?.Id)),
Scope = "global",
Status = "online",
Sources = new[]
{
new AliCloud.Dcdn.Inputs.IpaDomainSourceArgs
{
Content = "www.alicloud-provider.cn",
Port = 80,
Priority = "20",
Type = "domain",
Weight = 10,
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dcdn"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
domainName := "example.com"
if param := cfg.Get("domainName"); param != "" {
domainName = param
}
_default, err := resourcemanager.GetResourceGroups(ctx, nil, nil)
if err != nil {
return err
}
_, err = dcdn.NewIpaDomain(ctx, "example", &dcdn.IpaDomainArgs{
DomainName: pulumi.String(domainName),
ResourceGroupId: *pulumi.String(_default.Groups[0].Id),
Scope: pulumi.String("global"),
Status: pulumi.String("online"),
Sources: dcdn.IpaDomainSourceArray{
&dcdn.IpaDomainSourceArgs{
Content: pulumi.String("www.alicloud-provider.cn"),
Port: pulumi.Int(80),
Priority: pulumi.String("20"),
Type: pulumi.String("domain"),
Weight: pulumi.Int(10),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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) {
final var config = ctx.config();
final var domainName = config.get("domainName").orElse("example.com");
final var default = ResourcemanagerFunctions.getResourceGroups();
var example = new IpaDomain("example", IpaDomainArgs.builder()
.domainName(domainName)
.resourceGroupId(default_.groups()[0].id())
.scope("global")
.status("online")
.sources(IpaDomainSourceArgs.builder()
.content("www.alicloud-provider.cn")
.port(80)
.priority("20")
.type("domain")
.weight(10)
.build())
.build());
}
}
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
domain_name = config.get("domainName")
if domain_name is None:
domain_name = "example.com"
default = alicloud.resourcemanager.get_resource_groups()
example = alicloud.dcdn.IpaDomain("example",
domain_name=domain_name,
resource_group_id=default.groups[0].id,
scope="global",
status="online",
sources=[alicloud.dcdn.IpaDomainSourceArgs(
content="www.alicloud-provider.cn",
port=80,
priority="20",
type="domain",
weight=10,
)])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const domainName = config.get("domainName") || "example.com";
const default = alicloud.resourcemanager.getResourceGroups({});
const example = new alicloud.dcdn.IpaDomain("example", {
domainName: domainName,
resourceGroupId: _default.then(_default => _default.groups?.[0]?.id),
scope: "global",
status: "online",
sources: [{
content: "www.alicloud-provider.cn",
port: 80,
priority: "20",
type: "domain",
weight: 10,
}],
});
configuration:
domainName:
type: string
default: example.com
resources:
example:
type: alicloud:dcdn:IpaDomain
properties:
domainName: ${domainName}
resourceGroupId: ${default.groups[0].id}
scope: global
status: online
sources:
- content: www.alicloud-provider.cn
port: 80
priority: '20'
type: domain
weight: 10
variables:
default:
fn::invoke:
Function: alicloud:resourcemanager:getResourceGroups
Arguments: {}
Create IpaDomain Resource
new IpaDomain(name: string, args: IpaDomainArgs, opts?: CustomResourceOptions);
@overload
def IpaDomain(resource_name: 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)
@overload
def IpaDomain(resource_name: str,
args: IpaDomainArgs,
opts: Optional[ResourceOptions] = 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.
- 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.
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:
- Domain
Name 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.
Ali Cloud. Dcdn. Inputs. Ipa Domain Source> Sources. See
sources
below.- Resource
Group stringId 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 toonline
.
- Domain
Name string The domain name to be added to IPA. Wildcard domain names are supported. A wildcard domain name must start with a period (.).
- Sources
[]Ipa
Domain Source Args Sources. See
sources
below.- Resource
Group stringId 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 toonline
.
- domain
Name 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<Ipa
Domain Source> Sources. See
sources
below.- resource
Group StringId 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 toonline
.
- domain
Name string The domain name to be added to IPA. Wildcard domain names are supported. A wildcard domain name must start with a period (.).
- sources
Ipa
Domain Source[] Sources. See
sources
below.- resource
Group stringId 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 toonline
.
- 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[Ipa
Domain Source Args] Sources. See
sources
below.- resource_
group_ strid 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 toonline
.
- domain
Name 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.- resource
Group StringId 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 toonline
.
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.
- Domain
Name string The domain name to be added to IPA. Wildcard domain names are supported. A wildcard domain name must start with a period (.).
- Resource
Group stringId 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.
Ali Cloud. Dcdn. Inputs. Ipa Domain Source> Sources. See
sources
below.- Status string
The status of DCDN Ipa Domain. Valid values:
online
,offline
. Default toonline
.
- Domain
Name string The domain name to be added to IPA. Wildcard domain names are supported. A wildcard domain name must start with a period (.).
- Resource
Group stringId 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
[]Ipa
Domain Source Args Sources. See
sources
below.- Status string
The status of DCDN Ipa Domain. Valid values:
online
,offline
. Default toonline
.
- domain
Name String The domain name to be added to IPA. Wildcard domain names are supported. A wildcard domain name must start with a period (.).
- resource
Group StringId 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<Ipa
Domain Source> Sources. See
sources
below.- status String
The status of DCDN Ipa Domain. Valid values:
online
,offline
. Default toonline
.
- domain
Name string The domain name to be added to IPA. Wildcard domain names are supported. A wildcard domain name must start with a period (.).
- resource
Group stringId 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
Ipa
Domain Source[] Sources. See
sources
below.- status string
The status of DCDN Ipa Domain. Valid values:
online
,offline
. Default toonline
.
- 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_ strid 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[Ipa
Domain Source Args] Sources. See
sources
below.- status str
The status of DCDN Ipa Domain. Valid values:
online
,offline
. Default toonline
.
- domain
Name String The domain name to be added to IPA. Wildcard domain names are supported. A wildcard domain name must start with a period (.).
- resource
Group StringId 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 toonline
.
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
to65535
.- Priority string
The priority of the origin server. Valid values:
20
and30
. 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
to65535
.- Priority string
The priority of the origin server. Valid values:
20
and30
. 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
to65535
.- priority String
The priority of the origin server. Valid values:
20
and30
. 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
to65535
.- priority string
The priority of the origin server. Valid values:
20
and30
. 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
to65535
.- priority str
The priority of the origin server. Valid values:
20
and30
. 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
to65535
.- priority String
The priority of the origin server. Valid values:
20
and30
. 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>
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.