1. Packages
  2. Azure Native v1
  3. API Docs
  4. subscription
  5. Alias
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

azure-native.subscription.Alias

Explore with Pulumi AI

azure-native-v1 logo
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

    Subscription Information with the alias. API Version: 2020-09-01.

    Example Usage

    CreateAlias

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var @alias = new AzureNative.Subscription.Alias("alias", new()
        {
            AliasName = "aliasForNewSub",
            Properties = new AzureNative.Subscription.Inputs.PutAliasRequestPropertiesArgs
            {
                BillingScope = "/providers/Microsoft.Billing/billingAccounts/e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31/billingProfiles/PE2Q-NOIT-BG7-TGB/invoiceSections/MTT4-OBS7-PJA-TGB",
                DisplayName = "Contoso MCA subscription",
                Workload = "Production",
            },
        });
    
    });
    
    package main
    
    import (
    	subscription "github.com/pulumi/pulumi-azure-native-sdk/subscription"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := subscription.NewAlias(ctx, "alias", &subscription.AliasArgs{
    			AliasName: pulumi.String("aliasForNewSub"),
    			Properties: &subscription.PutAliasRequestPropertiesArgs{
    				BillingScope: pulumi.String("/providers/Microsoft.Billing/billingAccounts/e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31/billingProfiles/PE2Q-NOIT-BG7-TGB/invoiceSections/MTT4-OBS7-PJA-TGB"),
    				DisplayName:  pulumi.String("Contoso MCA subscription"),
    				Workload:     pulumi.String("Production"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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 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(Map.ofEntries(
                    Map.entry("billingScope", "/providers/Microsoft.Billing/billingAccounts/e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31/billingProfiles/PE2Q-NOIT-BG7-TGB/invoiceSections/MTT4-OBS7-PJA-TGB"),
                    Map.entry("displayName", "Contoso MCA subscription"),
                    Map.entry("workload", "Production")
                ))
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    alias = azure_native.subscription.Alias("alias",
        alias_name="aliasForNewSub",
        properties=azure_native.subscription.PutAliasRequestPropertiesArgs(
            billing_scope="/providers/Microsoft.Billing/billingAccounts/e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31/billingProfiles/PE2Q-NOIT-BG7-TGB/invoiceSections/MTT4-OBS7-PJA-TGB",
            display_name="Contoso MCA subscription",
            workload="Production",
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const alias = new azure_native.subscription.Alias("alias", {
        aliasName: "aliasForNewSub",
        properties: {
            billingScope: "/providers/Microsoft.Billing/billingAccounts/e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31/billingProfiles/PE2Q-NOIT-BG7-TGB/invoiceSections/MTT4-OBS7-PJA-TGB",
            displayName: "Contoso MCA subscription",
            workload: "Production",
        },
    });
    
    resources:
      alias:
        type: azure-native:subscription:Alias
        properties:
          aliasName: aliasForNewSub
          properties:
            billingScope: /providers/Microsoft.Billing/billingAccounts/e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31/billingProfiles/PE2Q-NOIT-BG7-TGB/invoiceSections/MTT4-OBS7-PJA-TGB
            displayName: Contoso MCA subscription
            workload: Production
    

    Create Alias Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Alias(name: string, args: AliasArgs, opts?: CustomResourceOptions);
    @overload
    def Alias(resource_name: str,
              args: AliasArgs,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Alias(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              properties: Optional[PutAliasRequestPropertiesArgs] = None,
              alias_name: Optional[str] = None)
    func NewAlias(ctx *Context, name string, args AliasArgs, opts ...ResourceOption) (*Alias, error)
    public Alias(string name, AliasArgs args, CustomResourceOptions? opts = null)
    public Alias(String name, AliasArgs args)
    public Alias(String name, AliasArgs args, CustomResourceOptions options)
    
    type: azure-native:subscription:Alias
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args AliasArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args AliasArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args AliasArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AliasArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AliasArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var aliasResource = new AzureNative.Subscription.Alias("aliasResource", new()
    {
        Properties = 
        {
            { "billingScope", "string" },
            { "displayName", "string" },
            { "resellerId", "string" },
            { "subscriptionId", "string" },
            { "workload", "string" },
        },
        AliasName = "string",
    });
    
    example, err := subscription.NewAlias(ctx, "aliasResource", &subscription.AliasArgs{
    	Properties: map[string]interface{}{
    		"billingScope":   "string",
    		"displayName":    "string",
    		"resellerId":     "string",
    		"subscriptionId": "string",
    		"workload":       "string",
    	},
    	AliasName: "string",
    })
    
    var aliasResource = new Alias("aliasResource", AliasArgs.builder()
        .properties(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
        .aliasName("string")
        .build());
    
    alias_resource = azure_native.subscription.Alias("aliasResource",
        properties={
            billingScope: string,
            displayName: string,
            resellerId: string,
            subscriptionId: string,
            workload: string,
        },
        alias_name=string)
    
    const aliasResource = new azure_native.subscription.Alias("aliasResource", {
        properties: {
            billingScope: "string",
            displayName: "string",
            resellerId: "string",
            subscriptionId: "string",
            workload: "string",
        },
        aliasName: "string",
    });
    
    type: azure-native:subscription:Alias
    properties:
        aliasName: string
        properties:
            billingScope: string
            displayName: string
            resellerId: string
            subscriptionId: string
            workload: string
    

    Alias Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Alias resource accepts the following input properties:

    Properties Pulumi.AzureNative.Subscription.Inputs.PutAliasRequestProperties
    Put alias request properties.
    AliasName string
    Name for this subscription creation request also known as alias. Note that this is not the same as subscription name and this doesn’t have any other lifecycle need beyond the request for subscription creation.
    Properties PutAliasRequestPropertiesArgs
    Put alias request properties.
    AliasName string
    Name for this subscription creation request also known as alias. Note that this is not the same as subscription name and this doesn’t have any other lifecycle need beyond the request for subscription creation.
    properties PutAliasRequestProperties
    Put alias request properties.
    aliasName String
    Name for this subscription creation request also known as alias. Note that this is not the same as subscription name and this doesn’t have any other lifecycle need beyond the request for subscription creation.
    properties PutAliasRequestProperties
    Put alias request properties.
    aliasName string
    Name for this subscription creation request also known as alias. Note that this is not the same as subscription name and this doesn’t have any other lifecycle need beyond the request for subscription creation.
    properties PutAliasRequestPropertiesArgs
    Put alias request properties.
    alias_name str
    Name for this subscription creation request also known as alias. Note that this is not the same as subscription name and this doesn’t have any other lifecycle need beyond the request for subscription creation.
    properties Property Map
    Put alias request properties.
    aliasName String
    Name for this subscription creation request also known as alias. Note that this is not the same as subscription name and this doesn’t have any other lifecycle need beyond the request for subscription creation.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Alias resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Alias ID.
    Type string
    Resource type, Microsoft.Subscription/aliases.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Alias ID.
    Type string
    Resource type, Microsoft.Subscription/aliases.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Alias ID.
    type String
    Resource type, Microsoft.Subscription/aliases.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Alias ID.
    type string
    Resource type, Microsoft.Subscription/aliases.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    Alias ID.
    type str
    Resource type, Microsoft.Subscription/aliases.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Alias ID.
    type String
    Resource type, Microsoft.Subscription/aliases.

    Supporting Types

    PutAliasRequestProperties, PutAliasRequestPropertiesArgs

    BillingScope string
    Determines whether subscription is fieldLed, partnerLed or LegacyEA
    DisplayName string
    The friendly name of the subscription.
    ResellerId string
    Reseller ID, basically MPN Id
    SubscriptionId string
    This parameter can be used to create alias for existing subscription Id
    Workload string | Pulumi.AzureNative.Subscription.Workload
    The workload type of the subscription. It can be either Production or DevTest.
    BillingScope string
    Determines whether subscription is fieldLed, partnerLed or LegacyEA
    DisplayName string
    The friendly name of the subscription.
    ResellerId string
    Reseller ID, basically MPN Id
    SubscriptionId string
    This parameter can be used to create alias for existing subscription Id
    Workload string | Workload
    The workload type of the subscription. It can be either Production or DevTest.
    billingScope String
    Determines whether subscription is fieldLed, partnerLed or LegacyEA
    displayName String
    The friendly name of the subscription.
    resellerId String
    Reseller ID, basically MPN Id
    subscriptionId String
    This parameter can be used to create alias for existing subscription Id
    workload String | Workload
    The workload type of the subscription. It can be either Production or DevTest.
    billingScope string
    Determines whether subscription is fieldLed, partnerLed or LegacyEA
    displayName string
    The friendly name of the subscription.
    resellerId string
    Reseller ID, basically MPN Id
    subscriptionId string
    This parameter can be used to create alias for existing subscription Id
    workload string | Workload
    The workload type of the subscription. It can be either Production or DevTest.
    billing_scope str
    Determines whether subscription is fieldLed, partnerLed or LegacyEA
    display_name str
    The friendly name of the subscription.
    reseller_id str
    Reseller ID, basically MPN Id
    subscription_id str
    This parameter can be used to create alias for existing subscription Id
    workload str | Workload
    The workload type of the subscription. It can be either Production or DevTest.
    billingScope String
    Determines whether subscription is fieldLed, partnerLed or LegacyEA
    displayName String
    The friendly name of the subscription.
    resellerId String
    Reseller ID, basically MPN Id
    subscriptionId String
    This parameter can be used to create alias for existing subscription Id
    workload String | "Production" | "DevTest"
    The workload type of the subscription. It can be either Production or DevTest.

    PutAliasResponsePropertiesResponse, PutAliasResponsePropertiesResponseArgs

    SubscriptionId string
    Newly created subscription Id.
    ProvisioningState string
    The provisioning state of the resource.
    SubscriptionId string
    Newly created subscription Id.
    ProvisioningState string
    The provisioning state of the resource.
    subscriptionId String
    Newly created subscription Id.
    provisioningState String
    The provisioning state of the resource.
    subscriptionId string
    Newly created subscription Id.
    provisioningState string
    The provisioning state of the resource.
    subscription_id str
    Newly created subscription Id.
    provisioning_state str
    The provisioning state of the resource.
    subscriptionId String
    Newly created subscription Id.
    provisioningState String
    The provisioning state of the resource.

    Workload, WorkloadArgs

    Production
    Production
    DevTest
    DevTest
    WorkloadProduction
    Production
    WorkloadDevTest
    DevTest
    Production
    Production
    DevTest
    DevTest
    Production
    Production
    DevTest
    DevTest
    PRODUCTION
    Production
    DEV_TEST
    DevTest
    "Production"
    Production
    "DevTest"
    DevTest

    Import

    An existing resource can be imported using its type token, name, and identifier, e.g.

    $ pulumi import azure-native:subscription:Alias aliasForNewSub /providers/Microsoft.Subscription/aliases/aliasForNewSub 
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    azure-native-v1 pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native-v1 logo
    These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
    Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi