com.pulumi.aws.cloudwatch.kotlin.EventEndpointArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.cloudwatch.kotlin
import com.pulumi.aws.cloudwatch.EventEndpointArgs.builder
import com.pulumi.aws.cloudwatch.kotlin.inputs.EventEndpointEventBusArgs
import com.pulumi.aws.cloudwatch.kotlin.inputs.EventEndpointEventBusArgsBuilder
import com.pulumi.aws.cloudwatch.kotlin.inputs.EventEndpointReplicationConfigArgs
import com.pulumi.aws.cloudwatch.kotlin.inputs.EventEndpointReplicationConfigArgsBuilder
import com.pulumi.aws.cloudwatch.kotlin.inputs.EventEndpointRoutingConfigArgs
import com.pulumi.aws.cloudwatch.kotlin.inputs.EventEndpointRoutingConfigArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Provides a resource to create an EventBridge Global Endpoint.
* > **Note:** EventBridge was formerly known as CloudWatch Events. The functionality is identical.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const _this = new aws.cloudwatch.EventEndpoint("this", {
* name: "global-endpoint",
* roleArn: replication.arn,
* eventBuses: [
* {
* eventBusArn: primary.arn,
* },
* {
* eventBusArn: secondary.arn,
* },
* ],
* replicationConfig: {
* state: "DISABLED",
* },
* routingConfig: {
* failoverConfig: {
* primary: {
* healthCheck: primaryAwsRoute53HealthCheck.arn,
* },
* secondary: {
* route: "us-east-2",
* },
* },
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* this = aws.cloudwatch.EventEndpoint("this",
* name="global-endpoint",
* role_arn=replication["arn"],
* event_buses=[
* {
* "event_bus_arn": primary["arn"],
* },
* {
* "event_bus_arn": secondary["arn"],
* },
* ],
* replication_config={
* "state": "DISABLED",
* },
* routing_config={
* "failover_config": {
* "primary": {
* "health_check": primary_aws_route53_health_check["arn"],
* },
* "secondary": {
* "route": "us-east-2",
* },
* },
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var @this = new Aws.CloudWatch.EventEndpoint("this", new()
* {
* Name = "global-endpoint",
* RoleArn = replication.Arn,
* EventBuses = new[]
* {
* new Aws.CloudWatch.Inputs.EventEndpointEventBusArgs
* {
* EventBusArn = primary.Arn,
* },
* new Aws.CloudWatch.Inputs.EventEndpointEventBusArgs
* {
* EventBusArn = secondary.Arn,
* },
* },
* ReplicationConfig = new Aws.CloudWatch.Inputs.EventEndpointReplicationConfigArgs
* {
* State = "DISABLED",
* },
* RoutingConfig = new Aws.CloudWatch.Inputs.EventEndpointRoutingConfigArgs
* {
* FailoverConfig = new Aws.CloudWatch.Inputs.EventEndpointRoutingConfigFailoverConfigArgs
* {
* Primary = new Aws.CloudWatch.Inputs.EventEndpointRoutingConfigFailoverConfigPrimaryArgs
* {
* HealthCheck = primaryAwsRoute53HealthCheck.Arn,
* },
* Secondary = new Aws.CloudWatch.Inputs.EventEndpointRoutingConfigFailoverConfigSecondaryArgs
* {
* Route = "us-east-2",
* },
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := cloudwatch.NewEventEndpoint(ctx, "this", &cloudwatch.EventEndpointArgs{
* Name: pulumi.String("global-endpoint"),
* RoleArn: pulumi.Any(replication.Arn),
* EventBuses: cloudwatch.EventEndpointEventBusArray{
* &cloudwatch.EventEndpointEventBusArgs{
* EventBusArn: pulumi.Any(primary.Arn),
* },
* &cloudwatch.EventEndpointEventBusArgs{
* EventBusArn: pulumi.Any(secondary.Arn),
* },
* },
* ReplicationConfig: &cloudwatch.EventEndpointReplicationConfigArgs{
* State: pulumi.String("DISABLED"),
* },
* RoutingConfig: &cloudwatch.EventEndpointRoutingConfigArgs{
* FailoverConfig: &cloudwatch.EventEndpointRoutingConfigFailoverConfigArgs{
* Primary: &cloudwatch.EventEndpointRoutingConfigFailoverConfigPrimaryArgs{
* HealthCheck: pulumi.Any(primaryAwsRoute53HealthCheck.Arn),
* },
* Secondary: &cloudwatch.EventEndpointRoutingConfigFailoverConfigSecondaryArgs{
* Route: pulumi.String("us-east-2"),
* },
* },
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.cloudwatch.EventEndpoint;
* import com.pulumi.aws.cloudwatch.EventEndpointArgs;
* import com.pulumi.aws.cloudwatch.inputs.EventEndpointEventBusArgs;
* import com.pulumi.aws.cloudwatch.inputs.EventEndpointReplicationConfigArgs;
* import com.pulumi.aws.cloudwatch.inputs.EventEndpointRoutingConfigArgs;
* import com.pulumi.aws.cloudwatch.inputs.EventEndpointRoutingConfigFailoverConfigArgs;
* import com.pulumi.aws.cloudwatch.inputs.EventEndpointRoutingConfigFailoverConfigPrimaryArgs;
* import com.pulumi.aws.cloudwatch.inputs.EventEndpointRoutingConfigFailoverConfigSecondaryArgs;
* 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 this_ = new EventEndpoint("this", EventEndpointArgs.builder()
* .name("global-endpoint")
* .roleArn(replication.arn())
* .eventBuses(
* EventEndpointEventBusArgs.builder()
* .eventBusArn(primary.arn())
* .build(),
* EventEndpointEventBusArgs.builder()
* .eventBusArn(secondary.arn())
* .build())
* .replicationConfig(EventEndpointReplicationConfigArgs.builder()
* .state("DISABLED")
* .build())
* .routingConfig(EventEndpointRoutingConfigArgs.builder()
* .failoverConfig(EventEndpointRoutingConfigFailoverConfigArgs.builder()
* .primary(EventEndpointRoutingConfigFailoverConfigPrimaryArgs.builder()
* .healthCheck(primaryAwsRoute53HealthCheck.arn())
* .build())
* .secondary(EventEndpointRoutingConfigFailoverConfigSecondaryArgs.builder()
* .route("us-east-2")
* .build())
* .build())
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* this:
* type: aws:cloudwatch:EventEndpoint
* properties:
* name: global-endpoint
* roleArn: ${replication.arn}
* eventBuses:
* - eventBusArn: ${primary.arn}
* - eventBusArn: ${secondary.arn}
* replicationConfig:
* state: DISABLED
* routingConfig:
* failoverConfig:
* primary:
* healthCheck: ${primaryAwsRoute53HealthCheck.arn}
* secondary:
* route: us-east-2
* ```
*
* ## Import
* Using `pulumi import`, import EventBridge Global Endpoints using the `name`. For example:
* ```sh
* $ pulumi import aws:cloudwatch/eventEndpoint:EventEndpoint imported_endpoint example-endpoint
* ```
* @property description A description of the global endpoint.
* @property eventBuses The event buses to use. The names of the event buses must be identical in each Region. Exactly two event buses are required. Documented below.
* @property name The name of the global endpoint.
* @property replicationConfig Parameters used for replication. Documented below.
* @property roleArn The ARN of the IAM role used for replication between event buses.
* @property routingConfig Parameters used for routing, including the health check and secondary Region. Documented below.
*/
public data class EventEndpointArgs(
public val description: Output? = null,
public val eventBuses: Output>? = null,
public val name: Output? = null,
public val replicationConfig: Output? = null,
public val roleArn: Output? = null,
public val routingConfig: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.aws.cloudwatch.EventEndpointArgs =
com.pulumi.aws.cloudwatch.EventEndpointArgs.builder()
.description(description?.applyValue({ args0 -> args0 }))
.eventBuses(
eventBuses?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.name(name?.applyValue({ args0 -> args0 }))
.replicationConfig(replicationConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.roleArn(roleArn?.applyValue({ args0 -> args0 }))
.routingConfig(routingConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}
/**
* Builder for [EventEndpointArgs].
*/
@PulumiTagMarker
public class EventEndpointArgsBuilder internal constructor() {
private var description: Output? = null
private var eventBuses: Output>? = null
private var name: Output? = null
private var replicationConfig: Output? = null
private var roleArn: Output? = null
private var routingConfig: Output? = null
/**
* @param value A description of the global endpoint.
*/
@JvmName("lsywsquijeoatyrm")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value The event buses to use. The names of the event buses must be identical in each Region. Exactly two event buses are required. Documented below.
*/
@JvmName("gcsiotjnhqdslwpo")
public suspend fun eventBuses(`value`: Output>) {
this.eventBuses = value
}
@JvmName("hximipqcqsonldtn")
public suspend fun eventBuses(vararg values: Output) {
this.eventBuses = Output.all(values.asList())
}
/**
* @param values The event buses to use. The names of the event buses must be identical in each Region. Exactly two event buses are required. Documented below.
*/
@JvmName("cdakggpamjlphdjo")
public suspend fun eventBuses(values: List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy