Provides a resource to manage tos bucket customdomain
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
// Create a custom domain for TOS bucket
const _default = new volcengine.tos.BucketCustomdomain("default", {
bucketName: "tflyb7",
customDomainRules: [{
domain: "www.163.com",
protocol: "tos",
}],
});
const default1 = new volcengine.tos.BucketCustomdomain("default1", {
bucketName: "tflyb7",
customDomainRules: [{
domain: "www.2345.com",
protocol: "tos",
}],
});
import pulumi
import pulumi_volcengine as volcengine
# Create a custom domain for TOS bucket
default = volcengine.tos.BucketCustomdomain("default",
bucket_name="tflyb7",
custom_domain_rules=[volcengine.tos.BucketCustomdomainCustomDomainRuleArgs(
domain="www.163.com",
protocol="tos",
)])
default1 = volcengine.tos.BucketCustomdomain("default1",
bucket_name="tflyb7",
custom_domain_rules=[volcengine.tos.BucketCustomdomainCustomDomainRuleArgs(
domain="www.2345.com",
protocol="tos",
)])
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/tos"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a custom domain for TOS bucket
_, err := tos.NewBucketCustomdomain(ctx, "default", &tos.BucketCustomdomainArgs{
BucketName: pulumi.String("tflyb7"),
CustomDomainRules: tos.BucketCustomdomainCustomDomainRuleArray{
&tos.BucketCustomdomainCustomDomainRuleArgs{
Domain: pulumi.String("www.163.com"),
Protocol: pulumi.String("tos"),
},
},
})
if err != nil {
return err
}
_, err = tos.NewBucketCustomdomain(ctx, "default1", &tos.BucketCustomdomainArgs{
BucketName: pulumi.String("tflyb7"),
CustomDomainRules: tos.BucketCustomdomainCustomDomainRuleArray{
&tos.BucketCustomdomainCustomDomainRuleArgs{
Domain: pulumi.String("www.2345.com"),
Protocol: pulumi.String("tos"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
// Create a custom domain for TOS bucket
var @default = new Volcengine.Tos.BucketCustomdomain("default", new()
{
BucketName = "tflyb7",
CustomDomainRules = new[]
{
new Volcengine.Tos.Inputs.BucketCustomdomainCustomDomainRuleArgs
{
Domain = "www.163.com",
Protocol = "tos",
},
},
});
var default1 = new Volcengine.Tos.BucketCustomdomain("default1", new()
{
BucketName = "tflyb7",
CustomDomainRules = new[]
{
new Volcengine.Tos.Inputs.BucketCustomdomainCustomDomainRuleArgs
{
Domain = "www.2345.com",
Protocol = "tos",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.tos.BucketCustomdomain;
import com.pulumi.volcengine.tos.BucketCustomdomainArgs;
import com.pulumi.volcengine.tos.inputs.BucketCustomdomainCustomDomainRuleArgs;
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) {
// Create a custom domain for TOS bucket
var default_ = new BucketCustomdomain("default", BucketCustomdomainArgs.builder()
.bucketName("tflyb7")
.customDomainRules(BucketCustomdomainCustomDomainRuleArgs.builder()
.domain("www.163.com")
.protocol("tos")
.build())
.build());
var default1 = new BucketCustomdomain("default1", BucketCustomdomainArgs.builder()
.bucketName("tflyb7")
.customDomainRules(BucketCustomdomainCustomDomainRuleArgs.builder()
.domain("www.2345.com")
.protocol("tos")
.build())
.build());
}
}
resources:
# Create a custom domain for TOS bucket
default:
type: volcengine:tos:BucketCustomdomain
properties:
bucketName: tflyb7
customDomainRules:
- domain: www.163.com
protocol: tos
default1:
type: volcengine:tos:BucketCustomdomain
properties:
bucketName: tflyb7
customDomainRules:
- domain: www.2345.com
protocol: tos
Create BucketCustomdomain Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new BucketCustomdomain(name: string, args: BucketCustomdomainArgs, opts?: CustomResourceOptions);@overload
def BucketCustomdomain(resource_name: str,
args: BucketCustomdomainArgs,
opts: Optional[ResourceOptions] = None)
@overload
def BucketCustomdomain(resource_name: str,
opts: Optional[ResourceOptions] = None,
bucket_name: Optional[str] = None,
custom_domain_rules: Optional[Sequence[BucketCustomdomainCustomDomainRuleArgs]] = None)func NewBucketCustomdomain(ctx *Context, name string, args BucketCustomdomainArgs, opts ...ResourceOption) (*BucketCustomdomain, error)public BucketCustomdomain(string name, BucketCustomdomainArgs args, CustomResourceOptions? opts = null)
public BucketCustomdomain(String name, BucketCustomdomainArgs args)
public BucketCustomdomain(String name, BucketCustomdomainArgs args, CustomResourceOptions options)
type: volcengine:tos:BucketCustomdomain
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args BucketCustomdomainArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args BucketCustomdomainArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args BucketCustomdomainArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BucketCustomdomainArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BucketCustomdomainArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var bucketCustomdomainResource = new Volcengine.Tos.BucketCustomdomain("bucketCustomdomainResource", new()
{
BucketName = "string",
CustomDomainRules = new[]
{
new Volcengine.Tos.Inputs.BucketCustomdomainCustomDomainRuleArgs
{
Domain = "string",
CertId = "string",
Protocol = "string",
},
},
});
example, err := tos.NewBucketCustomdomain(ctx, "bucketCustomdomainResource", &tos.BucketCustomdomainArgs{
BucketName: pulumi.String("string"),
CustomDomainRules: tos.BucketCustomdomainCustomDomainRuleArray{
&tos.BucketCustomdomainCustomDomainRuleArgs{
Domain: pulumi.String("string"),
CertId: pulumi.String("string"),
Protocol: pulumi.String("string"),
},
},
})
var bucketCustomdomainResource = new BucketCustomdomain("bucketCustomdomainResource", BucketCustomdomainArgs.builder()
.bucketName("string")
.customDomainRules(BucketCustomdomainCustomDomainRuleArgs.builder()
.domain("string")
.certId("string")
.protocol("string")
.build())
.build());
bucket_customdomain_resource = volcengine.tos.BucketCustomdomain("bucketCustomdomainResource",
bucket_name="string",
custom_domain_rules=[{
"domain": "string",
"cert_id": "string",
"protocol": "string",
}])
const bucketCustomdomainResource = new volcengine.tos.BucketCustomdomain("bucketCustomdomainResource", {
bucketName: "string",
customDomainRules: [{
domain: "string",
certId: "string",
protocol: "string",
}],
});
type: volcengine:tos:BucketCustomdomain
properties:
bucketName: string
customDomainRules:
- certId: string
domain: string
protocol: string
BucketCustomdomain Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The BucketCustomdomain resource accepts the following input properties:
- Bucket
Name string - The name of the TOS bucket.
- Custom
Domain List<BucketRules Customdomain Custom Domain Rule> - The custom domain role for the bucket.
- Bucket
Name string - The name of the TOS bucket.
- Custom
Domain []BucketRules Customdomain Custom Domain Rule Args - The custom domain role for the bucket.
- bucket
Name String - The name of the TOS bucket.
- custom
Domain List<BucketRules Customdomain Custom Domain Rule> - The custom domain role for the bucket.
- bucket
Name string - The name of the TOS bucket.
- custom
Domain BucketRules Customdomain Custom Domain Rule[] - The custom domain role for the bucket.
- bucket_
name str - The name of the TOS bucket.
- custom_
domain_ Sequence[Bucketrules Customdomain Custom Domain Rule Args] - The custom domain role for the bucket.
- bucket
Name String - The name of the TOS bucket.
- custom
Domain List<Property Map>Rules - The custom domain role for the bucket.
Outputs
All input properties are implicitly available as output properties. Additionally, the BucketCustomdomain resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing BucketCustomdomain Resource
Get an existing BucketCustomdomain resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: BucketCustomdomainState, opts?: CustomResourceOptions): BucketCustomdomain@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bucket_name: Optional[str] = None,
custom_domain_rules: Optional[Sequence[BucketCustomdomainCustomDomainRuleArgs]] = None) -> BucketCustomdomainfunc GetBucketCustomdomain(ctx *Context, name string, id IDInput, state *BucketCustomdomainState, opts ...ResourceOption) (*BucketCustomdomain, error)public static BucketCustomdomain Get(string name, Input<string> id, BucketCustomdomainState? state, CustomResourceOptions? opts = null)public static BucketCustomdomain get(String name, Output<String> id, BucketCustomdomainState state, CustomResourceOptions options)resources: _: type: volcengine:tos:BucketCustomdomain get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Bucket
Name string - The name of the TOS bucket.
- Custom
Domain List<BucketRules Customdomain Custom Domain Rule> - The custom domain role for the bucket.
- Bucket
Name string - The name of the TOS bucket.
- Custom
Domain []BucketRules Customdomain Custom Domain Rule Args - The custom domain role for the bucket.
- bucket
Name String - The name of the TOS bucket.
- custom
Domain List<BucketRules Customdomain Custom Domain Rule> - The custom domain role for the bucket.
- bucket
Name string - The name of the TOS bucket.
- custom
Domain BucketRules Customdomain Custom Domain Rule[] - The custom domain role for the bucket.
- bucket_
name str - The name of the TOS bucket.
- custom_
domain_ Sequence[Bucketrules Customdomain Custom Domain Rule Args] - The custom domain role for the bucket.
- bucket
Name String - The name of the TOS bucket.
- custom
Domain List<Property Map>Rules - The custom domain role for the bucket.
Supporting Types
BucketCustomdomainCustomDomainRule, BucketCustomdomainCustomDomainRuleArgs
Import
TosBucketCustomDomain can be imported using the bucketName:domain, e.g.
$ pulumi import volcengine:tos/bucketCustomdomain:BucketCustomdomain default bucket_name:custom_domain
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengineTerraform Provider.
