alicloud.scdn.Domain
Explore with Pulumi AI
Provides a SCDN Domain resource.
For information about SCDN Domain and how to use it, see What is Domain.
NOTE: Available in v1.131.0+.
NOTE: Alibaba Cloud SCDN has stopped new customer purchases from January 26, 2023, and you can choose to buy Alibaba Cloud DCDN products with more comprehensive acceleration and protection capabilities. If you are already a SCDN customer, you can submit a work order at any time to apply for a smooth migration to Alibaba Cloud DCDN products. In the future, we will provide better acceleration and security protection services in Alibaba Cloud DCDN, thank you for your understanding and cooperation.
DEPRECATED: This resource has been deprecated from version
1.219.0
.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = new alicloud.scdn.Domain("example", {
domainName: "my-Domain",
sources: [{
content: "xxx.aliyuncs.com",
enabled: "online",
port: 80,
priority: "20",
type: "oss",
}],
});
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.scdn.Domain("example",
domain_name="my-Domain",
sources=[{
"content": "xxx.aliyuncs.com",
"enabled": "online",
"port": 80,
"priority": "20",
"type": "oss",
}])
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/scdn"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := scdn.NewDomain(ctx, "example", &scdn.DomainArgs{
DomainName: pulumi.String("my-Domain"),
Sources: scdn.DomainSourceArray{
&scdn.DomainSourceArgs{
Content: pulumi.String("xxx.aliyuncs.com"),
Enabled: pulumi.String("online"),
Port: pulumi.Int(80),
Priority: pulumi.String("20"),
Type: pulumi.String("oss"),
},
},
})
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 example = new AliCloud.Scdn.Domain("example", new()
{
DomainName = "my-Domain",
Sources = new[]
{
new AliCloud.Scdn.Inputs.DomainSourceArgs
{
Content = "xxx.aliyuncs.com",
Enabled = "online",
Port = 80,
Priority = "20",
Type = "oss",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.scdn.Domain;
import com.pulumi.alicloud.scdn.DomainArgs;
import com.pulumi.alicloud.scdn.inputs.DomainSourceArgs;
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 Domain("example", DomainArgs.builder()
.domainName("my-Domain")
.sources(DomainSourceArgs.builder()
.content("xxx.aliyuncs.com")
.enabled("online")
.port(80)
.priority("20")
.type("oss")
.build())
.build());
}
}
resources:
example:
type: alicloud:scdn:Domain
properties:
domainName: my-Domain
sources:
- content: xxx.aliyuncs.com
enabled: online
port: 80
priority: '20'
type: oss
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,
domain_name: Optional[str] = None,
sources: Optional[Sequence[DomainSourceArgs]] = None,
biz_name: Optional[str] = None,
cert_infos: Optional[Sequence[DomainCertInfoArgs]] = None,
check_url: Optional[str] = None,
force_set: Optional[str] = None,
resource_group_id: Optional[str] = None,
status: 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:scdn: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 exampledomainResourceResourceFromScdndomain = new AliCloud.Scdn.Domain("exampledomainResourceResourceFromScdndomain", new()
{
DomainName = "string",
Sources = new[]
{
new AliCloud.Scdn.Inputs.DomainSourceArgs
{
Content = "string",
Port = 0,
Priority = "string",
Type = "string",
Enabled = "string",
},
},
CertInfos = new[]
{
new AliCloud.Scdn.Inputs.DomainCertInfoArgs
{
CertName = "string",
CertType = "string",
SslPri = "string",
SslProtocol = "string",
SslPub = "string",
},
},
CheckUrl = "string",
ForceSet = "string",
ResourceGroupId = "string",
Status = "string",
});
example, err := scdn.NewDomain(ctx, "exampledomainResourceResourceFromScdndomain", &scdn.DomainArgs{
DomainName: pulumi.String("string"),
Sources: scdn.DomainSourceArray{
&scdn.DomainSourceArgs{
Content: pulumi.String("string"),
Port: pulumi.Int(0),
Priority: pulumi.String("string"),
Type: pulumi.String("string"),
Enabled: pulumi.String("string"),
},
},
CertInfos: scdn.DomainCertInfoArray{
&scdn.DomainCertInfoArgs{
CertName: pulumi.String("string"),
CertType: pulumi.String("string"),
SslPri: pulumi.String("string"),
SslProtocol: pulumi.String("string"),
SslPub: pulumi.String("string"),
},
},
CheckUrl: pulumi.String("string"),
ForceSet: pulumi.String("string"),
ResourceGroupId: pulumi.String("string"),
Status: pulumi.String("string"),
})
var exampledomainResourceResourceFromScdndomain = new Domain("exampledomainResourceResourceFromScdndomain", DomainArgs.builder()
.domainName("string")
.sources(DomainSourceArgs.builder()
.content("string")
.port(0)
.priority("string")
.type("string")
.enabled("string")
.build())
.certInfos(DomainCertInfoArgs.builder()
.certName("string")
.certType("string")
.sslPri("string")
.sslProtocol("string")
.sslPub("string")
.build())
.checkUrl("string")
.forceSet("string")
.resourceGroupId("string")
.status("string")
.build());
exampledomain_resource_resource_from_scdndomain = alicloud.scdn.Domain("exampledomainResourceResourceFromScdndomain",
domain_name="string",
sources=[{
"content": "string",
"port": 0,
"priority": "string",
"type": "string",
"enabled": "string",
}],
cert_infos=[{
"cert_name": "string",
"cert_type": "string",
"ssl_pri": "string",
"ssl_protocol": "string",
"ssl_pub": "string",
}],
check_url="string",
force_set="string",
resource_group_id="string",
status="string")
const exampledomainResourceResourceFromScdndomain = new alicloud.scdn.Domain("exampledomainResourceResourceFromScdndomain", {
domainName: "string",
sources: [{
content: "string",
port: 0,
priority: "string",
type: "string",
enabled: "string",
}],
certInfos: [{
certName: "string",
certType: "string",
sslPri: "string",
sslProtocol: "string",
sslPub: "string",
}],
checkUrl: "string",
forceSet: "string",
resourceGroupId: "string",
status: "string",
});
type: alicloud:scdn:Domain
properties:
certInfos:
- certName: string
certType: string
sslPri: string
sslProtocol: string
sslPub: string
checkUrl: string
domainName: string
forceSet: string
resourceGroupId: string
sources:
- content: string
enabled: string
port: 0
priority: string
type: string
status: 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:
- Domain
Name string - The name of domain.
- Sources
List<Pulumi.
Ali Cloud. Scdn. Inputs. Domain Source> - the Origin Server Information. See the following
Block sources
. - Biz
Name string - Attribute perm has been deprecated and suggest removing it from your template.
- Cert
Infos List<Pulumi.Ali Cloud. Scdn. Inputs. Domain Cert Info> - Certificate Information. See the following
Block cert_infos
. - Check
Url string - The health check url.
- Force
Set string - Whether to set certificate forcibly.
- Resource
Group stringId - The resource group id.
- Status string
- The status of the resource. Valid values:
offline
,online
.
- Domain
Name string - The name of domain.
- Sources
[]Domain
Source Args - the Origin Server Information. See the following
Block sources
. - Biz
Name string - Attribute perm has been deprecated and suggest removing it from your template.
- Cert
Infos []DomainCert Info Args - Certificate Information. See the following
Block cert_infos
. - Check
Url string - The health check url.
- Force
Set string - Whether to set certificate forcibly.
- Resource
Group stringId - The resource group id.
- Status string
- The status of the resource. Valid values:
offline
,online
.
- domain
Name String - The name of domain.
- sources
List<Domain
Source> - the Origin Server Information. See the following
Block sources
. - biz
Name String - Attribute perm has been deprecated and suggest removing it from your template.
- cert
Infos List<DomainCert Info> - Certificate Information. See the following
Block cert_infos
. - check
Url String - The health check url.
- force
Set String - Whether to set certificate forcibly.
- resource
Group StringId - The resource group id.
- status String
- The status of the resource. Valid values:
offline
,online
.
- domain
Name string - The name of domain.
- sources
Domain
Source[] - the Origin Server Information. See the following
Block sources
. - biz
Name string - Attribute perm has been deprecated and suggest removing it from your template.
- cert
Infos DomainCert Info[] - Certificate Information. See the following
Block cert_infos
. - check
Url string - The health check url.
- force
Set string - Whether to set certificate forcibly.
- resource
Group stringId - The resource group id.
- status string
- The status of the resource. Valid values:
offline
,online
.
- domain_
name str - The name of domain.
- sources
Sequence[Domain
Source Args] - the Origin Server Information. See the following
Block sources
. - biz_
name str - Attribute perm has been deprecated and suggest removing it from your template.
- cert_
infos Sequence[DomainCert Info Args] - Certificate Information. See the following
Block cert_infos
. - check_
url str - The health check url.
- force_
set str - Whether to set certificate forcibly.
- resource_
group_ strid - The resource group id.
- status str
- The status of the resource. Valid values:
offline
,online
.
- domain
Name String - The name of domain.
- sources List<Property Map>
- the Origin Server Information. See the following
Block sources
. - biz
Name String - Attribute perm has been deprecated and suggest removing it from your template.
- cert
Infos List<Property Map> - Certificate Information. See the following
Block cert_infos
. - check
Url String - The health check url.
- force
Set String - Whether to set certificate forcibly.
- resource
Group StringId - The resource group id.
- status String
- The status of the resource. Valid values:
offline
,online
.
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.
- 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 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,
biz_name: Optional[str] = None,
cert_infos: Optional[Sequence[DomainCertInfoArgs]] = None,
check_url: Optional[str] = None,
domain_name: Optional[str] = None,
force_set: Optional[str] = None,
resource_group_id: Optional[str] = None,
sources: Optional[Sequence[DomainSourceArgs]] = 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.
- Biz
Name string - Attribute perm has been deprecated and suggest removing it from your template.
- Cert
Infos List<Pulumi.Ali Cloud. Scdn. Inputs. Domain Cert Info> - Certificate Information. See the following
Block cert_infos
. - Check
Url string - The health check url.
- Domain
Name string - The name of domain.
- Force
Set string - Whether to set certificate forcibly.
- Resource
Group stringId - The resource group id.
- Sources
List<Pulumi.
Ali Cloud. Scdn. Inputs. Domain Source> - the Origin Server Information. See the following
Block sources
. - Status string
- The status of the resource. Valid values:
offline
,online
.
- Biz
Name string - Attribute perm has been deprecated and suggest removing it from your template.
- Cert
Infos []DomainCert Info Args - Certificate Information. See the following
Block cert_infos
. - Check
Url string - The health check url.
- Domain
Name string - The name of domain.
- Force
Set string - Whether to set certificate forcibly.
- Resource
Group stringId - The resource group id.
- Sources
[]Domain
Source Args - the Origin Server Information. See the following
Block sources
. - Status string
- The status of the resource. Valid values:
offline
,online
.
- biz
Name String - Attribute perm has been deprecated and suggest removing it from your template.
- cert
Infos List<DomainCert Info> - Certificate Information. See the following
Block cert_infos
. - check
Url String - The health check url.
- domain
Name String - The name of domain.
- force
Set String - Whether to set certificate forcibly.
- resource
Group StringId - The resource group id.
- sources
List<Domain
Source> - the Origin Server Information. See the following
Block sources
. - status String
- The status of the resource. Valid values:
offline
,online
.
- biz
Name string - Attribute perm has been deprecated and suggest removing it from your template.
- cert
Infos DomainCert Info[] - Certificate Information. See the following
Block cert_infos
. - check
Url string - The health check url.
- domain
Name string - The name of domain.
- force
Set string - Whether to set certificate forcibly.
- resource
Group stringId - The resource group id.
- sources
Domain
Source[] - the Origin Server Information. See the following
Block sources
. - status string
- The status of the resource. Valid values:
offline
,online
.
- biz_
name str - Attribute perm has been deprecated and suggest removing it from your template.
- cert_
infos Sequence[DomainCert Info Args] - Certificate Information. See the following
Block cert_infos
. - check_
url str - The health check url.
- domain_
name str - The name of domain.
- force_
set str - Whether to set certificate forcibly.
- resource_
group_ strid - The resource group id.
- sources
Sequence[Domain
Source Args] - the Origin Server Information. See the following
Block sources
. - status str
- The status of the resource. Valid values:
offline
,online
.
- biz
Name String - Attribute perm has been deprecated and suggest removing it from your template.
- cert
Infos List<Property Map> - Certificate Information. See the following
Block cert_infos
. - check
Url String - The health check url.
- domain
Name String - The name of domain.
- force
Set String - Whether to set certificate forcibly.
- resource
Group StringId - The resource group id.
- sources List<Property Map>
- the Origin Server Information. See the following
Block sources
. - status String
- The status of the resource. Valid values:
offline
,online
.
Supporting Types
DomainCertInfo, DomainCertInfoArgs
- Cert
Name string - If You Enable HTTPS Here Certificate Name.
- Cert
Type string - Certificate Type. Value Range:
- upload: Certificate
- cas: Certificate Authority Certificate.
- free: Free Certificate.
- Ssl
Pri string - Private Key. Do Not Enable Certificate without Entering a User Name and Configure Certificates Enter Private Key.
- Ssl
Protocol string - Whether to Enable SSL Certificate. Valid Values: on, off. Valid values:
on
,off
. - Ssl
Pub string - If You Enable HTTPS Here Key.
- Cert
Name string - If You Enable HTTPS Here Certificate Name.
- Cert
Type string - Certificate Type. Value Range:
- upload: Certificate
- cas: Certificate Authority Certificate.
- free: Free Certificate.
- Ssl
Pri string - Private Key. Do Not Enable Certificate without Entering a User Name and Configure Certificates Enter Private Key.
- Ssl
Protocol string - Whether to Enable SSL Certificate. Valid Values: on, off. Valid values:
on
,off
. - Ssl
Pub string - If You Enable HTTPS Here Key.
- cert
Name String - If You Enable HTTPS Here Certificate Name.
- cert
Type String - Certificate Type. Value Range:
- upload: Certificate
- cas: Certificate Authority Certificate.
- free: Free Certificate.
- ssl
Pri String - Private Key. Do Not Enable Certificate without Entering a User Name and Configure Certificates Enter Private Key.
- ssl
Protocol String - Whether to Enable SSL Certificate. Valid Values: on, off. Valid values:
on
,off
. - ssl
Pub String - If You Enable HTTPS Here Key.
- cert
Name string - If You Enable HTTPS Here Certificate Name.
- cert
Type string - Certificate Type. Value Range:
- upload: Certificate
- cas: Certificate Authority Certificate.
- free: Free Certificate.
- ssl
Pri string - Private Key. Do Not Enable Certificate without Entering a User Name and Configure Certificates Enter Private Key.
- ssl
Protocol string - Whether to Enable SSL Certificate. Valid Values: on, off. Valid values:
on
,off
. - ssl
Pub string - If You Enable HTTPS Here Key.
- cert_
name str - If You Enable HTTPS Here Certificate Name.
- cert_
type str - Certificate Type. Value Range:
- upload: Certificate
- cas: Certificate Authority Certificate.
- free: Free Certificate.
- ssl_
pri str - Private Key. Do Not Enable Certificate without Entering a User Name and Configure Certificates Enter Private Key.
- ssl_
protocol str - Whether to Enable SSL Certificate. Valid Values: on, off. Valid values:
on
,off
. - ssl_
pub str - If You Enable HTTPS Here Key.
- cert
Name String - If You Enable HTTPS Here Certificate Name.
- cert
Type String - Certificate Type. Value Range:
- upload: Certificate
- cas: Certificate Authority Certificate.
- free: Free Certificate.
- ssl
Pri String - Private Key. Do Not Enable Certificate without Entering a User Name and Configure Certificates Enter Private Key.
- ssl
Protocol String - Whether to Enable SSL Certificate. Valid Values: on, off. Valid values:
on
,off
. - ssl
Pub String - If You Enable HTTPS Here Key.
DomainSource, DomainSourceArgs
Import
SCDN Domain can be imported using the id, e.g.
$ pulumi import alicloud:scdn/domain:Domain 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.