Er

class Er : KotlinCustomResource

Provides a DCDN Er resource. For information about DCDN Er and how to use it, see What is Er.

NOTE: Available since v1.201.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "tf-example";
const _default = new alicloud.dcdn.Er("default", {
erName: name,
description: name,
envConf: {
staging: {
specName: "5ms",
allowedHosts: ["example.com"],
},
production: {
specName: "5ms",
allowedHosts: ["example.com"],
},
},
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tf-example"
default = alicloud.dcdn.Er("default",
er_name=name,
description=name,
env_conf={
"staging": {
"spec_name": "5ms",
"allowed_hosts": ["example.com"],
},
"production": {
"spec_name": "5ms",
"allowed_hosts": ["example.com"],
},
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "tf-example";
var @default = new AliCloud.Dcdn.Er("default", new()
{
ErName = name,
Description = name,
EnvConf = new AliCloud.Dcdn.Inputs.ErEnvConfArgs
{
Staging = new AliCloud.Dcdn.Inputs.ErEnvConfStagingArgs
{
SpecName = "5ms",
AllowedHosts = new[]
{
"example.com",
},
},
Production = new AliCloud.Dcdn.Inputs.ErEnvConfProductionArgs
{
SpecName = "5ms",
AllowedHosts = new[]
{
"example.com",
},
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dcdn"
"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, "")
name := "tf-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_, err := dcdn.NewEr(ctx, "default", &dcdn.ErArgs{
ErName: pulumi.String(name),
Description: pulumi.String(name),
EnvConf: &dcdn.ErEnvConfArgs{
Staging: &dcdn.ErEnvConfStagingArgs{
SpecName: pulumi.String("5ms"),
AllowedHosts: pulumi.StringArray{
pulumi.String("example.com"),
},
},
Production: &dcdn.ErEnvConfProductionArgs{
SpecName: pulumi.String("5ms"),
AllowedHosts: pulumi.StringArray{
pulumi.String("example.com"),
},
},
},
})
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.dcdn.Er;
import com.pulumi.alicloud.dcdn.ErArgs;
import com.pulumi.alicloud.dcdn.inputs.ErEnvConfArgs;
import com.pulumi.alicloud.dcdn.inputs.ErEnvConfStagingArgs;
import com.pulumi.alicloud.dcdn.inputs.ErEnvConfProductionArgs;
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 name = config.get("name").orElse("tf-example");
var default_ = new Er("default", ErArgs.builder()
.erName(name)
.description(name)
.envConf(ErEnvConfArgs.builder()
.staging(ErEnvConfStagingArgs.builder()
.specName("5ms")
.allowedHosts("example.com")
.build())
.production(ErEnvConfProductionArgs.builder()
.specName("5ms")
.allowedHosts("example.com")
.build())
.build())
.build());
}
}
configuration:
name:
type: string
default: tf-example
resources:
default:
type: alicloud:dcdn:Er
properties:
erName: ${name}
description: ${name}
envConf:
staging:
specName: 5ms
allowedHosts:
- example.com
production:
specName: 5ms
allowedHosts:
- example.com

Import

DCDN Er can be imported using the id, e.g.

$ pulumi import alicloud:dcdn/er:Er example <id>

Properties

Link copied to clipboard
val description: Output<String>?

Routine The description of the routine.

Link copied to clipboard
val envConf: Output<ErEnvConf>

The configurations of the specified environment. See env_conf below.

Link copied to clipboard
val erName: Output<String>

The name of the routine. The name must be unique among the routines that belong to the same Alibaba Cloud account.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val urn: Output<String>