All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.cloudwatch.inputs.EventTargetState Maven / Gradle / Ivy

// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.cloudwatch.inputs;

import com.pulumi.aws.cloudwatch.inputs.EventTargetBatchTargetArgs;
import com.pulumi.aws.cloudwatch.inputs.EventTargetDeadLetterConfigArgs;
import com.pulumi.aws.cloudwatch.inputs.EventTargetEcsTargetArgs;
import com.pulumi.aws.cloudwatch.inputs.EventTargetHttpTargetArgs;
import com.pulumi.aws.cloudwatch.inputs.EventTargetInputTransformerArgs;
import com.pulumi.aws.cloudwatch.inputs.EventTargetKinesisTargetArgs;
import com.pulumi.aws.cloudwatch.inputs.EventTargetRedshiftTargetArgs;
import com.pulumi.aws.cloudwatch.inputs.EventTargetRetryPolicyArgs;
import com.pulumi.aws.cloudwatch.inputs.EventTargetRunCommandTargetArgs;
import com.pulumi.aws.cloudwatch.inputs.EventTargetSagemakerPipelineTargetArgs;
import com.pulumi.aws.cloudwatch.inputs.EventTargetSqsTargetArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class EventTargetState extends com.pulumi.resources.ResourceArgs {

    public static final EventTargetState Empty = new EventTargetState();

    /**
     * The Amazon Resource Name (ARN) of the target.
     * 
     */
    @Import(name="arn")
    private @Nullable Output arn;

    /**
     * @return The Amazon Resource Name (ARN) of the target.
     * 
     */
    public Optional> arn() {
        return Optional.ofNullable(this.arn);
    }

    /**
     * Parameters used when you are using the rule to invoke an Amazon Batch Job. Documented below. A maximum of 1 are allowed.
     * 
     */
    @Import(name="batchTarget")
    private @Nullable Output batchTarget;

    /**
     * @return Parameters used when you are using the rule to invoke an Amazon Batch Job. Documented below. A maximum of 1 are allowed.
     * 
     */
    public Optional> batchTarget() {
        return Optional.ofNullable(this.batchTarget);
    }

    /**
     * Parameters used when you are providing a dead letter config. Documented below. A maximum of 1 are allowed.
     * 
     */
    @Import(name="deadLetterConfig")
    private @Nullable Output deadLetterConfig;

    /**
     * @return Parameters used when you are providing a dead letter config. Documented below. A maximum of 1 are allowed.
     * 
     */
    public Optional> deadLetterConfig() {
        return Optional.ofNullable(this.deadLetterConfig);
    }

    /**
     * Parameters used when you are using the rule to invoke Amazon ECS Task. Documented below. A maximum of 1 are allowed.
     * 
     */
    @Import(name="ecsTarget")
    private @Nullable Output ecsTarget;

    /**
     * @return Parameters used when you are using the rule to invoke Amazon ECS Task. Documented below. A maximum of 1 are allowed.
     * 
     */
    public Optional> ecsTarget() {
        return Optional.ofNullable(this.ecsTarget);
    }

    /**
     * The name or ARN of the event bus to associate with the rule.
     * If you omit this, the `default` event bus is used.
     * 
     */
    @Import(name="eventBusName")
    private @Nullable Output eventBusName;

    /**
     * @return The name or ARN of the event bus to associate with the rule.
     * If you omit this, the `default` event bus is used.
     * 
     */
    public Optional> eventBusName() {
        return Optional.ofNullable(this.eventBusName);
    }

    /**
     * Used to delete managed rules created by AWS. Defaults to `false`.
     * 
     */
    @Import(name="forceDestroy")
    private @Nullable Output forceDestroy;

    /**
     * @return Used to delete managed rules created by AWS. Defaults to `false`.
     * 
     */
    public Optional> forceDestroy() {
        return Optional.ofNullable(this.forceDestroy);
    }

    /**
     * Parameters used when you are using the rule to invoke an API Gateway REST endpoint. Documented below. A maximum of 1 is allowed.
     * 
     */
    @Import(name="httpTarget")
    private @Nullable Output httpTarget;

    /**
     * @return Parameters used when you are using the rule to invoke an API Gateway REST endpoint. Documented below. A maximum of 1 is allowed.
     * 
     */
    public Optional> httpTarget() {
        return Optional.ofNullable(this.httpTarget);
    }

    /**
     * Valid JSON text passed to the target. Conflicts with `input_path` and `input_transformer`.
     * 
     */
    @Import(name="input")
    private @Nullable Output input;

    /**
     * @return Valid JSON text passed to the target. Conflicts with `input_path` and `input_transformer`.
     * 
     */
    public Optional> input() {
        return Optional.ofNullable(this.input);
    }

    /**
     * The value of the [JSONPath](http://goessner.net/articles/JsonPath/) that is used for extracting part of the matched event when passing it to the target. Conflicts with `input` and `input_transformer`.
     * 
     */
    @Import(name="inputPath")
    private @Nullable Output inputPath;

    /**
     * @return The value of the [JSONPath](http://goessner.net/articles/JsonPath/) that is used for extracting part of the matched event when passing it to the target. Conflicts with `input` and `input_transformer`.
     * 
     */
    public Optional> inputPath() {
        return Optional.ofNullable(this.inputPath);
    }

    /**
     * Parameters used when you are providing a custom input to a target based on certain event data. Conflicts with `input` and `input_path`.
     * 
     */
    @Import(name="inputTransformer")
    private @Nullable Output inputTransformer;

    /**
     * @return Parameters used when you are providing a custom input to a target based on certain event data. Conflicts with `input` and `input_path`.
     * 
     */
    public Optional> inputTransformer() {
        return Optional.ofNullable(this.inputTransformer);
    }

    /**
     * Parameters used when you are using the rule to invoke an Amazon Kinesis Stream. Documented below. A maximum of 1 are allowed.
     * 
     */
    @Import(name="kinesisTarget")
    private @Nullable Output kinesisTarget;

    /**
     * @return Parameters used when you are using the rule to invoke an Amazon Kinesis Stream. Documented below. A maximum of 1 are allowed.
     * 
     */
    public Optional> kinesisTarget() {
        return Optional.ofNullable(this.kinesisTarget);
    }

    /**
     * Parameters used when you are using the rule to invoke an Amazon Redshift Statement. Documented below. A maximum of 1 are allowed.
     * 
     */
    @Import(name="redshiftTarget")
    private @Nullable Output redshiftTarget;

    /**
     * @return Parameters used when you are using the rule to invoke an Amazon Redshift Statement. Documented below. A maximum of 1 are allowed.
     * 
     */
    public Optional> redshiftTarget() {
        return Optional.ofNullable(this.redshiftTarget);
    }

    /**
     * Parameters used when you are providing retry policies. Documented below. A maximum of 1 are allowed.
     * 
     */
    @Import(name="retryPolicy")
    private @Nullable Output retryPolicy;

    /**
     * @return Parameters used when you are providing retry policies. Documented below. A maximum of 1 are allowed.
     * 
     */
    public Optional> retryPolicy() {
        return Optional.ofNullable(this.retryPolicy);
    }

    /**
     * The Amazon Resource Name (ARN) of the IAM role to be used for this target when the rule is triggered. Required if `ecs_target` is used or target in `arn` is EC2 instance, Kinesis data stream, Step Functions state machine, or Event Bus in different account or region.
     * 
     */
    @Import(name="roleArn")
    private @Nullable Output roleArn;

    /**
     * @return The Amazon Resource Name (ARN) of the IAM role to be used for this target when the rule is triggered. Required if `ecs_target` is used or target in `arn` is EC2 instance, Kinesis data stream, Step Functions state machine, or Event Bus in different account or region.
     * 
     */
    public Optional> roleArn() {
        return Optional.ofNullable(this.roleArn);
    }

    /**
     * The name of the rule you want to add targets to.
     * 
     * The following arguments are optional:
     * 
     */
    @Import(name="rule")
    private @Nullable Output rule;

    /**
     * @return The name of the rule you want to add targets to.
     * 
     * The following arguments are optional:
     * 
     */
    public Optional> rule() {
        return Optional.ofNullable(this.rule);
    }

    /**
     * Parameters used when you are using the rule to invoke Amazon EC2 Run Command. Documented below. A maximum of 5 are allowed.
     * 
     */
    @Import(name="runCommandTargets")
    private @Nullable Output> runCommandTargets;

    /**
     * @return Parameters used when you are using the rule to invoke Amazon EC2 Run Command. Documented below. A maximum of 5 are allowed.
     * 
     */
    public Optional>> runCommandTargets() {
        return Optional.ofNullable(this.runCommandTargets);
    }

    /**
     * Parameters used when you are using the rule to invoke an Amazon SageMaker Pipeline. Documented below. A maximum of 1 are allowed.
     * 
     */
    @Import(name="sagemakerPipelineTarget")
    private @Nullable Output sagemakerPipelineTarget;

    /**
     * @return Parameters used when you are using the rule to invoke an Amazon SageMaker Pipeline. Documented below. A maximum of 1 are allowed.
     * 
     */
    public Optional> sagemakerPipelineTarget() {
        return Optional.ofNullable(this.sagemakerPipelineTarget);
    }

    /**
     * Parameters used when you are using the rule to invoke an Amazon SQS Queue. Documented below. A maximum of 1 are allowed.
     * 
     */
    @Import(name="sqsTarget")
    private @Nullable Output sqsTarget;

    /**
     * @return Parameters used when you are using the rule to invoke an Amazon SQS Queue. Documented below. A maximum of 1 are allowed.
     * 
     */
    public Optional> sqsTarget() {
        return Optional.ofNullable(this.sqsTarget);
    }

    /**
     * The unique target assignment ID. If missing, will generate a random, unique id.
     * 
     */
    @Import(name="targetId")
    private @Nullable Output targetId;

    /**
     * @return The unique target assignment ID. If missing, will generate a random, unique id.
     * 
     */
    public Optional> targetId() {
        return Optional.ofNullable(this.targetId);
    }

    private EventTargetState() {}

    private EventTargetState(EventTargetState $) {
        this.arn = $.arn;
        this.batchTarget = $.batchTarget;
        this.deadLetterConfig = $.deadLetterConfig;
        this.ecsTarget = $.ecsTarget;
        this.eventBusName = $.eventBusName;
        this.forceDestroy = $.forceDestroy;
        this.httpTarget = $.httpTarget;
        this.input = $.input;
        this.inputPath = $.inputPath;
        this.inputTransformer = $.inputTransformer;
        this.kinesisTarget = $.kinesisTarget;
        this.redshiftTarget = $.redshiftTarget;
        this.retryPolicy = $.retryPolicy;
        this.roleArn = $.roleArn;
        this.rule = $.rule;
        this.runCommandTargets = $.runCommandTargets;
        this.sagemakerPipelineTarget = $.sagemakerPipelineTarget;
        this.sqsTarget = $.sqsTarget;
        this.targetId = $.targetId;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(EventTargetState defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private EventTargetState $;

        public Builder() {
            $ = new EventTargetState();
        }

        public Builder(EventTargetState defaults) {
            $ = new EventTargetState(Objects.requireNonNull(defaults));
        }

        /**
         * @param arn The Amazon Resource Name (ARN) of the target.
         * 
         * @return builder
         * 
         */
        public Builder arn(@Nullable Output arn) {
            $.arn = arn;
            return this;
        }

        /**
         * @param arn The Amazon Resource Name (ARN) of the target.
         * 
         * @return builder
         * 
         */
        public Builder arn(String arn) {
            return arn(Output.of(arn));
        }

        /**
         * @param batchTarget Parameters used when you are using the rule to invoke an Amazon Batch Job. Documented below. A maximum of 1 are allowed.
         * 
         * @return builder
         * 
         */
        public Builder batchTarget(@Nullable Output batchTarget) {
            $.batchTarget = batchTarget;
            return this;
        }

        /**
         * @param batchTarget Parameters used when you are using the rule to invoke an Amazon Batch Job. Documented below. A maximum of 1 are allowed.
         * 
         * @return builder
         * 
         */
        public Builder batchTarget(EventTargetBatchTargetArgs batchTarget) {
            return batchTarget(Output.of(batchTarget));
        }

        /**
         * @param deadLetterConfig Parameters used when you are providing a dead letter config. Documented below. A maximum of 1 are allowed.
         * 
         * @return builder
         * 
         */
        public Builder deadLetterConfig(@Nullable Output deadLetterConfig) {
            $.deadLetterConfig = deadLetterConfig;
            return this;
        }

        /**
         * @param deadLetterConfig Parameters used when you are providing a dead letter config. Documented below. A maximum of 1 are allowed.
         * 
         * @return builder
         * 
         */
        public Builder deadLetterConfig(EventTargetDeadLetterConfigArgs deadLetterConfig) {
            return deadLetterConfig(Output.of(deadLetterConfig));
        }

        /**
         * @param ecsTarget Parameters used when you are using the rule to invoke Amazon ECS Task. Documented below. A maximum of 1 are allowed.
         * 
         * @return builder
         * 
         */
        public Builder ecsTarget(@Nullable Output ecsTarget) {
            $.ecsTarget = ecsTarget;
            return this;
        }

        /**
         * @param ecsTarget Parameters used when you are using the rule to invoke Amazon ECS Task. Documented below. A maximum of 1 are allowed.
         * 
         * @return builder
         * 
         */
        public Builder ecsTarget(EventTargetEcsTargetArgs ecsTarget) {
            return ecsTarget(Output.of(ecsTarget));
        }

        /**
         * @param eventBusName The name or ARN of the event bus to associate with the rule.
         * If you omit this, the `default` event bus is used.
         * 
         * @return builder
         * 
         */
        public Builder eventBusName(@Nullable Output eventBusName) {
            $.eventBusName = eventBusName;
            return this;
        }

        /**
         * @param eventBusName The name or ARN of the event bus to associate with the rule.
         * If you omit this, the `default` event bus is used.
         * 
         * @return builder
         * 
         */
        public Builder eventBusName(String eventBusName) {
            return eventBusName(Output.of(eventBusName));
        }

        /**
         * @param forceDestroy Used to delete managed rules created by AWS. Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder forceDestroy(@Nullable Output forceDestroy) {
            $.forceDestroy = forceDestroy;
            return this;
        }

        /**
         * @param forceDestroy Used to delete managed rules created by AWS. Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder forceDestroy(Boolean forceDestroy) {
            return forceDestroy(Output.of(forceDestroy));
        }

        /**
         * @param httpTarget Parameters used when you are using the rule to invoke an API Gateway REST endpoint. Documented below. A maximum of 1 is allowed.
         * 
         * @return builder
         * 
         */
        public Builder httpTarget(@Nullable Output httpTarget) {
            $.httpTarget = httpTarget;
            return this;
        }

        /**
         * @param httpTarget Parameters used when you are using the rule to invoke an API Gateway REST endpoint. Documented below. A maximum of 1 is allowed.
         * 
         * @return builder
         * 
         */
        public Builder httpTarget(EventTargetHttpTargetArgs httpTarget) {
            return httpTarget(Output.of(httpTarget));
        }

        /**
         * @param input Valid JSON text passed to the target. Conflicts with `input_path` and `input_transformer`.
         * 
         * @return builder
         * 
         */
        public Builder input(@Nullable Output input) {
            $.input = input;
            return this;
        }

        /**
         * @param input Valid JSON text passed to the target. Conflicts with `input_path` and `input_transformer`.
         * 
         * @return builder
         * 
         */
        public Builder input(String input) {
            return input(Output.of(input));
        }

        /**
         * @param inputPath The value of the [JSONPath](http://goessner.net/articles/JsonPath/) that is used for extracting part of the matched event when passing it to the target. Conflicts with `input` and `input_transformer`.
         * 
         * @return builder
         * 
         */
        public Builder inputPath(@Nullable Output inputPath) {
            $.inputPath = inputPath;
            return this;
        }

        /**
         * @param inputPath The value of the [JSONPath](http://goessner.net/articles/JsonPath/) that is used for extracting part of the matched event when passing it to the target. Conflicts with `input` and `input_transformer`.
         * 
         * @return builder
         * 
         */
        public Builder inputPath(String inputPath) {
            return inputPath(Output.of(inputPath));
        }

        /**
         * @param inputTransformer Parameters used when you are providing a custom input to a target based on certain event data. Conflicts with `input` and `input_path`.
         * 
         * @return builder
         * 
         */
        public Builder inputTransformer(@Nullable Output inputTransformer) {
            $.inputTransformer = inputTransformer;
            return this;
        }

        /**
         * @param inputTransformer Parameters used when you are providing a custom input to a target based on certain event data. Conflicts with `input` and `input_path`.
         * 
         * @return builder
         * 
         */
        public Builder inputTransformer(EventTargetInputTransformerArgs inputTransformer) {
            return inputTransformer(Output.of(inputTransformer));
        }

        /**
         * @param kinesisTarget Parameters used when you are using the rule to invoke an Amazon Kinesis Stream. Documented below. A maximum of 1 are allowed.
         * 
         * @return builder
         * 
         */
        public Builder kinesisTarget(@Nullable Output kinesisTarget) {
            $.kinesisTarget = kinesisTarget;
            return this;
        }

        /**
         * @param kinesisTarget Parameters used when you are using the rule to invoke an Amazon Kinesis Stream. Documented below. A maximum of 1 are allowed.
         * 
         * @return builder
         * 
         */
        public Builder kinesisTarget(EventTargetKinesisTargetArgs kinesisTarget) {
            return kinesisTarget(Output.of(kinesisTarget));
        }

        /**
         * @param redshiftTarget Parameters used when you are using the rule to invoke an Amazon Redshift Statement. Documented below. A maximum of 1 are allowed.
         * 
         * @return builder
         * 
         */
        public Builder redshiftTarget(@Nullable Output redshiftTarget) {
            $.redshiftTarget = redshiftTarget;
            return this;
        }

        /**
         * @param redshiftTarget Parameters used when you are using the rule to invoke an Amazon Redshift Statement. Documented below. A maximum of 1 are allowed.
         * 
         * @return builder
         * 
         */
        public Builder redshiftTarget(EventTargetRedshiftTargetArgs redshiftTarget) {
            return redshiftTarget(Output.of(redshiftTarget));
        }

        /**
         * @param retryPolicy Parameters used when you are providing retry policies. Documented below. A maximum of 1 are allowed.
         * 
         * @return builder
         * 
         */
        public Builder retryPolicy(@Nullable Output retryPolicy) {
            $.retryPolicy = retryPolicy;
            return this;
        }

        /**
         * @param retryPolicy Parameters used when you are providing retry policies. Documented below. A maximum of 1 are allowed.
         * 
         * @return builder
         * 
         */
        public Builder retryPolicy(EventTargetRetryPolicyArgs retryPolicy) {
            return retryPolicy(Output.of(retryPolicy));
        }

        /**
         * @param roleArn The Amazon Resource Name (ARN) of the IAM role to be used for this target when the rule is triggered. Required if `ecs_target` is used or target in `arn` is EC2 instance, Kinesis data stream, Step Functions state machine, or Event Bus in different account or region.
         * 
         * @return builder
         * 
         */
        public Builder roleArn(@Nullable Output roleArn) {
            $.roleArn = roleArn;
            return this;
        }

        /**
         * @param roleArn The Amazon Resource Name (ARN) of the IAM role to be used for this target when the rule is triggered. Required if `ecs_target` is used or target in `arn` is EC2 instance, Kinesis data stream, Step Functions state machine, or Event Bus in different account or region.
         * 
         * @return builder
         * 
         */
        public Builder roleArn(String roleArn) {
            return roleArn(Output.of(roleArn));
        }

        /**
         * @param rule The name of the rule you want to add targets to.
         * 
         * The following arguments are optional:
         * 
         * @return builder
         * 
         */
        public Builder rule(@Nullable Output rule) {
            $.rule = rule;
            return this;
        }

        /**
         * @param rule The name of the rule you want to add targets to.
         * 
         * The following arguments are optional:
         * 
         * @return builder
         * 
         */
        public Builder rule(String rule) {
            return rule(Output.of(rule));
        }

        /**
         * @param runCommandTargets Parameters used when you are using the rule to invoke Amazon EC2 Run Command. Documented below. A maximum of 5 are allowed.
         * 
         * @return builder
         * 
         */
        public Builder runCommandTargets(@Nullable Output> runCommandTargets) {
            $.runCommandTargets = runCommandTargets;
            return this;
        }

        /**
         * @param runCommandTargets Parameters used when you are using the rule to invoke Amazon EC2 Run Command. Documented below. A maximum of 5 are allowed.
         * 
         * @return builder
         * 
         */
        public Builder runCommandTargets(List runCommandTargets) {
            return runCommandTargets(Output.of(runCommandTargets));
        }

        /**
         * @param runCommandTargets Parameters used when you are using the rule to invoke Amazon EC2 Run Command. Documented below. A maximum of 5 are allowed.
         * 
         * @return builder
         * 
         */
        public Builder runCommandTargets(EventTargetRunCommandTargetArgs... runCommandTargets) {
            return runCommandTargets(List.of(runCommandTargets));
        }

        /**
         * @param sagemakerPipelineTarget Parameters used when you are using the rule to invoke an Amazon SageMaker Pipeline. Documented below. A maximum of 1 are allowed.
         * 
         * @return builder
         * 
         */
        public Builder sagemakerPipelineTarget(@Nullable Output sagemakerPipelineTarget) {
            $.sagemakerPipelineTarget = sagemakerPipelineTarget;
            return this;
        }

        /**
         * @param sagemakerPipelineTarget Parameters used when you are using the rule to invoke an Amazon SageMaker Pipeline. Documented below. A maximum of 1 are allowed.
         * 
         * @return builder
         * 
         */
        public Builder sagemakerPipelineTarget(EventTargetSagemakerPipelineTargetArgs sagemakerPipelineTarget) {
            return sagemakerPipelineTarget(Output.of(sagemakerPipelineTarget));
        }

        /**
         * @param sqsTarget Parameters used when you are using the rule to invoke an Amazon SQS Queue. Documented below. A maximum of 1 are allowed.
         * 
         * @return builder
         * 
         */
        public Builder sqsTarget(@Nullable Output sqsTarget) {
            $.sqsTarget = sqsTarget;
            return this;
        }

        /**
         * @param sqsTarget Parameters used when you are using the rule to invoke an Amazon SQS Queue. Documented below. A maximum of 1 are allowed.
         * 
         * @return builder
         * 
         */
        public Builder sqsTarget(EventTargetSqsTargetArgs sqsTarget) {
            return sqsTarget(Output.of(sqsTarget));
        }

        /**
         * @param targetId The unique target assignment ID. If missing, will generate a random, unique id.
         * 
         * @return builder
         * 
         */
        public Builder targetId(@Nullable Output targetId) {
            $.targetId = targetId;
            return this;
        }

        /**
         * @param targetId The unique target assignment ID. If missing, will generate a random, unique id.
         * 
         * @return builder
         * 
         */
        public Builder targetId(String targetId) {
            return targetId(Output.of(targetId));
        }

        public EventTargetState build() {
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy