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

com.pulumi.aws.cloudwatch.LogAccountPolicyArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

There is a newer version: 6.72.0
Show newest version
// *** 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;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final LogAccountPolicyArgs Empty = new LogAccountPolicyArgs();

    /**
     * Text of the account policy. Refer to the [AWS docs](https://docs.aws.amazon.com/cli/latest/reference/logs/put-account-policy.html) for more information.
     * 
     */
    @Import(name="policyDocument", required=true)
    private Output policyDocument;

    /**
     * @return Text of the account policy. Refer to the [AWS docs](https://docs.aws.amazon.com/cli/latest/reference/logs/put-account-policy.html) for more information.
     * 
     */
    public Output policyDocument() {
        return this.policyDocument;
    }

    /**
     * Name of the account policy.
     * 
     */
    @Import(name="policyName", required=true)
    private Output policyName;

    /**
     * @return Name of the account policy.
     * 
     */
    public Output policyName() {
        return this.policyName;
    }

    /**
     * Type of account policy. One of `DATA_PROTECTION_POLICY`, `SUBSCRIPTION_FILTER_POLICY`, `FIELD_INDEX_POLICY` or `TRANSFORMER_POLICY`. You can have one account policy per type in an account.
     * 
     */
    @Import(name="policyType", required=true)
    private Output policyType;

    /**
     * @return Type of account policy. One of `DATA_PROTECTION_POLICY`, `SUBSCRIPTION_FILTER_POLICY`, `FIELD_INDEX_POLICY` or `TRANSFORMER_POLICY`. You can have one account policy per type in an account.
     * 
     */
    public Output policyType() {
        return this.policyType;
    }

    /**
     * Currently defaults to and only accepts the value: `ALL`.
     * 
     */
    @Import(name="scope")
    private @Nullable Output scope;

    /**
     * @return Currently defaults to and only accepts the value: `ALL`.
     * 
     */
    public Optional> scope() {
        return Optional.ofNullable(this.scope);
    }

    /**
     * Criteria for applying a subscription filter policy to a selection of log groups. The only allowable criteria selector is `LogGroupName NOT IN []`.
     * 
     */
    @Import(name="selectionCriteria")
    private @Nullable Output selectionCriteria;

    /**
     * @return Criteria for applying a subscription filter policy to a selection of log groups. The only allowable criteria selector is `LogGroupName NOT IN []`.
     * 
     */
    public Optional> selectionCriteria() {
        return Optional.ofNullable(this.selectionCriteria);
    }

    private LogAccountPolicyArgs() {}

    private LogAccountPolicyArgs(LogAccountPolicyArgs $) {
        this.policyDocument = $.policyDocument;
        this.policyName = $.policyName;
        this.policyType = $.policyType;
        this.scope = $.scope;
        this.selectionCriteria = $.selectionCriteria;
    }

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

    public static final class Builder {
        private LogAccountPolicyArgs $;

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

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

        /**
         * @param policyDocument Text of the account policy. Refer to the [AWS docs](https://docs.aws.amazon.com/cli/latest/reference/logs/put-account-policy.html) for more information.
         * 
         * @return builder
         * 
         */
        public Builder policyDocument(Output policyDocument) {
            $.policyDocument = policyDocument;
            return this;
        }

        /**
         * @param policyDocument Text of the account policy. Refer to the [AWS docs](https://docs.aws.amazon.com/cli/latest/reference/logs/put-account-policy.html) for more information.
         * 
         * @return builder
         * 
         */
        public Builder policyDocument(String policyDocument) {
            return policyDocument(Output.of(policyDocument));
        }

        /**
         * @param policyName Name of the account policy.
         * 
         * @return builder
         * 
         */
        public Builder policyName(Output policyName) {
            $.policyName = policyName;
            return this;
        }

        /**
         * @param policyName Name of the account policy.
         * 
         * @return builder
         * 
         */
        public Builder policyName(String policyName) {
            return policyName(Output.of(policyName));
        }

        /**
         * @param policyType Type of account policy. One of `DATA_PROTECTION_POLICY`, `SUBSCRIPTION_FILTER_POLICY`, `FIELD_INDEX_POLICY` or `TRANSFORMER_POLICY`. You can have one account policy per type in an account.
         * 
         * @return builder
         * 
         */
        public Builder policyType(Output policyType) {
            $.policyType = policyType;
            return this;
        }

        /**
         * @param policyType Type of account policy. One of `DATA_PROTECTION_POLICY`, `SUBSCRIPTION_FILTER_POLICY`, `FIELD_INDEX_POLICY` or `TRANSFORMER_POLICY`. You can have one account policy per type in an account.
         * 
         * @return builder
         * 
         */
        public Builder policyType(String policyType) {
            return policyType(Output.of(policyType));
        }

        /**
         * @param scope Currently defaults to and only accepts the value: `ALL`.
         * 
         * @return builder
         * 
         */
        public Builder scope(@Nullable Output scope) {
            $.scope = scope;
            return this;
        }

        /**
         * @param scope Currently defaults to and only accepts the value: `ALL`.
         * 
         * @return builder
         * 
         */
        public Builder scope(String scope) {
            return scope(Output.of(scope));
        }

        /**
         * @param selectionCriteria Criteria for applying a subscription filter policy to a selection of log groups. The only allowable criteria selector is `LogGroupName NOT IN []`.
         * 
         * @return builder
         * 
         */
        public Builder selectionCriteria(@Nullable Output selectionCriteria) {
            $.selectionCriteria = selectionCriteria;
            return this;
        }

        /**
         * @param selectionCriteria Criteria for applying a subscription filter policy to a selection of log groups. The only allowable criteria selector is `LogGroupName NOT IN []`.
         * 
         * @return builder
         * 
         */
        public Builder selectionCriteria(String selectionCriteria) {
            return selectionCriteria(Output.of(selectionCriteria));
        }

        public LogAccountPolicyArgs build() {
            if ($.policyDocument == null) {
                throw new MissingRequiredPropertyException("LogAccountPolicyArgs", "policyDocument");
            }
            if ($.policyName == null) {
                throw new MissingRequiredPropertyException("LogAccountPolicyArgs", "policyName");
            }
            if ($.policyType == null) {
                throw new MissingRequiredPropertyException("LogAccountPolicyArgs", "policyType");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy