Domain
Provides a VOD Domain resource. For information about VOD Domain and how to use it, see What is Domain.
NOTE: Available since v1.136.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";
const _default = new random.index.Integer("default", {
min: 10000,
max: 99999,
});
const defaultDomain = new alicloud.vod.Domain("default", {
domainName: `example-${_default.result}.com`,
scope: "domestic",
sources: [{
sourceType: "domain",
sourceContent: "outin-c7405446108111ec9a7100163e0eb78b.oss-cn-beijing.aliyuncs.com",
sourcePort: "443",
}],
tags: {
Created: "terraform",
For: "example",
},
});
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random
default = random.index.Integer("default",
min=10000,
max=99999)
default_domain = alicloud.vod.Domain("default",
domain_name=f"example-{default['result']}.com",
scope="domestic",
sources=[{
"source_type": "domain",
"source_content": "outin-c7405446108111ec9a7100163e0eb78b.oss-cn-beijing.aliyuncs.com",
"source_port": "443",
}],
tags={
"Created": "terraform",
"For": "example",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() =>
{
var @default = new Random.Index.Integer("default", new()
{
Min = 10000,
Max = 99999,
});
var defaultDomain = new AliCloud.Vod.Domain("default", new()
{
DomainName = $"example-{@default.Result}.com",
Scope = "domestic",
Sources = new[]
{
new AliCloud.Vod.Inputs.DomainSourceArgs
{
SourceType = "domain",
SourceContent = "outin-c7405446108111ec9a7100163e0eb78b.oss-cn-beijing.aliyuncs.com",
SourcePort = "443",
},
},
Tags =
{
{ "Created", "terraform" },
{ "For", "example" },
},
});
});
package main
import (
"fmt"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vod"
"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 {
_default, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
Min: 10000,
Max: 99999,
})
if err != nil {
return err
}
_, err = vod.NewDomain(ctx, "default", &vod.DomainArgs{
DomainName: pulumi.Sprintf("example-%v.com", _default.Result),
Scope: pulumi.String("domestic"),
Sources: vod.DomainSourceArray{
&vod.DomainSourceArgs{
SourceType: pulumi.String("domain"),
SourceContent: pulumi.String("outin-c7405446108111ec9a7100163e0eb78b.oss-cn-beijing.aliyuncs.com"),
SourcePort: pulumi.String("443"),
},
},
Tags: pulumi.StringMap{
"Created": pulumi.String("terraform"),
"For": pulumi.String("example"),
},
})
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.random.integer;
import com.pulumi.random.IntegerArgs;
import com.pulumi.alicloud.vod.Domain;
import com.pulumi.alicloud.vod.DomainArgs;
import com.pulumi.alicloud.vod.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 default_ = new Integer("default", IntegerArgs.builder()
.min(10000)
.max(99999)
.build());
var defaultDomain = new Domain("defaultDomain", DomainArgs.builder()
.domainName(String.format("example-%s.com", default_.result()))
.scope("domestic")
.sources(DomainSourceArgs.builder()
.sourceType("domain")
.sourceContent("outin-c7405446108111ec9a7100163e0eb78b.oss-cn-beijing.aliyuncs.com")
.sourcePort("443")
.build())
.tags(Map.ofEntries(
Map.entry("Created", "terraform"),
Map.entry("For", "example")
))
.build());
}
}
resources:
default:
type: random:integer
properties:
min: 10000
max: 99999
defaultDomain:
type: alicloud:vod:Domain
name: default
properties:
domainName: example-${default.result}.com
scope: domestic
sources:
- sourceType: domain
sourceContent: outin-c7405446108111ec9a7100163e0eb78b.oss-cn-beijing.aliyuncs.com
sourcePort: '443'
tags:
Created: terraform
For: example
Import
VOD Domain can be imported using the id, e.g.
$ pulumi import alicloud:vod/domain:Domain example <domain_name>
Properties
The description of the domain name for CDN.
The domain name for CDN that you want to add to ApsaraVideo VOD. Wildcard domain names are supported. Start the domain name with a period (.). Example: .example.com.
.
The time when the domain name for CDN was added. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
The last time when the domain name for CDN was modified. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
The information about the address of the origin server. For more information about the Sources parameter, See the following Block sources
.
Indicates whether the Secure Sockets Layer (SSL) certificate is enabled. Valid values: on
,off
.
The top-level domain name.