DeliveryArgs

data class DeliveryArgs(val configurationItemChangeNotification: Output<Boolean>? = null, val configurationSnapshot: Output<Boolean>? = null, val deliveryChannelCondition: Output<String>? = null, val deliveryChannelName: Output<String>? = null, val deliveryChannelTargetArn: Output<String>? = null, val deliveryChannelType: Output<String>? = null, val description: Output<String>? = null, val nonCompliantNotification: Output<Boolean>? = null, val oversizedDataOssTargetArn: Output<String>? = null, val status: Output<Int>? = null) : ConvertibleToJava<DeliveryArgs>

Provides a Cloud Config Delivery resource. For information about Cloud Config Delivery and how to use it, see What is Delivery.

NOTE: Available since v1.171.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "tf-example-sls";
const this = alicloud.getAccount({});
const thisGetRegions = alicloud.getRegions({
current: true,
});
const _default = new alicloud.log.Project("default", {name: name});
const defaultStore = new alicloud.log.Store("default", {
name: name,
project: _default.name,
});
const defaultDelivery = new alicloud.cfg.Delivery("default", {
configurationItemChangeNotification: true,
nonCompliantNotification: true,
deliveryChannelName: name,
deliveryChannelTargetArn: pulumi.all([thisGetRegions, _this, _default&#46;name, defaultStore&#46;name])&#46;apply(([thisGetRegions, _this, defaultName, defaultStoreName]) => `acs:log:${thisGetRegions&#46;ids?&#46;[0]}:${_this.id}:project/${defaultName}/logstore/${defaultStoreName}`),
deliveryChannelType: "SLS",
description: name,
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tf-example-sls"
this = alicloud.get_account()
this_get_regions = alicloud.get_regions(current=True)
default = alicloud.log.Project("default", name=name)
default_store = alicloud.log.Store("default",
name=name,
project=default.name)
default_delivery = alicloud.cfg.Delivery("default",
configuration_item_change_notification=True,
non_compliant_notification=True,
delivery_channel_name=name,
delivery_channel_target_arn=pulumi.Output.all(default.name, default_store.name).apply(lambda defaultName, defaultStoreName: f"acs:log:{this_get_regions.ids[0]}:{this.id}:project/{default_name}/logstore/{default_store_name}"),
delivery_channel_type="SLS",
description=name)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "tf-example-sls";
var @this = AliCloud.GetAccount.Invoke();
var thisGetRegions = AliCloud.GetRegions.Invoke(new()
{
Current = true,
});
var @default = new AliCloud.Log.Project("default", new()
{
Name = name,
});
var defaultStore = new AliCloud.Log.Store("default", new()
{
Name = name,
Project = @default.Name,
});
var defaultDelivery = new AliCloud.Cfg.Delivery("default", new()
{
ConfigurationItemChangeNotification = true,
NonCompliantNotification = true,
DeliveryChannelName = name,
DeliveryChannelTargetArn = Output.Tuple(thisGetRegions, @this, @default.Name, defaultStore.Name).Apply(values =>
{
var thisGetRegions = values.Item1;
var @this = values.Item2;
var defaultName = values.Item3;
var defaultStoreName = values.Item4;
return $"acs:log:{thisGetRegions.Apply(getRegionsResult => getRegionsResult.Ids[0])}:{@this.Apply(getAccountResult => getAccountResult.Id)}:project/{defaultName}/logstore/{defaultStoreName}";
}),
DeliveryChannelType = "SLS",
Description = name,
});
});
package main
import (
"fmt"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cfg"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/log"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "tf-example-sls"
if param := cfg.Get("name"); param != "" {
name = param
}
this, err := alicloud.GetAccount(ctx, nil, nil)
if err != nil {
return err
}
thisGetRegions, err := alicloud.GetRegions(ctx, &alicloud.GetRegionsArgs{
Current: pulumi.BoolRef(true),
}, nil)
if err != nil {
return err
}
_, err = log.NewProject(ctx, "default", &log.ProjectArgs{
Name: pulumi.String(name),
})
if err != nil {
return err
}
defaultStore, err := log.NewStore(ctx, "default", &log.StoreArgs{
Name: pulumi.String(name),
Project: _default.Name,
})
if err != nil {
return err
}
_, err = cfg.NewDelivery(ctx, "default", &cfg.DeliveryArgs{
ConfigurationItemChangeNotification: pulumi.Bool(true),
NonCompliantNotification: pulumi.Bool(true),
DeliveryChannelName: pulumi.String(name),
DeliveryChannelTargetArn: pulumi.All(_default.Name, defaultStore.Name).ApplyT(func(_args []interface{}) (string, error) {
defaultName := _args[0].(string)
defaultStoreName := _args[1].(string)
return fmt.Sprintf("acs:log:%v:%v:project/%v/logstore/%v", thisGetRegions.Ids[0], this.Id, defaultName, defaultStoreName), nil
}).(pulumi.StringOutput),
DeliveryChannelType: pulumi.String("SLS"),
Description: pulumi.String(name),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetRegionsArgs;
import com.pulumi.alicloud.log.Project;
import com.pulumi.alicloud.log.ProjectArgs;
import com.pulumi.alicloud.log.Store;
import com.pulumi.alicloud.log.StoreArgs;
import com.pulumi.alicloud.cfg.Delivery;
import com.pulumi.alicloud.cfg.DeliveryArgs;
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 name = config.get("name").orElse("tf-example-sls");
final var this = AlicloudFunctions.getAccount();
final var thisGetRegions = AlicloudFunctions.getRegions(GetRegionsArgs.builder()
.current(true)
.build());
var default_ = new Project("default", ProjectArgs.builder()
.name(name)
.build());
var defaultStore = new Store("defaultStore", StoreArgs.builder()
.name(name)
.project(default_.name())
.build());
var defaultDelivery = new Delivery("defaultDelivery", DeliveryArgs.builder()
.configurationItemChangeNotification(true)
.nonCompliantNotification(true)
.deliveryChannelName(name)
.deliveryChannelTargetArn(Output.tuple(default_.name(), defaultStore.name()).applyValue(values -> {
var defaultName = values.t1;
var defaultStoreName = values.t2;
return String.format("acs:log:%s:%s:project/%s/logstore/%s", thisGetRegions.applyValue(getRegionsResult -> getRegionsResult.ids()[0]),this_.id(),defaultName,defaultStoreName);
}))
.deliveryChannelType("SLS")
.description(name)
.build());
}
}
configuration:
name:
type: string
default: tf-example-sls
resources:
default:
type: alicloud:log:Project
properties:
name: ${name}
defaultStore:
type: alicloud:log:Store
name: default
properties:
name: ${name}
project: ${default.name}
defaultDelivery:
type: alicloud:cfg:Delivery
name: default
properties:
configurationItemChangeNotification: true
nonCompliantNotification: true
deliveryChannelName: ${name}
deliveryChannelTargetArn: acs:log:${thisGetRegions.ids[0]}:${this.id}:project/${default.name}/logstore/${defaultStore.name}
deliveryChannelType: SLS
description: ${name}
variables:
this:
fn::invoke:
Function: alicloud:getAccount
Arguments: {}
thisGetRegions:
fn::invoke:
Function: alicloud:getRegions
Arguments:
current: true

Import

Cloud Config Delivery can be imported using the id, e.g.

$ pulumi import alicloud:cfg/delivery:Delivery example <id>

Constructors

Link copied to clipboard
constructor(configurationItemChangeNotification: Output<Boolean>? = null, configurationSnapshot: Output<Boolean>? = null, deliveryChannelCondition: Output<String>? = null, deliveryChannelName: Output<String>? = null, deliveryChannelTargetArn: Output<String>? = null, deliveryChannelType: Output<String>? = null, description: Output<String>? = null, nonCompliantNotification: Output<Boolean>? = null, oversizedDataOssTargetArn: Output<String>? = null, status: Output<Int>? = null)

Properties

Link copied to clipboard

Open or close delivery configuration change history. true: open, false: close.

Link copied to clipboard
val configurationSnapshot: Output<Boolean>? = null

Open or close timed snapshot of shipping resources. NOTE: The attribute is valid when the attribute delivery_channel_type is OSS.

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

The rule attached to the delivery method. Please refer to api CreateConfigDeliveryChannel for example format. NOTE: The attribute is valid when the attribute delivery_channel_type is MNS.

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

The name of the delivery method.

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

The ARN of the delivery destination. The value must be in one of the following formats:

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

The type of the delivery method. Valid values: OSS: Object Storage, MNS: Message Service, SLS: Log Service.

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

The description of the delivery method.

Link copied to clipboard
val nonCompliantNotification: Output<Boolean>? = null

Open or close non-compliance events of delivery resources. NOTE: The attribute is valid when the attribute delivery_channel_type is SLS or MNS.

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

The oss ARN of the delivery channel when the value data oversized limit.

Link copied to clipboard
val status: Output<Int>? = null

The status of the delivery method. Valid values: 0: The delivery method is disabled. 1: The delivery destination is enabled. This is the default value.

Functions

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