AccessLogArgs

data class AccessLogArgs(val acceleratorId: Output<String>? = null, val endpointGroupId: Output<String>? = null, val listenerId: Output<String>? = null, val slsLogStoreName: Output<String>? = null, val slsProjectName: Output<String>? = null, val slsRegionId: Output<String>? = null) : ConvertibleToJava<AccessLogArgs>

Provides a Global Accelerator (GA) Access Log resource. For information about Global Accelerator (GA) Access Log and how to use it, see What is Access Log.

NOTE: Available since v1.187.0.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.random.RandomInteger;
import com.pulumi.random.RandomIntegerArgs;
import com.pulumi.alicloud.log.Project;
import com.pulumi.alicloud.log.Store;
import com.pulumi.alicloud.log.StoreArgs;
import com.pulumi.alicloud.ga.Accelerator;
import com.pulumi.alicloud.ga.AcceleratorArgs;
import com.pulumi.alicloud.ga.BandwidthPackage;
import com.pulumi.alicloud.ga.BandwidthPackageArgs;
import com.pulumi.alicloud.ga.BandwidthPackageAttachment;
import com.pulumi.alicloud.ga.BandwidthPackageAttachmentArgs;
import com.pulumi.alicloud.ga.Listener;
import com.pulumi.alicloud.ga.ListenerArgs;
import com.pulumi.alicloud.ga.inputs.ListenerPortRangeArgs;
import com.pulumi.alicloud.ecs.EipAddress;
import com.pulumi.alicloud.ecs.EipAddressArgs;
import com.pulumi.alicloud.ga.EndpointGroup;
import com.pulumi.alicloud.ga.EndpointGroupArgs;
import com.pulumi.alicloud.ga.inputs.EndpointGroupEndpointConfigurationArgs;
import com.pulumi.alicloud.ga.AccessLog;
import com.pulumi.alicloud.ga.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) {
final var config = ctx.config();
final var region = config.get("region").orElse("cn-hangzhou");
var defaultRandomInteger = new RandomInteger("defaultRandomInteger", RandomIntegerArgs.builder()
.max(99999)
.min(10000)
.build());
var defaultProject = new Project("defaultProject");
var defaultStore = new Store("defaultStore", StoreArgs.builder()
.project(defaultProject.name())
.build());
var defaultAccelerator = new Accelerator("defaultAccelerator", AcceleratorArgs.builder()
.duration(1)
.autoUseCoupon(true)
.spec("2")
.build());
var defaultBandwidthPackage = new BandwidthPackage("defaultBandwidthPackage", BandwidthPackageArgs.builder()
.bandwidth(100)
.type("Basic")
.bandwidthType("Basic")
.paymentType("PayAsYouGo")
.billingType("PayBy95")
.ratio(30)
.build());
var defaultBandwidthPackageAttachment = new BandwidthPackageAttachment("defaultBandwidthPackageAttachment", BandwidthPackageAttachmentArgs.builder()
.acceleratorId(defaultAccelerator.id())
.bandwidthPackageId(defaultBandwidthPackage.id())
.build());
var defaultListener = new Listener("defaultListener", ListenerArgs.builder()
.acceleratorId(defaultBandwidthPackageAttachment.acceleratorId())
.clientAffinity("SOURCE_IP")
.protocol("HTTP")
.portRanges(ListenerPortRangeArgs.builder()
.fromPort(70)
.toPort(70)
.build())
.build());
var defaultEipAddress = new EipAddress("defaultEipAddress", EipAddressArgs.builder()
.bandwidth("10")
.internetChargeType("PayByBandwidth")
.addressName("terraform-example")
.build());
var defaultEndpointGroup = new EndpointGroup("defaultEndpointGroup", EndpointGroupArgs.builder()
.acceleratorId(defaultListener.acceleratorId())
.endpointConfigurations(EndpointGroupEndpointConfigurationArgs.builder()
.endpoint(defaultEipAddress.ipAddress())
.type("PublicIp")
.weight(20)
.build())
.endpointGroupRegion(region)
.listenerId(defaultListener.id())
.build());
var defaultAccessLog = new AccessLog("defaultAccessLog", AccessLogArgs.builder()
.acceleratorId(defaultAccelerator.id())
.listenerId(defaultListener.id())
.endpointGroupId(defaultEndpointGroup.id())
.slsProjectName(defaultProject.name())
.slsLogStoreName(defaultStore.name())
.slsRegionId(region)
.build());
}
}

Import

Global Accelerator (GA) Access Log can be imported using the id, e.g.

$ pulumi import alicloud:ga/accessLog:AccessLog example <accelerator_id>:<listener_id>:<endpoint_group_id>

Constructors

Link copied to clipboard
fun AccessLogArgs(acceleratorId: Output<String>? = null, endpointGroupId: Output<String>? = null, listenerId: Output<String>? = null, slsLogStoreName: Output<String>? = null, slsProjectName: Output<String>? = null, slsRegionId: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): AccessLogArgs

Properties

Link copied to clipboard
val acceleratorId: Output<String>? = null

The ID of the global acceleration instance.

Link copied to clipboard
val endpointGroupId: Output<String>? = null

The ID of the endpoint group instance.

Link copied to clipboard
val listenerId: Output<String>? = null

The ID of the listener.

Link copied to clipboard
val slsLogStoreName: Output<String>? = null

The name of the Log Store.

Link copied to clipboard
val slsProjectName: Output<String>? = null

The name of the Log Service project.

Link copied to clipboard
val slsRegionId: Output<String>? = null

The region ID of the Log Service project.