Provides a resource to manage access log
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
// Enable CLB Access Log (TOS Bucket)
const tosExample = new volcengine.clb.AccessLog("tosExample", {
bucketName: "tos-bucket",
loadBalancerId: "clb-13g5i2cbg6nsw3n6nu5r*****",
});
// Enable CLB Access Log (TLS)
const tlsExample = new volcengine.clb.AccessLog("tlsExample", {
deliveryType: "tls",
loadBalancerId: "clb-13g5i2cbg6nsw3n6nu5r*****",
tlsProjectId: "d8c6e4c2-8d22-****-****-9811f2067580",
tlsTopicId: "081aa4ff-991b-****-****-5d573dcf4ba4",
});
import pulumi
import pulumi_volcengine as volcengine
# Enable CLB Access Log (TOS Bucket)
tos_example = volcengine.clb.AccessLog("tosExample",
bucket_name="tos-bucket",
load_balancer_id="clb-13g5i2cbg6nsw3n6nu5r*****")
# Enable CLB Access Log (TLS)
tls_example = volcengine.clb.AccessLog("tlsExample",
delivery_type="tls",
load_balancer_id="clb-13g5i2cbg6nsw3n6nu5r*****",
tls_project_id="d8c6e4c2-8d22-****-****-9811f2067580",
tls_topic_id="081aa4ff-991b-****-****-5d573dcf4ba4")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/clb"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Enable CLB Access Log (TOS Bucket)
_, err := clb.NewAccessLog(ctx, "tosExample", &clb.AccessLogArgs{
BucketName: pulumi.String("tos-bucket"),
LoadBalancerId: pulumi.String("clb-13g5i2cbg6nsw3n6nu5r*****"),
})
if err != nil {
return err
}
// Enable CLB Access Log (TLS)
_, err = clb.NewAccessLog(ctx, "tlsExample", &clb.AccessLogArgs{
DeliveryType: pulumi.String("tls"),
LoadBalancerId: pulumi.String("clb-13g5i2cbg6nsw3n6nu5r*****"),
TlsProjectId: pulumi.String("d8c6e4c2-8d22-****-****-9811f2067580"),
TlsTopicId: pulumi.String("081aa4ff-991b-****-****-5d573dcf4ba4"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
// Enable CLB Access Log (TOS Bucket)
var tosExample = new Volcengine.Clb.AccessLog("tosExample", new()
{
BucketName = "tos-bucket",
LoadBalancerId = "clb-13g5i2cbg6nsw3n6nu5r*****",
});
// Enable CLB Access Log (TLS)
var tlsExample = new Volcengine.Clb.AccessLog("tlsExample", new()
{
DeliveryType = "tls",
LoadBalancerId = "clb-13g5i2cbg6nsw3n6nu5r*****",
TlsProjectId = "d8c6e4c2-8d22-****-****-9811f2067580",
TlsTopicId = "081aa4ff-991b-****-****-5d573dcf4ba4",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.clb.AccessLog;
import com.pulumi.volcengine.clb.AccessLogArgs;
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) {
// Enable CLB Access Log (TOS Bucket)
var tosExample = new AccessLog("tosExample", AccessLogArgs.builder()
.bucketName("tos-bucket")
.loadBalancerId("clb-13g5i2cbg6nsw3n6nu5r*****")
.build());
// Enable CLB Access Log (TLS)
var tlsExample = new AccessLog("tlsExample", AccessLogArgs.builder()
.deliveryType("tls")
.loadBalancerId("clb-13g5i2cbg6nsw3n6nu5r*****")
.tlsProjectId("d8c6e4c2-8d22-****-****-9811f2067580")
.tlsTopicId("081aa4ff-991b-****-****-5d573dcf4ba4")
.build());
}
}
resources:
# Enable CLB Access Log (TOS Bucket)
tosExample:
type: volcengine:clb:AccessLog
properties:
bucketName: tos-bucket
loadBalancerId: clb-13g5i2cbg6nsw3n6nu5r*****
# Enable CLB Access Log (TLS)
tlsExample:
type: volcengine:clb:AccessLog
properties:
deliveryType: tls
loadBalancerId: clb-13g5i2cbg6nsw3n6nu5r*****
tlsProjectId: d8c6e4c2-8d22-****-****-9811f2067580
tlsTopicId: 081aa4ff-991b-****-****-5d573dcf4ba4
Create AccessLog Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AccessLog(name: string, args: AccessLogArgs, opts?: CustomResourceOptions);@overload
def AccessLog(resource_name: str,
args: AccessLogArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AccessLog(resource_name: str,
opts: Optional[ResourceOptions] = None,
load_balancer_id: Optional[str] = None,
bucket_name: Optional[str] = None,
delivery_type: Optional[str] = None,
tls_project_id: Optional[str] = None,
tls_topic_id: Optional[str] = None)func NewAccessLog(ctx *Context, name string, args AccessLogArgs, opts ...ResourceOption) (*AccessLog, error)public AccessLog(string name, AccessLogArgs args, CustomResourceOptions? opts = null)
public AccessLog(String name, AccessLogArgs args)
public AccessLog(String name, AccessLogArgs args, CustomResourceOptions options)
type: volcengine:clb:AccessLog
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 AccessLogArgs
- 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 AccessLogArgs
- 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 AccessLogArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AccessLogArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AccessLogArgs
- 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 volcengineAccessLogResource = new Volcengine.Clb.AccessLog("volcengineAccessLogResource", new()
{
LoadBalancerId = "string",
BucketName = "string",
DeliveryType = "string",
TlsProjectId = "string",
TlsTopicId = "string",
});
example, err := clb.NewAccessLog(ctx, "volcengineAccessLogResource", &clb.AccessLogArgs{
LoadBalancerId: pulumi.String("string"),
BucketName: pulumi.String("string"),
DeliveryType: pulumi.String("string"),
TlsProjectId: pulumi.String("string"),
TlsTopicId: pulumi.String("string"),
})
var volcengineAccessLogResource = new com.pulumi.volcengine.clb.AccessLog("volcengineAccessLogResource", com.pulumi.volcengine.clb.AccessLogArgs.builder()
.loadBalancerId("string")
.bucketName("string")
.deliveryType("string")
.tlsProjectId("string")
.tlsTopicId("string")
.build());
volcengine_access_log_resource = volcengine.clb.AccessLog("volcengineAccessLogResource",
load_balancer_id="string",
bucket_name="string",
delivery_type="string",
tls_project_id="string",
tls_topic_id="string")
const volcengineAccessLogResource = new volcengine.clb.AccessLog("volcengineAccessLogResource", {
loadBalancerId: "string",
bucketName: "string",
deliveryType: "string",
tlsProjectId: "string",
tlsTopicId: "string",
});
type: volcengine:clb:AccessLog
properties:
bucketName: string
deliveryType: string
loadBalancerId: string
tlsProjectId: string
tlsTopicId: string
AccessLog 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 AccessLog resource accepts the following input properties:
- Load
Balancer stringId - The ID of the CLB instance.
- Bucket
Name string - The name of the TOS bucket for storing access logs. Required when delivery_type is 'tos'.
- Delivery
Type string - The type of log delivery. Valid values: 'tos', 'tls'. Default: 'tos'.
- Tls
Project stringId - The ID of the TLS project. Required when delivery_type is 'tls'.
- Tls
Topic stringId - The ID of the TLS topic. Required when delivery_type is 'tls'.
- Load
Balancer stringId - The ID of the CLB instance.
- Bucket
Name string - The name of the TOS bucket for storing access logs. Required when delivery_type is 'tos'.
- Delivery
Type string - The type of log delivery. Valid values: 'tos', 'tls'. Default: 'tos'.
- Tls
Project stringId - The ID of the TLS project. Required when delivery_type is 'tls'.
- Tls
Topic stringId - The ID of the TLS topic. Required when delivery_type is 'tls'.
- load
Balancer StringId - The ID of the CLB instance.
- bucket
Name String - The name of the TOS bucket for storing access logs. Required when delivery_type is 'tos'.
- delivery
Type String - The type of log delivery. Valid values: 'tos', 'tls'. Default: 'tos'.
- tls
Project StringId - The ID of the TLS project. Required when delivery_type is 'tls'.
- tls
Topic StringId - The ID of the TLS topic. Required when delivery_type is 'tls'.
- load
Balancer stringId - The ID of the CLB instance.
- bucket
Name string - The name of the TOS bucket for storing access logs. Required when delivery_type is 'tos'.
- delivery
Type string - The type of log delivery. Valid values: 'tos', 'tls'. Default: 'tos'.
- tls
Project stringId - The ID of the TLS project. Required when delivery_type is 'tls'.
- tls
Topic stringId - The ID of the TLS topic. Required when delivery_type is 'tls'.
- load_
balancer_ strid - The ID of the CLB instance.
- bucket_
name str - The name of the TOS bucket for storing access logs. Required when delivery_type is 'tos'.
- delivery_
type str - The type of log delivery. Valid values: 'tos', 'tls'. Default: 'tos'.
- tls_
project_ strid - The ID of the TLS project. Required when delivery_type is 'tls'.
- tls_
topic_ strid - The ID of the TLS topic. Required when delivery_type is 'tls'.
- load
Balancer StringId - The ID of the CLB instance.
- bucket
Name String - The name of the TOS bucket for storing access logs. Required when delivery_type is 'tos'.
- delivery
Type String - The type of log delivery. Valid values: 'tos', 'tls'. Default: 'tos'.
- tls
Project StringId - The ID of the TLS project. Required when delivery_type is 'tls'.
- tls
Topic StringId - The ID of the TLS topic. Required when delivery_type is 'tls'.
Outputs
All input properties are implicitly available as output properties. Additionally, the AccessLog 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 AccessLog Resource
Get an existing AccessLog 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?: AccessLogState, opts?: CustomResourceOptions): AccessLog@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bucket_name: Optional[str] = None,
delivery_type: Optional[str] = None,
load_balancer_id: Optional[str] = None,
tls_project_id: Optional[str] = None,
tls_topic_id: Optional[str] = None) -> AccessLogfunc GetAccessLog(ctx *Context, name string, id IDInput, state *AccessLogState, opts ...ResourceOption) (*AccessLog, error)public static AccessLog Get(string name, Input<string> id, AccessLogState? state, CustomResourceOptions? opts = null)public static AccessLog get(String name, Output<String> id, AccessLogState state, CustomResourceOptions options)resources: _: type: volcengine:clb:AccessLog 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 for storing access logs. Required when delivery_type is 'tos'.
- Delivery
Type string - The type of log delivery. Valid values: 'tos', 'tls'. Default: 'tos'.
- Load
Balancer stringId - The ID of the CLB instance.
- Tls
Project stringId - The ID of the TLS project. Required when delivery_type is 'tls'.
- Tls
Topic stringId - The ID of the TLS topic. Required when delivery_type is 'tls'.
- Bucket
Name string - The name of the TOS bucket for storing access logs. Required when delivery_type is 'tos'.
- Delivery
Type string - The type of log delivery. Valid values: 'tos', 'tls'. Default: 'tos'.
- Load
Balancer stringId - The ID of the CLB instance.
- Tls
Project stringId - The ID of the TLS project. Required when delivery_type is 'tls'.
- Tls
Topic stringId - The ID of the TLS topic. Required when delivery_type is 'tls'.
- bucket
Name String - The name of the TOS bucket for storing access logs. Required when delivery_type is 'tos'.
- delivery
Type String - The type of log delivery. Valid values: 'tos', 'tls'. Default: 'tos'.
- load
Balancer StringId - The ID of the CLB instance.
- tls
Project StringId - The ID of the TLS project. Required when delivery_type is 'tls'.
- tls
Topic StringId - The ID of the TLS topic. Required when delivery_type is 'tls'.
- bucket
Name string - The name of the TOS bucket for storing access logs. Required when delivery_type is 'tos'.
- delivery
Type string - The type of log delivery. Valid values: 'tos', 'tls'. Default: 'tos'.
- load
Balancer stringId - The ID of the CLB instance.
- tls
Project stringId - The ID of the TLS project. Required when delivery_type is 'tls'.
- tls
Topic stringId - The ID of the TLS topic. Required when delivery_type is 'tls'.
- bucket_
name str - The name of the TOS bucket for storing access logs. Required when delivery_type is 'tos'.
- delivery_
type str - The type of log delivery. Valid values: 'tos', 'tls'. Default: 'tos'.
- load_
balancer_ strid - The ID of the CLB instance.
- tls_
project_ strid - The ID of the TLS project. Required when delivery_type is 'tls'.
- tls_
topic_ strid - The ID of the TLS topic. Required when delivery_type is 'tls'.
- bucket
Name String - The name of the TOS bucket for storing access logs. Required when delivery_type is 'tos'.
- delivery
Type String - The type of log delivery. Valid values: 'tos', 'tls'. Default: 'tos'.
- load
Balancer StringId - The ID of the CLB instance.
- tls
Project StringId - The ID of the TLS project. Required when delivery_type is 'tls'.
- tls
Topic StringId - The ID of the TLS topic. Required when delivery_type is 'tls'.
Import
The AccessLog is not support import.
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.
