Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine
volcengine.cdn.Configs
Explore with Pulumi AI
Use this data source to query detailed information of cdn configs
Example Usage
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooCdnCertificate = new Volcengine.Cdn.CdnCertificate("fooCdnCertificate", new()
{
Certificate = "",
PrivateKey = "",
Desc = "tftest",
Source = "cdn_cert_hosting",
});
var fooCdnDomain = new Volcengine.Cdn.CdnDomain("fooCdnDomain", new()
{
Domain = "tftest.byte-test.com",
ServiceType = "web",
Tags = new[]
{
new Volcengine.Cdn.Inputs.CdnDomainTagArgs
{
Key = "tfkey1",
Value = "tfvalue1",
},
new Volcengine.Cdn.Inputs.CdnDomainTagArgs
{
Key = "tfkey2",
Value = "tfvalue2",
},
},
DomainConfig = fooCdnCertificate.Id.Apply(id => JsonSerializer.Serialize(new Dictionary<string, object?>
{
["OriginProtocol"] = "https",
["Origin"] = new[]
{
new Dictionary<string, object?>
{
["OriginAction"] = new Dictionary<string, object?>
{
["OriginLines"] = new[]
{
new Dictionary<string, object?>
{
["Address"] = "1.1.1.1",
["HttpPort"] = "80",
["HttpsPort"] = "443",
["InstanceType"] = "ip",
["OriginType"] = "primary",
["PrivateBucketAccess"] = false,
["Weight"] = "2",
},
},
},
},
},
["HTTPS"] = new Dictionary<string, object?>
{
["CertInfo"] = new Dictionary<string, object?>
{
["CertId"] = id,
},
["DisableHttp"] = false,
["HTTP2"] = true,
["Switch"] = true,
["Ocsp"] = false,
["TlsVersion"] = new[]
{
"tlsv1.1",
"tlsv1.2",
},
},
})),
});
var fooConfigs = Volcengine.Cdn.Configs.Invoke(new()
{
Domain = fooCdnDomain.Id,
});
});
package main
import (
"encoding/json"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/cdn"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooCdnCertificate, err := cdn.NewCdnCertificate(ctx, "fooCdnCertificate", &cdn.CdnCertificateArgs{
Certificate: pulumi.String(""),
PrivateKey: pulumi.String(""),
Desc: pulumi.String("tftest"),
Source: pulumi.String("cdn_cert_hosting"),
})
if err != nil {
return err
}
fooCdnDomain, err := cdn.NewCdnDomain(ctx, "fooCdnDomain", &cdn.CdnDomainArgs{
Domain: pulumi.String("tftest.byte-test.com"),
ServiceType: pulumi.String("web"),
Tags: cdn.CdnDomainTagArray{
&cdn.CdnDomainTagArgs{
Key: pulumi.String("tfkey1"),
Value: pulumi.String("tfvalue1"),
},
&cdn.CdnDomainTagArgs{
Key: pulumi.String("tfkey2"),
Value: pulumi.String("tfvalue2"),
},
},
DomainConfig: fooCdnCertificate.ID().ApplyT(func(id string) (pulumi.String, error) {
var _zero pulumi.String
tmpJSON0, err := json.Marshal(map[string]interface{}{
"OriginProtocol": "https",
"Origin": []map[string]interface{}{
map[string]interface{}{
"OriginAction": map[string]interface{}{
"OriginLines": []map[string]interface{}{
map[string]interface{}{
"Address": "1.1.1.1",
"HttpPort": "80",
"HttpsPort": "443",
"InstanceType": "ip",
"OriginType": "primary",
"PrivateBucketAccess": false,
"Weight": "2",
},
},
},
},
},
"HTTPS": map[string]interface{}{
"CertInfo": map[string]interface{}{
"CertId": id,
},
"DisableHttp": false,
"HTTP2": true,
"Switch": true,
"Ocsp": false,
"TlsVersion": []string{
"tlsv1.1",
"tlsv1.2",
},
},
})
if err != nil {
return _zero, err
}
json0 := string(tmpJSON0)
return pulumi.String(json0), nil
}).(pulumi.StringOutput),
})
if err != nil {
return err
}
_ = cdn.ConfigsOutput(ctx, cdn.ConfigsOutputArgs{
Domain: fooCdnDomain.ID(),
}, nil)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.cdn.CdnCertificate;
import com.pulumi.volcengine.cdn.CdnCertificateArgs;
import com.pulumi.volcengine.cdn.CdnDomain;
import com.pulumi.volcengine.cdn.CdnDomainArgs;
import com.pulumi.volcengine.cdn.inputs.CdnDomainTagArgs;
import com.pulumi.volcengine.cdn.CdnFunctions;
import com.pulumi.volcengine.cdn.inputs.ConfigsArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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 fooCdnCertificate = new CdnCertificate("fooCdnCertificate", CdnCertificateArgs.builder()
.certificate("")
.privateKey("")
.desc("tftest")
.source("cdn_cert_hosting")
.build());
var fooCdnDomain = new CdnDomain("fooCdnDomain", CdnDomainArgs.builder()
.domain("tftest.byte-test.com")
.serviceType("web")
.tags(
CdnDomainTagArgs.builder()
.key("tfkey1")
.value("tfvalue1")
.build(),
CdnDomainTagArgs.builder()
.key("tfkey2")
.value("tfvalue2")
.build())
.domainConfig(fooCdnCertificate.id().applyValue(id -> serializeJson(
jsonObject(
jsonProperty("OriginProtocol", "https"),
jsonProperty("Origin", jsonArray(jsonObject(
jsonProperty("OriginAction", jsonObject(
jsonProperty("OriginLines", jsonArray(jsonObject(
jsonProperty("Address", "1.1.1.1"),
jsonProperty("HttpPort", "80"),
jsonProperty("HttpsPort", "443"),
jsonProperty("InstanceType", "ip"),
jsonProperty("OriginType", "primary"),
jsonProperty("PrivateBucketAccess", false),
jsonProperty("Weight", "2")
)))
))
))),
jsonProperty("HTTPS", jsonObject(
jsonProperty("CertInfo", jsonObject(
jsonProperty("CertId", id)
)),
jsonProperty("DisableHttp", false),
jsonProperty("HTTP2", true),
jsonProperty("Switch", true),
jsonProperty("Ocsp", false),
jsonProperty("TlsVersion", jsonArray(
"tlsv1.1",
"tlsv1.2"
))
))
))))
.build());
final var fooConfigs = CdnFunctions.Configs(ConfigsArgs.builder()
.domain(fooCdnDomain.id())
.build());
}
}
import pulumi
import json
import pulumi_volcengine as volcengine
foo_cdn_certificate = volcengine.cdn.CdnCertificate("fooCdnCertificate",
certificate="",
private_key="",
desc="tftest",
source="cdn_cert_hosting")
foo_cdn_domain = volcengine.cdn.CdnDomain("fooCdnDomain",
domain="tftest.byte-test.com",
service_type="web",
tags=[
volcengine.cdn.CdnDomainTagArgs(
key="tfkey1",
value="tfvalue1",
),
volcengine.cdn.CdnDomainTagArgs(
key="tfkey2",
value="tfvalue2",
),
],
domain_config=foo_cdn_certificate.id.apply(lambda id: json.dumps({
"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": id,
},
"DisableHttp": False,
"HTTP2": True,
"Switch": True,
"Ocsp": False,
"TlsVersion": [
"tlsv1.1",
"tlsv1.2",
],
},
})))
foo_configs = volcengine.cdn.configs_output(domain=foo_cdn_domain.id)
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
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: fooCdnCertificate.id.apply(id => JSON.stringify({
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: id,
},
DisableHttp: false,
HTTP2: true,
Switch: true,
Ocsp: false,
TlsVersion: [
"tlsv1.1",
"tlsv1.2",
],
},
})),
});
const fooConfigs = volcengine.cdn.ConfigsOutput({
domain: fooCdnDomain.id,
});
resources:
fooCdnCertificate:
type: volcengine:cdn:CdnCertificate
properties:
certificate:
privateKey:
desc: tftest
source: cdn_cert_hosting
fooCdnDomain:
type: volcengine:cdn:CdnDomain
properties:
domain: tftest.byte-test.com
serviceType: web
tags:
- key: tfkey1
value: tfvalue1
- key: tfkey2
value: tfvalue2
domainConfig:
fn::toJSON:
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
variables:
fooConfigs:
fn::invoke:
Function: volcengine:cdn:Configs
Arguments:
domain: ${fooCdnDomain.id}
Using Configs
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function configs(args: ConfigsArgs, opts?: InvokeOptions): Promise<ConfigsResult>
function configsOutput(args: ConfigsOutputArgs, opts?: InvokeOptions): Output<ConfigsResult>
def configs(domain: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> ConfigsResult
def configs_output(domain: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[ConfigsResult]
func Configs(ctx *Context, args *ConfigsArgs, opts ...InvokeOption) (*ConfigsResult, error)
func ConfigsOutput(ctx *Context, args *ConfigsOutputArgs, opts ...InvokeOption) ConfigsResultOutput
public static class Configs
{
public static Task<ConfigsResult> InvokeAsync(ConfigsArgs args, InvokeOptions? opts = null)
public static Output<ConfigsResult> Invoke(ConfigsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<ConfigsResult> configs(ConfigsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: volcengine:cdn:Configs
arguments:
# arguments dictionary
The following arguments are supported:
- Domain string
- The domain name.
- Output
File string - File name where to save data source results.
- Domain string
- The domain name.
- Output
File string - File name where to save data source results.
- domain String
- The domain name.
- output
File String - File name where to save data source results.
- domain string
- The domain name.
- output
File string - File name where to save data source results.
- domain str
- The domain name.
- output_
file str - File name where to save data source results.
- domain String
- The domain name.
- output
File String - File name where to save data source results.
Configs Result
The following output properties are available:
- Domain string
- The domain name.
- Domain
Configs List<ConfigsDomain Config> - The collection of query.
- Id string
- The provider-assigned unique ID for this managed resource.
- Total
Count int - The total count of query.
- Output
File string
- Domain string
- The domain name.
- Domain
Configs []ConfigsDomain Config - The collection of query.
- Id string
- The provider-assigned unique ID for this managed resource.
- Total
Count int - The total count of query.
- Output
File string
- domain String
- The domain name.
- domain
Configs List<ConfigsDomain Config> - The collection of query.
- id String
- The provider-assigned unique ID for this managed resource.
- total
Count Integer - The total count of query.
- output
File String
- domain string
- The domain name.
- domain
Configs ConfigsDomain Config[] - The collection of query.
- id string
- The provider-assigned unique ID for this managed resource.
- total
Count number - The total count of query.
- output
File string
- domain str
- The domain name.
- domain_
configs Sequence[ConfigsDomain Config] - The collection of query.
- id str
- The provider-assigned unique ID for this managed resource.
- total_
count int - The total count of query.
- output_
file str
- domain String
- The domain name.
- domain
Configs List<Property Map> - The collection of query.
- id String
- The provider-assigned unique ID for this managed resource.
- total
Count Number - The total count of query.
- output
File String
Supporting Types
ConfigsDomainConfig
- Cname string
- The cname of the domain.
- Create
Time int - The create time of the domain.
- Domain string
- The domain name.
- Lock
Status string - Indicates whether the configuration of this domain name is allowed to be changed.
- Project string
- The project name.
- Service
Region string - The service region of the domain.
- Service
Type string - The service type of the domain.
- Status string
- The status of the domain.
- Update
Time int - The update time of the domain.
- Cname string
- The cname of the domain.
- Create
Time int - The create time of the domain.
- Domain string
- The domain name.
- Lock
Status string - Indicates whether the configuration of this domain name is allowed to be changed.
- Project string
- The project name.
- Service
Region string - The service region of the domain.
- Service
Type string - The service type of the domain.
- Status string
- The status of the domain.
- Update
Time int - The update time of the domain.
- cname String
- The cname of the domain.
- create
Time Integer - The create time of the domain.
- domain String
- The domain name.
- lock
Status String - Indicates whether the configuration of this domain name is allowed to be changed.
- project String
- The project name.
- service
Region String - The service region of the domain.
- service
Type String - The service type of the domain.
- status String
- The status of the domain.
- update
Time Integer - The update time of the domain.
- cname string
- The cname of the domain.
- create
Time number - The create time of the domain.
- domain string
- The domain name.
- lock
Status string - Indicates whether the configuration of this domain name is allowed to be changed.
- project string
- The project name.
- service
Region string - The service region of the domain.
- service
Type string - The service type of the domain.
- status string
- The status of the domain.
- update
Time number - The update time of the domain.
- cname str
- The cname of the domain.
- create_
time int - The create time of the domain.
- domain str
- The domain name.
- lock_
status str - Indicates whether the configuration of this domain name is allowed to be changed.
- project str
- The project name.
- service_
region str - The service region of the domain.
- service_
type str - The service type of the domain.
- status str
- The status of the domain.
- update_
time int - The update time of the domain.
- cname String
- The cname of the domain.
- create
Time Number - The create time of the domain.
- domain String
- The domain name.
- lock
Status String - Indicates whether the configuration of this domain name is allowed to be changed.
- project String
- The project name.
- service
Region String - The service region of the domain.
- service
Type String - The service type of the domain.
- status String
- The status of the domain.
- update
Time Number - The update time of the domain.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.