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

com.pulumi.azurenative.subscription.Alias Maven / Gradle / Ivy

// *** 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.subscription;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.subscription.AliasArgs;
import com.pulumi.azurenative.subscription.outputs.SubscriptionAliasResponsePropertiesResponse;
import com.pulumi.azurenative.subscription.outputs.SystemDataResponse;
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.String;
import java.util.List;
import javax.annotation.Nullable;

/**
 * Subscription Information with the alias.
 * Azure REST API version: 2021-10-01. Prior API version in Azure Native 1.x: 2020-09-01.
 * 
 * Other available API versions: 2020-09-01, 2024-08-01-preview.
 * 
 * ## Example Usage
 * ### CreateAlias
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.subscription.Alias;
 * import com.pulumi.azurenative.subscription.AliasArgs;
 * import com.pulumi.azurenative.subscription.inputs.PutAliasRequestPropertiesArgs;
 * import com.pulumi.azurenative.subscription.inputs.PutAliasRequestAdditionalPropertiesArgs;
 * 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 alias = new Alias("alias", AliasArgs.builder()
 *             .aliasName("aliasForNewSub")
 *             .properties(PutAliasRequestPropertiesArgs.builder()
 *                 .additionalProperties(PutAliasRequestAdditionalPropertiesArgs.builder()
 *                     .subscriptionOwnerId("f09b39eb-c496-482c-9ab9-afd799572f4c")
 *                     .subscriptionTenantId("66f6e4d6-07dc-4aea-94ea-e12d3026a3c8")
 *                     .tags(Map.ofEntries(
 *                         Map.entry("tag1", "Messi"),
 *                         Map.entry("tag2", "Ronaldo"),
 *                         Map.entry("tag3", "Lebron")
 *                     ))
 *                     .build())
 *                 .billingScope("/billingAccounts/af6231a7-7f8d-4fcc-a993-dd8466108d07:c663dac6-a9a5-405a-8938-cd903e12ab5b_2019_05_31/billingProfiles/QWDQ-QWHI-AUW-SJDO-DJH/invoiceSections/FEUF-EUHE-ISJ-SKDW-DJH")
 *                 .displayName("Test Subscription")
 *                 .workload("Production")
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:subscription:Alias string /providers/Microsoft.Subscription/aliases/{aliasName} * ``` * */ @ResourceType(type="azure-native:subscription:Alias") public class Alias extends com.pulumi.resources.CustomResource { /** * Alias ID. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Alias ID. * */ public Output name() { return this.name; } /** * Subscription Alias response properties. * */ @Export(name="properties", refs={SubscriptionAliasResponsePropertiesResponse.class}, tree="[0]") private Output properties; /** * @return Subscription Alias response properties. * */ public Output properties() { return this.properties; } /** * Metadata pertaining to creation and last modification of the resource. * */ @Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]") private Output systemData; /** * @return Metadata pertaining to creation and last modification of the resource. * */ public Output systemData() { return this.systemData; } /** * Resource type, Microsoft.Subscription/aliases. * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return Resource type, Microsoft.Subscription/aliases. * */ public Output type() { return this.type; } /** * * @param name The _unique_ name of the resulting resource. */ public Alias(java.lang.String name) { this(name, AliasArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Alias(java.lang.String name, @Nullable AliasArgs 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 Alias(java.lang.String name, @Nullable AliasArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:subscription:Alias", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Alias(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:subscription:Alias", name, null, makeResourceOptions(options, id), false); } private static AliasArgs makeArgs(@Nullable AliasArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? AliasArgs.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(com.pulumi.core.Alias.builder().type("azure-native:subscription/v20191001preview:Alias").build()), Output.of(com.pulumi.core.Alias.builder().type("azure-native:subscription/v20200901:Alias").build()), Output.of(com.pulumi.core.Alias.builder().type("azure-native:subscription/v20211001:Alias").build()), Output.of(com.pulumi.core.Alias.builder().type("azure-native:subscription/v20240801preview:Alias").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 Alias get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Alias(name, id, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy