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

com.pulumi.azurenative.authorization.PolicySetDefinitionVersionAtManagementGroup Maven / Gradle / Ivy

The 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.azurenative.authorization;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.authorization.PolicySetDefinitionVersionAtManagementGroupArgs;
import com.pulumi.azurenative.authorization.outputs.ParameterDefinitionsValueResponse;
import com.pulumi.azurenative.authorization.outputs.PolicyDefinitionGroupResponse;
import com.pulumi.azurenative.authorization.outputs.PolicyDefinitionReferenceResponse;
import com.pulumi.azurenative.authorization.outputs.SystemDataResponse;
import com.pulumi.core.Alias;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Object;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * The policy set definition version.
 * Azure REST API version: 2023-04-01.
 * 
 * Other available API versions: 2024-05-01.
 * 
 * ## Example Usage
 * ### Create or update a policy set definition version at management group level
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.authorization.PolicySetDefinitionVersionAtManagementGroup;
 * import com.pulumi.azurenative.authorization.PolicySetDefinitionVersionAtManagementGroupArgs;
 * import com.pulumi.azurenative.authorization.inputs.PolicyDefinitionReferenceArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var policySetDefinitionVersionAtManagementGroup = new PolicySetDefinitionVersionAtManagementGroup("policySetDefinitionVersionAtManagementGroup", PolicySetDefinitionVersionAtManagementGroupArgs.builder()
 *             .description("Policies to enforce low cost storage SKUs")
 *             .displayName("Cost Management")
 *             .managementGroupName("MyManagementGroup")
 *             .metadata(Map.of("category", "Cost Management"))
 *             .policyDefinitionVersion("1.2.1")
 *             .policyDefinitions(            
 *                 PolicyDefinitionReferenceArgs.builder()
 *                     .parameters(Map.of("listOfAllowedSKUs", Map.of("value",                     
 *                         "Standard_GRS",
 *                         "Standard_LRS")))
 *                     .policyDefinitionId("/providers/Microsoft.Management/managementgroups/MyManagementGroup/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1")
 *                     .policyDefinitionReferenceId("Limit_Skus")
 *                     .build(),
 *                 PolicyDefinitionReferenceArgs.builder()
 *                     .parameters(Map.ofEntries(
 *                         Map.entry("prefix", Map.of("value", "DeptA")),
 *                         Map.entry("suffix", Map.of("value", "-LC"))
 *                     ))
 *                     .policyDefinitionId("/providers/Microsoft.Management/managementgroups/MyManagementGroup/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming")
 *                     .policyDefinitionReferenceId("Resource_Naming")
 *                     .build())
 *             .policySetDefinitionName("CostManagement")
 *             .version("1.2.1")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:authorization:PolicySetDefinitionVersionAtManagementGroup CostManagement /providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}/versions/{policyDefinitionVersion} * ``` * */ @ResourceType(type="azure-native:authorization:PolicySetDefinitionVersionAtManagementGroup") public class PolicySetDefinitionVersionAtManagementGroup extends com.pulumi.resources.CustomResource { /** * The policy set definition description. * */ @Export(name="description", refs={String.class}, tree="[0]") private Output description; /** * @return The policy set definition description. * */ public Output> description() { return Codegen.optional(this.description); } /** * The display name of the policy set definition. * */ @Export(name="displayName", refs={String.class}, tree="[0]") private Output displayName; /** * @return The display name of the policy set definition. * */ public Output> displayName() { return Codegen.optional(this.displayName); } /** * The policy set definition metadata. Metadata is an open ended object and is typically a collection of key value pairs. * */ @Export(name="metadata", refs={Object.class}, tree="[0]") private Output metadata; /** * @return The policy set definition metadata. Metadata is an open ended object and is typically a collection of key value pairs. * */ public Output> metadata() { return Codegen.optional(this.metadata); } /** * The name of the policy set definition version. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name of the policy set definition version. * */ public Output name() { return this.name; } /** * The policy set definition parameters that can be used in policy definition references. * */ @Export(name="parameters", refs={Map.class,String.class,ParameterDefinitionsValueResponse.class}, tree="[0,1,2]") private Output> parameters; /** * @return The policy set definition parameters that can be used in policy definition references. * */ public Output>> parameters() { return Codegen.optional(this.parameters); } /** * The metadata describing groups of policy definition references within the policy set definition. * */ @Export(name="policyDefinitionGroups", refs={List.class,PolicyDefinitionGroupResponse.class}, tree="[0,1]") private Output> policyDefinitionGroups; /** * @return The metadata describing groups of policy definition references within the policy set definition. * */ public Output>> policyDefinitionGroups() { return Codegen.optional(this.policyDefinitionGroups); } /** * An array of policy definition references. * */ @Export(name="policyDefinitions", refs={List.class,PolicyDefinitionReferenceResponse.class}, tree="[0,1]") private Output> policyDefinitions; /** * @return An array of policy definition references. * */ public Output> policyDefinitions() { return this.policyDefinitions; } /** * The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static. * */ @Export(name="policyType", refs={String.class}, tree="[0]") private Output policyType; /** * @return The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static. * */ public Output> policyType() { return Codegen.optional(this.policyType); } /** * The system metadata relating to this resource. * */ @Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]") private Output systemData; /** * @return The system metadata relating to this resource. * */ public Output systemData() { return this.systemData; } /** * The type of the resource (Microsoft.Authorization/policySetDefinitions/versions). * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return The type of the resource (Microsoft.Authorization/policySetDefinitions/versions). * */ public Output type() { return this.type; } /** * The policy set definition version in #.#.# format. * */ @Export(name="version", refs={String.class}, tree="[0]") private Output version; /** * @return The policy set definition version in #.#.# format. * */ public Output> version() { return Codegen.optional(this.version); } /** * * @param name The _unique_ name of the resulting resource. */ public PolicySetDefinitionVersionAtManagementGroup(java.lang.String name) { this(name, PolicySetDefinitionVersionAtManagementGroupArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public PolicySetDefinitionVersionAtManagementGroup(java.lang.String name, PolicySetDefinitionVersionAtManagementGroupArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public PolicySetDefinitionVersionAtManagementGroup(java.lang.String name, PolicySetDefinitionVersionAtManagementGroupArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:authorization:PolicySetDefinitionVersionAtManagementGroup", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private PolicySetDefinitionVersionAtManagementGroup(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:authorization:PolicySetDefinitionVersionAtManagementGroup", name, null, makeResourceOptions(options, id), false); } private static PolicySetDefinitionVersionAtManagementGroupArgs makeArgs(PolicySetDefinitionVersionAtManagementGroupArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? PolicySetDefinitionVersionAtManagementGroupArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .aliases(List.of( Output.of(Alias.builder().type("azure-native:authorization/v20230401:PolicySetDefinitionVersionAtManagementGroup").build()), Output.of(Alias.builder().type("azure-native:authorization/v20240501:PolicySetDefinitionVersionAtManagementGroup").build()) )) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param options Optional settings to control the behavior of the CustomResource. */ public static PolicySetDefinitionVersionAtManagementGroup get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new PolicySetDefinitionVersionAtManagementGroup(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy