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

com.pulumi.azure.core.inputs.SubscriptionPolicyAssignmentState Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.

There is a newer version: 6.10.0-alpha.1731737215
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.azure.core.inputs;

import com.pulumi.azure.core.inputs.SubscriptionPolicyAssignmentIdentityArgs;
import com.pulumi.azure.core.inputs.SubscriptionPolicyAssignmentNonComplianceMessageArgs;
import com.pulumi.azure.core.inputs.SubscriptionPolicyAssignmentOverrideArgs;
import com.pulumi.azure.core.inputs.SubscriptionPolicyAssignmentResourceSelectorArgs;
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 SubscriptionPolicyAssignmentState extends com.pulumi.resources.ResourceArgs {

    public static final SubscriptionPolicyAssignmentState Empty = new SubscriptionPolicyAssignmentState();

    /**
     * A description which should be used for this Policy Assignment.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return A description which should be used for this Policy Assignment.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * The Display Name for this Policy Assignment.
     * 
     */
    @Import(name="displayName")
    private @Nullable Output displayName;

    /**
     * @return The Display Name for this Policy Assignment.
     * 
     */
    public Optional> displayName() {
        return Optional.ofNullable(this.displayName);
    }

    /**
     * Specifies if this Policy should be enforced or not? Defaults to `true`.
     * 
     */
    @Import(name="enforce")
    private @Nullable Output enforce;

    /**
     * @return Specifies if this Policy should be enforced or not? Defaults to `true`.
     * 
     */
    public Optional> enforce() {
        return Optional.ofNullable(this.enforce);
    }

    /**
     * An `identity` block as defined below.
     * 
     * > **Note:** The `location` field must also be specified when `identity` is specified.
     * 
     */
    @Import(name="identity")
    private @Nullable Output identity;

    /**
     * @return An `identity` block as defined below.
     * 
     * > **Note:** The `location` field must also be specified when `identity` is specified.
     * 
     */
    public Optional> identity() {
        return Optional.ofNullable(this.identity);
    }

    /**
     * The Azure Region where the Policy Assignment should exist. Changing this forces a new Policy Assignment to be created.
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return The Azure Region where the Policy Assignment should exist. Changing this forces a new Policy Assignment to be created.
     * 
     */
    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * A JSON mapping of any Metadata for this Policy.
     * 
     */
    @Import(name="metadata")
    private @Nullable Output metadata;

    /**
     * @return A JSON mapping of any Metadata for this Policy.
     * 
     */
    public Optional> metadata() {
        return Optional.ofNullable(this.metadata);
    }

    /**
     * The name which should be used for this Policy Assignment. Changing this forces a new Policy Assignment to be created. Cannot exceed 64 characters in length.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return The name which should be used for this Policy Assignment. Changing this forces a new Policy Assignment to be created. Cannot exceed 64 characters in length.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * One or more `non_compliance_message` blocks as defined below.
     * 
     */
    @Import(name="nonComplianceMessages")
    private @Nullable Output> nonComplianceMessages;

    /**
     * @return One or more `non_compliance_message` blocks as defined below.
     * 
     */
    public Optional>> nonComplianceMessages() {
        return Optional.ofNullable(this.nonComplianceMessages);
    }

    /**
     * Specifies a list of Resource Scopes (for example a Subscription, or a Resource Group) within this Management Group which are excluded from this Policy.
     * 
     */
    @Import(name="notScopes")
    private @Nullable Output> notScopes;

    /**
     * @return Specifies a list of Resource Scopes (for example a Subscription, or a Resource Group) within this Management Group which are excluded from this Policy.
     * 
     */
    public Optional>> notScopes() {
        return Optional.ofNullable(this.notScopes);
    }

    /**
     * One or more `overrides` blocks as defined below. More detail about `overrides` and `resource_selectors` see [policy assignment structure](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure#resource-selectors-preview)
     * 
     */
    @Import(name="overrides")
    private @Nullable Output> overrides;

    /**
     * @return One or more `overrides` blocks as defined below. More detail about `overrides` and `resource_selectors` see [policy assignment structure](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure#resource-selectors-preview)
     * 
     */
    public Optional>> overrides() {
        return Optional.ofNullable(this.overrides);
    }

    /**
     * A JSON mapping of any Parameters for this Policy.
     * 
     */
    @Import(name="parameters")
    private @Nullable Output parameters;

    /**
     * @return A JSON mapping of any Parameters for this Policy.
     * 
     */
    public Optional> parameters() {
        return Optional.ofNullable(this.parameters);
    }

    /**
     * The ID of the Policy Definition or Policy Definition Set. Changing this forces a new Policy Assignment to be created.
     * 
     */
    @Import(name="policyDefinitionId")
    private @Nullable Output policyDefinitionId;

    /**
     * @return The ID of the Policy Definition or Policy Definition Set. Changing this forces a new Policy Assignment to be created.
     * 
     */
    public Optional> policyDefinitionId() {
        return Optional.ofNullable(this.policyDefinitionId);
    }

    /**
     * One or more `resource_selectors` blocks as defined below to filter polices by resource properties.
     * 
     */
    @Import(name="resourceSelectors")
    private @Nullable Output> resourceSelectors;

    /**
     * @return One or more `resource_selectors` blocks as defined below to filter polices by resource properties.
     * 
     */
    public Optional>> resourceSelectors() {
        return Optional.ofNullable(this.resourceSelectors);
    }

    /**
     * The ID of the Subscription where this Policy Assignment should be created. Changing this forces a new Policy Assignment to be created.
     * 
     */
    @Import(name="subscriptionId")
    private @Nullable Output subscriptionId;

    /**
     * @return The ID of the Subscription where this Policy Assignment should be created. Changing this forces a new Policy Assignment to be created.
     * 
     */
    public Optional> subscriptionId() {
        return Optional.ofNullable(this.subscriptionId);
    }

    private SubscriptionPolicyAssignmentState() {}

    private SubscriptionPolicyAssignmentState(SubscriptionPolicyAssignmentState $) {
        this.description = $.description;
        this.displayName = $.displayName;
        this.enforce = $.enforce;
        this.identity = $.identity;
        this.location = $.location;
        this.metadata = $.metadata;
        this.name = $.name;
        this.nonComplianceMessages = $.nonComplianceMessages;
        this.notScopes = $.notScopes;
        this.overrides = $.overrides;
        this.parameters = $.parameters;
        this.policyDefinitionId = $.policyDefinitionId;
        this.resourceSelectors = $.resourceSelectors;
        this.subscriptionId = $.subscriptionId;
    }

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

    public static final class Builder {
        private SubscriptionPolicyAssignmentState $;

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

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

        /**
         * @param description A description which should be used for this Policy Assignment.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description A description which should be used for this Policy Assignment.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param displayName The Display Name for this Policy Assignment.
         * 
         * @return builder
         * 
         */
        public Builder displayName(@Nullable Output displayName) {
            $.displayName = displayName;
            return this;
        }

        /**
         * @param displayName The Display Name for this Policy Assignment.
         * 
         * @return builder
         * 
         */
        public Builder displayName(String displayName) {
            return displayName(Output.of(displayName));
        }

        /**
         * @param enforce Specifies if this Policy should be enforced or not? Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder enforce(@Nullable Output enforce) {
            $.enforce = enforce;
            return this;
        }

        /**
         * @param enforce Specifies if this Policy should be enforced or not? Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder enforce(Boolean enforce) {
            return enforce(Output.of(enforce));
        }

        /**
         * @param identity An `identity` block as defined below.
         * 
         * > **Note:** The `location` field must also be specified when `identity` is specified.
         * 
         * @return builder
         * 
         */
        public Builder identity(@Nullable Output identity) {
            $.identity = identity;
            return this;
        }

        /**
         * @param identity An `identity` block as defined below.
         * 
         * > **Note:** The `location` field must also be specified when `identity` is specified.
         * 
         * @return builder
         * 
         */
        public Builder identity(SubscriptionPolicyAssignmentIdentityArgs identity) {
            return identity(Output.of(identity));
        }

        /**
         * @param location The Azure Region where the Policy Assignment should exist. Changing this forces a new Policy Assignment to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

        /**
         * @param location The Azure Region where the Policy Assignment should exist. Changing this forces a new Policy Assignment to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param metadata A JSON mapping of any Metadata for this Policy.
         * 
         * @return builder
         * 
         */
        public Builder metadata(@Nullable Output metadata) {
            $.metadata = metadata;
            return this;
        }

        /**
         * @param metadata A JSON mapping of any Metadata for this Policy.
         * 
         * @return builder
         * 
         */
        public Builder metadata(String metadata) {
            return metadata(Output.of(metadata));
        }

        /**
         * @param name The name which should be used for this Policy Assignment. Changing this forces a new Policy Assignment to be created. Cannot exceed 64 characters in length.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name which should be used for this Policy Assignment. Changing this forces a new Policy Assignment to be created. Cannot exceed 64 characters in length.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param nonComplianceMessages One or more `non_compliance_message` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder nonComplianceMessages(@Nullable Output> nonComplianceMessages) {
            $.nonComplianceMessages = nonComplianceMessages;
            return this;
        }

        /**
         * @param nonComplianceMessages One or more `non_compliance_message` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder nonComplianceMessages(List nonComplianceMessages) {
            return nonComplianceMessages(Output.of(nonComplianceMessages));
        }

        /**
         * @param nonComplianceMessages One or more `non_compliance_message` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder nonComplianceMessages(SubscriptionPolicyAssignmentNonComplianceMessageArgs... nonComplianceMessages) {
            return nonComplianceMessages(List.of(nonComplianceMessages));
        }

        /**
         * @param notScopes Specifies a list of Resource Scopes (for example a Subscription, or a Resource Group) within this Management Group which are excluded from this Policy.
         * 
         * @return builder
         * 
         */
        public Builder notScopes(@Nullable Output> notScopes) {
            $.notScopes = notScopes;
            return this;
        }

        /**
         * @param notScopes Specifies a list of Resource Scopes (for example a Subscription, or a Resource Group) within this Management Group which are excluded from this Policy.
         * 
         * @return builder
         * 
         */
        public Builder notScopes(List notScopes) {
            return notScopes(Output.of(notScopes));
        }

        /**
         * @param notScopes Specifies a list of Resource Scopes (for example a Subscription, or a Resource Group) within this Management Group which are excluded from this Policy.
         * 
         * @return builder
         * 
         */
        public Builder notScopes(String... notScopes) {
            return notScopes(List.of(notScopes));
        }

        /**
         * @param overrides One or more `overrides` blocks as defined below. More detail about `overrides` and `resource_selectors` see [policy assignment structure](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure#resource-selectors-preview)
         * 
         * @return builder
         * 
         */
        public Builder overrides(@Nullable Output> overrides) {
            $.overrides = overrides;
            return this;
        }

        /**
         * @param overrides One or more `overrides` blocks as defined below. More detail about `overrides` and `resource_selectors` see [policy assignment structure](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure#resource-selectors-preview)
         * 
         * @return builder
         * 
         */
        public Builder overrides(List overrides) {
            return overrides(Output.of(overrides));
        }

        /**
         * @param overrides One or more `overrides` blocks as defined below. More detail about `overrides` and `resource_selectors` see [policy assignment structure](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure#resource-selectors-preview)
         * 
         * @return builder
         * 
         */
        public Builder overrides(SubscriptionPolicyAssignmentOverrideArgs... overrides) {
            return overrides(List.of(overrides));
        }

        /**
         * @param parameters A JSON mapping of any Parameters for this Policy.
         * 
         * @return builder
         * 
         */
        public Builder parameters(@Nullable Output parameters) {
            $.parameters = parameters;
            return this;
        }

        /**
         * @param parameters A JSON mapping of any Parameters for this Policy.
         * 
         * @return builder
         * 
         */
        public Builder parameters(String parameters) {
            return parameters(Output.of(parameters));
        }

        /**
         * @param policyDefinitionId The ID of the Policy Definition or Policy Definition Set. Changing this forces a new Policy Assignment to be created.
         * 
         * @return builder
         * 
         */
        public Builder policyDefinitionId(@Nullable Output policyDefinitionId) {
            $.policyDefinitionId = policyDefinitionId;
            return this;
        }

        /**
         * @param policyDefinitionId The ID of the Policy Definition or Policy Definition Set. Changing this forces a new Policy Assignment to be created.
         * 
         * @return builder
         * 
         */
        public Builder policyDefinitionId(String policyDefinitionId) {
            return policyDefinitionId(Output.of(policyDefinitionId));
        }

        /**
         * @param resourceSelectors One or more `resource_selectors` blocks as defined below to filter polices by resource properties.
         * 
         * @return builder
         * 
         */
        public Builder resourceSelectors(@Nullable Output> resourceSelectors) {
            $.resourceSelectors = resourceSelectors;
            return this;
        }

        /**
         * @param resourceSelectors One or more `resource_selectors` blocks as defined below to filter polices by resource properties.
         * 
         * @return builder
         * 
         */
        public Builder resourceSelectors(List resourceSelectors) {
            return resourceSelectors(Output.of(resourceSelectors));
        }

        /**
         * @param resourceSelectors One or more `resource_selectors` blocks as defined below to filter polices by resource properties.
         * 
         * @return builder
         * 
         */
        public Builder resourceSelectors(SubscriptionPolicyAssignmentResourceSelectorArgs... resourceSelectors) {
            return resourceSelectors(List.of(resourceSelectors));
        }

        /**
         * @param subscriptionId The ID of the Subscription where this Policy Assignment should be created. Changing this forces a new Policy Assignment to be created.
         * 
         * @return builder
         * 
         */
        public Builder subscriptionId(@Nullable Output subscriptionId) {
            $.subscriptionId = subscriptionId;
            return this;
        }

        /**
         * @param subscriptionId The ID of the Subscription where this Policy Assignment should be created. Changing this forces a new Policy Assignment to be created.
         * 
         * @return builder
         * 
         */
        public Builder subscriptionId(String subscriptionId) {
            return subscriptionId(Output.of(subscriptionId));
        }

        public SubscriptionPolicyAssignmentState build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy