Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azure.policy.DefinitionArgs 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.
// *** 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;
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 DefinitionArgs extends com.pulumi.resources.ResourceArgs {
public static final DefinitionArgs Empty = new DefinitionArgs();
/**
* The description of the policy definition.
*
*/
@Import(name="description")
private @Nullable Output description;
/**
* @return The description of the policy definition.
*
*/
public Optional> description() {
return Optional.ofNullable(this.description);
}
/**
* The display name of the policy definition.
*
*/
@Import(name="displayName", required=true)
private Output displayName;
/**
* @return The display name of the policy definition.
*
*/
public Output displayName() {
return this.displayName;
}
/**
* The id of the Management Group where this policy should be defined. Changing this forces a new resource to be created.
*
*/
@Import(name="managementGroupId")
private @Nullable Output managementGroupId;
/**
* @return The id of the Management Group where this policy should be defined. Changing this forces a new resource to be created.
*
*/
public Optional> managementGroupId() {
return Optional.ofNullable(this.managementGroupId);
}
/**
* The metadata for the policy definition. This is a JSON string representing additional metadata that should be stored with the policy definition.
*
*/
@Import(name="metadata")
private @Nullable Output metadata;
/**
* @return The metadata for the policy definition. This is a JSON string representing additional metadata that should be stored with the policy definition.
*
*/
public Optional> metadata() {
return Optional.ofNullable(this.metadata);
}
/**
* The policy resource manager mode that allows you to specify which resource types will be evaluated. Possible values are `All`, `Indexed`, `Microsoft.ContainerService.Data`, `Microsoft.CustomerLockbox.Data`, `Microsoft.DataCatalog.Data`, `Microsoft.KeyVault.Data`, `Microsoft.Kubernetes.Data`, `Microsoft.MachineLearningServices.Data`, `Microsoft.Network.Data` and `Microsoft.Synapse.Data`.
*
* > **Note:** Other resource provider modes only support built-in policy definitions but may later become available in custom definitions, these include; `Microsoft.ContainerService.Data`, `Microsoft.CustomerLockbox.Data`, `Microsoft.DataCatalog.Data`, `Microsoft.KeyVault.Data`, `Microsoft.Kubernetes.Data`, `Microsoft.MachineLearningServices.Data`, `Microsoft.Network.Data` and `Microsoft.Synapse.Data`. [See here](https://docs.microsoft.com/en-us/azure/governance/policy/concepts/definition-structure#resource-provider-modes) for more details.
*
*/
@Import(name="mode", required=true)
private Output mode;
/**
* @return The policy resource manager mode that allows you to specify which resource types will be evaluated. Possible values are `All`, `Indexed`, `Microsoft.ContainerService.Data`, `Microsoft.CustomerLockbox.Data`, `Microsoft.DataCatalog.Data`, `Microsoft.KeyVault.Data`, `Microsoft.Kubernetes.Data`, `Microsoft.MachineLearningServices.Data`, `Microsoft.Network.Data` and `Microsoft.Synapse.Data`.
*
* > **Note:** Other resource provider modes only support built-in policy definitions but may later become available in custom definitions, these include; `Microsoft.ContainerService.Data`, `Microsoft.CustomerLockbox.Data`, `Microsoft.DataCatalog.Data`, `Microsoft.KeyVault.Data`, `Microsoft.Kubernetes.Data`, `Microsoft.MachineLearningServices.Data`, `Microsoft.Network.Data` and `Microsoft.Synapse.Data`. [See here](https://docs.microsoft.com/en-us/azure/governance/policy/concepts/definition-structure#resource-provider-modes) for more details.
*
*/
public Output mode() {
return this.mode;
}
/**
* The name of the policy definition. Changing this forces a new resource to be created.
*
*/
@Import(name="name")
private @Nullable Output name;
/**
* @return The name of the policy definition. Changing this forces a new resource to be created.
*
*/
public Optional> name() {
return Optional.ofNullable(this.name);
}
/**
* Parameters for the policy definition. This field is a JSON string that allows you to parameterize your policy definition.
*
*/
@Import(name="parameters")
private @Nullable Output parameters;
/**
* @return Parameters for the policy definition. This field is a JSON string that allows you to parameterize your policy definition.
*
*/
public Optional> parameters() {
return Optional.ofNullable(this.parameters);
}
/**
* The policy rule for the policy definition. This is a JSON string representing the rule that contains an if and a then block.
*
*/
@Import(name="policyRule")
private @Nullable Output policyRule;
/**
* @return The policy rule for the policy definition. This is a JSON string representing the rule that contains an if and a then block.
*
*/
public Optional> policyRule() {
return Optional.ofNullable(this.policyRule);
}
/**
* The policy type. Possible values are `BuiltIn`, `Custom`, `NotSpecified` and `Static`. Changing this forces a new resource to be created.
*
*/
@Import(name="policyType", required=true)
private Output policyType;
/**
* @return The policy type. Possible values are `BuiltIn`, `Custom`, `NotSpecified` and `Static`. Changing this forces a new resource to be created.
*
*/
public Output policyType() {
return this.policyType;
}
private DefinitionArgs() {}
private DefinitionArgs(DefinitionArgs $) {
this.description = $.description;
this.displayName = $.displayName;
this.managementGroupId = $.managementGroupId;
this.metadata = $.metadata;
this.mode = $.mode;
this.name = $.name;
this.parameters = $.parameters;
this.policyRule = $.policyRule;
this.policyType = $.policyType;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(DefinitionArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private DefinitionArgs $;
public Builder() {
$ = new DefinitionArgs();
}
public Builder(DefinitionArgs defaults) {
$ = new DefinitionArgs(Objects.requireNonNull(defaults));
}
/**
* @param description The description of the policy definition.
*
* @return builder
*
*/
public Builder description(@Nullable Output description) {
$.description = description;
return this;
}
/**
* @param description The description of the policy definition.
*
* @return builder
*
*/
public Builder description(String description) {
return description(Output.of(description));
}
/**
* @param displayName The display name of the policy definition.
*
* @return builder
*
*/
public Builder displayName(Output displayName) {
$.displayName = displayName;
return this;
}
/**
* @param displayName The display name of the policy definition.
*
* @return builder
*
*/
public Builder displayName(String displayName) {
return displayName(Output.of(displayName));
}
/**
* @param managementGroupId The id of the Management Group where this policy should be defined. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder managementGroupId(@Nullable Output managementGroupId) {
$.managementGroupId = managementGroupId;
return this;
}
/**
* @param managementGroupId The id of the Management Group where this policy should be defined. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder managementGroupId(String managementGroupId) {
return managementGroupId(Output.of(managementGroupId));
}
/**
* @param metadata The metadata for the policy definition. This is a JSON string representing additional metadata that should be stored with the policy definition.
*
* @return builder
*
*/
public Builder metadata(@Nullable Output metadata) {
$.metadata = metadata;
return this;
}
/**
* @param metadata The metadata for the policy definition. This is a JSON string representing additional metadata that should be stored with the policy definition.
*
* @return builder
*
*/
public Builder metadata(String metadata) {
return metadata(Output.of(metadata));
}
/**
* @param mode The policy resource manager mode that allows you to specify which resource types will be evaluated. Possible values are `All`, `Indexed`, `Microsoft.ContainerService.Data`, `Microsoft.CustomerLockbox.Data`, `Microsoft.DataCatalog.Data`, `Microsoft.KeyVault.Data`, `Microsoft.Kubernetes.Data`, `Microsoft.MachineLearningServices.Data`, `Microsoft.Network.Data` and `Microsoft.Synapse.Data`.
*
* > **Note:** Other resource provider modes only support built-in policy definitions but may later become available in custom definitions, these include; `Microsoft.ContainerService.Data`, `Microsoft.CustomerLockbox.Data`, `Microsoft.DataCatalog.Data`, `Microsoft.KeyVault.Data`, `Microsoft.Kubernetes.Data`, `Microsoft.MachineLearningServices.Data`, `Microsoft.Network.Data` and `Microsoft.Synapse.Data`. [See here](https://docs.microsoft.com/en-us/azure/governance/policy/concepts/definition-structure#resource-provider-modes) for more details.
*
* @return builder
*
*/
public Builder mode(Output mode) {
$.mode = mode;
return this;
}
/**
* @param mode The policy resource manager mode that allows you to specify which resource types will be evaluated. Possible values are `All`, `Indexed`, `Microsoft.ContainerService.Data`, `Microsoft.CustomerLockbox.Data`, `Microsoft.DataCatalog.Data`, `Microsoft.KeyVault.Data`, `Microsoft.Kubernetes.Data`, `Microsoft.MachineLearningServices.Data`, `Microsoft.Network.Data` and `Microsoft.Synapse.Data`.
*
* > **Note:** Other resource provider modes only support built-in policy definitions but may later become available in custom definitions, these include; `Microsoft.ContainerService.Data`, `Microsoft.CustomerLockbox.Data`, `Microsoft.DataCatalog.Data`, `Microsoft.KeyVault.Data`, `Microsoft.Kubernetes.Data`, `Microsoft.MachineLearningServices.Data`, `Microsoft.Network.Data` and `Microsoft.Synapse.Data`. [See here](https://docs.microsoft.com/en-us/azure/governance/policy/concepts/definition-structure#resource-provider-modes) for more details.
*
* @return builder
*
*/
public Builder mode(String mode) {
return mode(Output.of(mode));
}
/**
* @param name The name of the policy definition. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder name(@Nullable Output name) {
$.name = name;
return this;
}
/**
* @param name The name of the policy definition. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder name(String name) {
return name(Output.of(name));
}
/**
* @param parameters Parameters for the policy definition. This field is a JSON string that allows you to parameterize your policy definition.
*
* @return builder
*
*/
public Builder parameters(@Nullable Output parameters) {
$.parameters = parameters;
return this;
}
/**
* @param parameters Parameters for the policy definition. This field is a JSON string that allows you to parameterize your policy definition.
*
* @return builder
*
*/
public Builder parameters(String parameters) {
return parameters(Output.of(parameters));
}
/**
* @param policyRule The policy rule for the policy definition. This is a JSON string representing the rule that contains an if and a then block.
*
* @return builder
*
*/
public Builder policyRule(@Nullable Output policyRule) {
$.policyRule = policyRule;
return this;
}
/**
* @param policyRule The policy rule for the policy definition. This is a JSON string representing the rule that contains an if and a then block.
*
* @return builder
*
*/
public Builder policyRule(String policyRule) {
return policyRule(Output.of(policyRule));
}
/**
* @param policyType The policy type. Possible values are `BuiltIn`, `Custom`, `NotSpecified` and `Static`. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder policyType(Output policyType) {
$.policyType = policyType;
return this;
}
/**
* @param policyType The policy type. Possible values are `BuiltIn`, `Custom`, `NotSpecified` and `Static`. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder policyType(String policyType) {
return policyType(Output.of(policyType));
}
public DefinitionArgs build() {
if ($.displayName == null) {
throw new MissingRequiredPropertyException("DefinitionArgs", "displayName");
}
if ($.mode == null) {
throw new MissingRequiredPropertyException("DefinitionArgs", "mode");
}
if ($.policyType == null) {
throw new MissingRequiredPropertyException("DefinitionArgs", "policyType");
}
return $;
}
}
}