azure-native.subscription.Alias
Explore with Pulumi AI
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)
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Alias resource accepts the following input properties:
- Properties
Pulumi.
Azure Native. Subscription. Inputs. Put Alias Request Properties - Put alias request properties.
- Alias
Name 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
Put
Alias Request Properties Args - Put alias request properties.
- Alias
Name 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
Put
Alias Request Properties - Put alias request properties.
- alias
Name 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
Put
Alias Request Properties - Put alias request properties.
- alias
Name 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
Put
Alias Request Properties Args - 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.
- alias
Name 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:
Supporting Types
PutAliasRequestProperties, PutAliasRequestPropertiesArgs
- Billing
Scope string - Determines whether subscription is fieldLed, partnerLed or LegacyEA
- Display
Name string - The friendly name of the subscription.
- Reseller
Id string - Reseller ID, basically MPN Id
- Subscription
Id string - This parameter can be used to create alias for existing subscription Id
- Workload
string | Pulumi.
Azure Native. Subscription. Workload - The workload type of the subscription. It can be either Production or DevTest.
- Billing
Scope string - Determines whether subscription is fieldLed, partnerLed or LegacyEA
- Display
Name string - The friendly name of the subscription.
- Reseller
Id string - Reseller ID, basically MPN Id
- Subscription
Id 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 String - Determines whether subscription is fieldLed, partnerLed or LegacyEA
- display
Name String - The friendly name of the subscription.
- reseller
Id String - Reseller ID, basically MPN Id
- subscription
Id 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 string - Determines whether subscription is fieldLed, partnerLed or LegacyEA
- display
Name string - The friendly name of the subscription.
- reseller
Id string - Reseller ID, basically MPN Id
- subscription
Id 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.
- billing
Scope String - Determines whether subscription is fieldLed, partnerLed or LegacyEA
- display
Name String - The friendly name of the subscription.
- reseller
Id String - Reseller ID, basically MPN Id
- subscription
Id String - This parameter can be used to create alias for existing subscription Id
- workload
String | "Production" | "Dev
Test" - The workload type of the subscription. It can be either Production or DevTest.
PutAliasResponsePropertiesResponse, PutAliasResponsePropertiesResponseArgs
- Subscription
Id string - Newly created subscription Id.
- Provisioning
State string - The provisioning state of the resource.
- Subscription
Id string - Newly created subscription Id.
- Provisioning
State string - The provisioning state of the resource.
- subscription
Id String - Newly created subscription Id.
- provisioning
State String - The provisioning state of the resource.
- subscription
Id string - Newly created subscription Id.
- provisioning
State string - The provisioning state of the resource.
- subscription_
id str - Newly created subscription Id.
- provisioning_
state str - The provisioning state of the resource.
- subscription
Id String - Newly created subscription Id.
- provisioning
State String - The provisioning state of the resource.
Workload, WorkloadArgs
- Production
- Production
- Dev
Test - DevTest
- Workload
Production - Production
- Workload
Dev Test - DevTest
- Production
- Production
- Dev
Test - DevTest
- Production
- Production
- Dev
Test - DevTest
- PRODUCTION
- Production
- DEV_TEST
- DevTest
- "Production"
- Production
- "Dev
Test" - 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