DomainArgs

data class DomainArgs(val checkUrl: Output<String>? = null, val domainName: Output<String>? = null, val scope: Output<String>? = null, val sources: Output<List<DomainSourceArgs>>? = null, val tags: Output<Map<String, String>>? = null, val topLevelDomain: Output<String>? = null) : ConvertibleToJava<DomainArgs>

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>

Constructors

Link copied to clipboard
constructor(checkUrl: Output<String>? = null, domainName: Output<String>? = null, scope: Output<String>? = null, sources: Output<List<DomainSourceArgs>>? = null, tags: Output<Map<String, String>>? = null, topLevelDomain: Output<String>? = null)

Properties

Link copied to clipboard
val checkUrl: Output<String>? = null

The URL that is used for health checks.

Link copied to clipboard
val domainName: Output<String>? = null

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..

Link copied to clipboard
val scope: Output<String>? = null

This parameter is applicable to users of level 3 or higher in mainland China and users outside mainland China. Valid values:

Link copied to clipboard
val sources: Output<List<DomainSourceArgs>>? = null

The information about the address of the origin server. For more information about the Sources parameter, See the following Block sources.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A mapping of tags to assign to the resource.

Link copied to clipboard
val topLevelDomain: Output<String>? = null

The top-level domain name.

Functions

Link copied to clipboard
open override fun toJava(): DomainArgs