@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
199 lines (198 loc) • 8.1 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Provides a resource to manage cdn domain
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as volcengine from "@volcengine/pulumi";
*
* const fooCdnCertificate = new volcengine.cdn.CdnCertificate("fooCdnCertificate", {
* certificate: "",
* privateKey: "",
* desc: "tftest",
* source: "cdn_cert_hosting",
* });
* const fooCdnDomain = new volcengine.cdn.CdnDomain("fooCdnDomain", {
* domain: "tftest.byte-test.com",
* serviceType: "web",
* tags: [
* {
* key: "tfkey1",
* value: "tfvalue1",
* },
* {
* key: "tfkey2",
* value: "tfvalue2",
* },
* ],
* domainConfig: pulumi.jsonStringify({
* OriginProtocol: "https",
* Origin: [{
* OriginAction: {
* OriginLines: [{
* Address: "1.1.1.1",
* HttpPort: "80",
* HttpsPort: "443",
* InstanceType: "ip",
* OriginType: "primary",
* PrivateBucketAccess: false,
* Weight: "2",
* }],
* },
* }],
* HTTPS: {
* CertInfo: {
* CertId: fooCdnCertificate.id,
* },
* DisableHttp: false,
* HTTP2: true,
* Switch: true,
* Ocsp: false,
* TlsVersion: [
* "tlsv1.1",
* "tlsv1.2",
* ],
* },
* }),
* });
* ```
*
* ## Import
*
* CdnDomain can be imported using the domain, e.g.
*
* ```sh
* $ pulumi import volcengine:cdn/cdnDomain:CdnDomain default www.volcengine.com
* ```
* Please note that when you execute destroy, we will first take the domain name offline and then delete it.
*/
export declare class CdnDomain extends pulumi.CustomResource {
/**
* Get an existing CdnDomain resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: CdnDomainState, opts?: pulumi.CustomResourceOptions): CdnDomain;
/**
* Returns true if the given object is an instance of CdnDomain. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is CdnDomain;
/**
* You need to add a domain. The main account can add up to 200 accelerated domains.
*/
readonly domain: pulumi.Output<string>;
/**
* Accelerate domain configuration. Please convert the configuration module structure into json and pass it into a string. You must specify the Origin module. The OriginProtocol parameter, OriginHost parameter, and other domain configuration modules are optional.
*/
readonly domainConfig: pulumi.Output<string>;
/**
* The project to which this domain name belongs. Default is `default`.
*/
readonly project: pulumi.Output<string | undefined>;
/**
* Indicates the acceleration area. The parameter can take the following values: `chineseMainland`: Indicates mainland China. `global`: Indicates global. `outsideChineseMainland`: Indicates global (excluding mainland China).
*/
readonly serviceRegion: pulumi.Output<string>;
/**
* The business type of the domain name is indicated by this parameter. The possible values are: `download`: for file downloads. `web`: for web pages. `video`: for audio and video on demand.
*/
readonly serviceType: pulumi.Output<string>;
/**
* Configuration for sharing CNAME.
*/
readonly sharedCname: pulumi.Output<outputs.cdn.CdnDomainSharedCname | undefined>;
/**
* The status of the domain.
*/
readonly status: pulumi.Output<string>;
/**
* Indicate the tags you have set for this domain name. You can set up to 10 tags.
*/
readonly tags: pulumi.Output<outputs.cdn.CdnDomainTag[] | undefined>;
/**
* Create a CdnDomain resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: CdnDomainArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering CdnDomain resources.
*/
export interface CdnDomainState {
/**
* You need to add a domain. The main account can add up to 200 accelerated domains.
*/
domain?: pulumi.Input<string>;
/**
* Accelerate domain configuration. Please convert the configuration module structure into json and pass it into a string. You must specify the Origin module. The OriginProtocol parameter, OriginHost parameter, and other domain configuration modules are optional.
*/
domainConfig?: pulumi.Input<string>;
/**
* The project to which this domain name belongs. Default is `default`.
*/
project?: pulumi.Input<string>;
/**
* Indicates the acceleration area. The parameter can take the following values: `chineseMainland`: Indicates mainland China. `global`: Indicates global. `outsideChineseMainland`: Indicates global (excluding mainland China).
*/
serviceRegion?: pulumi.Input<string>;
/**
* The business type of the domain name is indicated by this parameter. The possible values are: `download`: for file downloads. `web`: for web pages. `video`: for audio and video on demand.
*/
serviceType?: pulumi.Input<string>;
/**
* Configuration for sharing CNAME.
*/
sharedCname?: pulumi.Input<inputs.cdn.CdnDomainSharedCname>;
/**
* The status of the domain.
*/
status?: pulumi.Input<string>;
/**
* Indicate the tags you have set for this domain name. You can set up to 10 tags.
*/
tags?: pulumi.Input<pulumi.Input<inputs.cdn.CdnDomainTag>[]>;
}
/**
* The set of arguments for constructing a CdnDomain resource.
*/
export interface CdnDomainArgs {
/**
* You need to add a domain. The main account can add up to 200 accelerated domains.
*/
domain: pulumi.Input<string>;
/**
* Accelerate domain configuration. Please convert the configuration module structure into json and pass it into a string. You must specify the Origin module. The OriginProtocol parameter, OriginHost parameter, and other domain configuration modules are optional.
*/
domainConfig: pulumi.Input<string>;
/**
* The project to which this domain name belongs. Default is `default`.
*/
project?: pulumi.Input<string>;
/**
* Indicates the acceleration area. The parameter can take the following values: `chineseMainland`: Indicates mainland China. `global`: Indicates global. `outsideChineseMainland`: Indicates global (excluding mainland China).
*/
serviceRegion?: pulumi.Input<string>;
/**
* The business type of the domain name is indicated by this parameter. The possible values are: `download`: for file downloads. `web`: for web pages. `video`: for audio and video on demand.
*/
serviceType: pulumi.Input<string>;
/**
* Configuration for sharing CNAME.
*/
sharedCname?: pulumi.Input<inputs.cdn.CdnDomainSharedCname>;
/**
* Indicate the tags you have set for this domain name. You can set up to 10 tags.
*/
tags?: pulumi.Input<pulumi.Input<inputs.cdn.CdnDomainTag>[]>;
}