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

com.pulumi.azure.policy.outputs.GetPolicyDefintionResult 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.policy.outputs;

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

@CustomType
public final class GetPolicyDefintionResult {
    /**
     * @return The Description of the Policy.
     * 
     */
    private String description;
    private String displayName;
    /**
     * @return The provider-assigned unique ID for this managed resource.
     * 
     */
    private String id;
    private @Nullable String managementGroupName;
    /**
     * @return Any Metadata defined in the Policy.
     * 
     */
    private String metadata;
    /**
     * @return The Mode of the Policy.
     * 
     */
    private String mode;
    private String name;
    /**
     * @return Any Parameters defined in the Policy.
     * 
     */
    private String parameters;
    /**
     * @return The Rule as defined (in JSON) in the Policy.
     * 
     */
    private String policyRule;
    /**
     * @return The Type of the Policy. Possible values are `BuiltIn`, `Custom` and `NotSpecified`.
     * 
     */
    private String policyType;
    /**
     * @return A list of role definition id extracted from `policy_rule` required for remediation.
     * 
     */
    private List roleDefinitionIds;
    /**
     * @return The Type of Policy.
     * 
     */
    private String type;

    private GetPolicyDefintionResult() {}
    /**
     * @return The Description of the Policy.
     * 
     */
    public String description() {
        return this.description;
    }
    public String displayName() {
        return this.displayName;
    }
    /**
     * @return The provider-assigned unique ID for this managed resource.
     * 
     */
    public String id() {
        return this.id;
    }
    public Optional managementGroupName() {
        return Optional.ofNullable(this.managementGroupName);
    }
    /**
     * @return Any Metadata defined in the Policy.
     * 
     */
    public String metadata() {
        return this.metadata;
    }
    /**
     * @return The Mode of the Policy.
     * 
     */
    public String mode() {
        return this.mode;
    }
    public String name() {
        return this.name;
    }
    /**
     * @return Any Parameters defined in the Policy.
     * 
     */
    public String parameters() {
        return this.parameters;
    }
    /**
     * @return The Rule as defined (in JSON) in the Policy.
     * 
     */
    public String policyRule() {
        return this.policyRule;
    }
    /**
     * @return The Type of the Policy. Possible values are `BuiltIn`, `Custom` and `NotSpecified`.
     * 
     */
    public String policyType() {
        return this.policyType;
    }
    /**
     * @return A list of role definition id extracted from `policy_rule` required for remediation.
     * 
     */
    public List roleDefinitionIds() {
        return this.roleDefinitionIds;
    }
    /**
     * @return The Type of Policy.
     * 
     */
    public String type() {
        return this.type;
    }

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

    public static Builder builder(GetPolicyDefintionResult defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private String description;
        private String displayName;
        private String id;
        private @Nullable String managementGroupName;
        private String metadata;
        private String mode;
        private String name;
        private String parameters;
        private String policyRule;
        private String policyType;
        private List roleDefinitionIds;
        private String type;
        public Builder() {}
        public Builder(GetPolicyDefintionResult defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.description = defaults.description;
    	      this.displayName = defaults.displayName;
    	      this.id = defaults.id;
    	      this.managementGroupName = defaults.managementGroupName;
    	      this.metadata = defaults.metadata;
    	      this.mode = defaults.mode;
    	      this.name = defaults.name;
    	      this.parameters = defaults.parameters;
    	      this.policyRule = defaults.policyRule;
    	      this.policyType = defaults.policyType;
    	      this.roleDefinitionIds = defaults.roleDefinitionIds;
    	      this.type = defaults.type;
        }

        @CustomType.Setter
        public Builder description(String description) {
            if (description == null) {
              throw new MissingRequiredPropertyException("GetPolicyDefintionResult", "description");
            }
            this.description = description;
            return this;
        }
        @CustomType.Setter
        public Builder displayName(String displayName) {
            if (displayName == null) {
              throw new MissingRequiredPropertyException("GetPolicyDefintionResult", "displayName");
            }
            this.displayName = displayName;
            return this;
        }
        @CustomType.Setter
        public Builder id(String id) {
            if (id == null) {
              throw new MissingRequiredPropertyException("GetPolicyDefintionResult", "id");
            }
            this.id = id;
            return this;
        }
        @CustomType.Setter
        public Builder managementGroupName(@Nullable String managementGroupName) {

            this.managementGroupName = managementGroupName;
            return this;
        }
        @CustomType.Setter
        public Builder metadata(String metadata) {
            if (metadata == null) {
              throw new MissingRequiredPropertyException("GetPolicyDefintionResult", "metadata");
            }
            this.metadata = metadata;
            return this;
        }
        @CustomType.Setter
        public Builder mode(String mode) {
            if (mode == null) {
              throw new MissingRequiredPropertyException("GetPolicyDefintionResult", "mode");
            }
            this.mode = mode;
            return this;
        }
        @CustomType.Setter
        public Builder name(String name) {
            if (name == null) {
              throw new MissingRequiredPropertyException("GetPolicyDefintionResult", "name");
            }
            this.name = name;
            return this;
        }
        @CustomType.Setter
        public Builder parameters(String parameters) {
            if (parameters == null) {
              throw new MissingRequiredPropertyException("GetPolicyDefintionResult", "parameters");
            }
            this.parameters = parameters;
            return this;
        }
        @CustomType.Setter
        public Builder policyRule(String policyRule) {
            if (policyRule == null) {
              throw new MissingRequiredPropertyException("GetPolicyDefintionResult", "policyRule");
            }
            this.policyRule = policyRule;
            return this;
        }
        @CustomType.Setter
        public Builder policyType(String policyType) {
            if (policyType == null) {
              throw new MissingRequiredPropertyException("GetPolicyDefintionResult", "policyType");
            }
            this.policyType = policyType;
            return this;
        }
        @CustomType.Setter
        public Builder roleDefinitionIds(List roleDefinitionIds) {
            if (roleDefinitionIds == null) {
              throw new MissingRequiredPropertyException("GetPolicyDefintionResult", "roleDefinitionIds");
            }
            this.roleDefinitionIds = roleDefinitionIds;
            return this;
        }
        public Builder roleDefinitionIds(String... roleDefinitionIds) {
            return roleDefinitionIds(List.of(roleDefinitionIds));
        }
        @CustomType.Setter
        public Builder type(String type) {
            if (type == null) {
              throw new MissingRequiredPropertyException("GetPolicyDefintionResult", "type");
            }
            this.type = type;
            return this;
        }
        public GetPolicyDefintionResult build() {
            final var _resultValue = new GetPolicyDefintionResult();
            _resultValue.description = description;
            _resultValue.displayName = displayName;
            _resultValue.id = id;
            _resultValue.managementGroupName = managementGroupName;
            _resultValue.metadata = metadata;
            _resultValue.mode = mode;
            _resultValue.name = name;
            _resultValue.parameters = parameters;
            _resultValue.policyRule = policyRule;
            _resultValue.policyType = policyType;
            _resultValue.roleDefinitionIds = roleDefinitionIds;
            _resultValue.type = type;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy