Account
Manages an Azure Batch account.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "westeurope",
});
var exampleAccount = new Azure.Storage.Account("exampleAccount", new Azure.Storage.AccountArgs
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
AccountTier = "Standard",
AccountReplicationType = "LRS",
});
var exampleBatch_accountAccount = new Azure.Batch.Account("exampleBatch/accountAccount", new Azure.Batch.AccountArgs
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
PoolAllocationMode = "BatchService",
StorageAccountId = exampleAccount.Id,
Tags =
{
{ "env", "test" },
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/batch"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/storage"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("westeurope"),
})
if err != nil {
return err
}
exampleAccount, err := storage.NewAccount(ctx, "exampleAccount", &storage.AccountArgs{
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
AccountTier: pulumi.String("Standard"),
AccountReplicationType: pulumi.String("LRS"),
})
if err != nil {
return err
}
_, err = batch.NewAccount(ctx, "exampleBatch/accountAccount", &batch.AccountArgs{
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
PoolAllocationMode: pulumi.String("BatchService"),
StorageAccountId: exampleAccount.ID(),
Tags: pulumi.Map{
"env": pulumi.String("test"),
},
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="westeurope")
example_account = azure.storage.Account("exampleAccount",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
account_tier="Standard",
account_replication_type="LRS")
example_batch_account_account = azure.batch.Account("exampleBatch/accountAccount",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
pool_allocation_mode="BatchService",
storage_account_id=example_account.id,
tags={
"env": "test",
})import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "westeurope"});
const exampleAccount = new azure.storage.Account("exampleAccount", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
accountTier: "Standard",
accountReplicationType: "LRS",
});
const exampleBatch_accountAccount = new azure.batch.Account("exampleBatch/accountAccount", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
poolAllocationMode: "BatchService",
storageAccountId: exampleAccount.id,
tags: {
env: "test",
},
});Create a Account Resource
new Account(name: string, args: AccountArgs, opts?: CustomResourceOptions);def Account(resource_name, opts=None, key_vault_reference=None, location=None, name=None, pool_allocation_mode=None, resource_group_name=None, storage_account_id=None, tags=None, __props__=None);func NewAccount(ctx *Context, name string, args AccountArgs, opts ...ResourceOption) (*Account, error)public Account(string name, AccountArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args AccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AccountArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Account Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Account resource accepts the following input properties:
- Resource
Group stringName The name of the resource group in which to create the Batch account. Changing this forces a new resource to be created.
- Key
Vault AccountReference Key Vault Reference Args A
key_vault_referenceblock that describes the Azure KeyVault reference to use when deploying the Azure Batch account using theUserSubscriptionpool allocation mode.- Location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
Specifies the name of the Batch account. Changing this forces a new resource to be created.
- Pool
Allocation stringMode Specifies the mode to use for pool allocation. Possible values are
BatchServiceorUserSubscription. Defaults toBatchService.- Storage
Account stringId Specifies the storage account to use for the Batch account. If not specified, Azure Batch will manage the storage.
- Dictionary<string, string>
A mapping of tags to assign to the resource.
- Resource
Group stringName The name of the resource group in which to create the Batch account. Changing this forces a new resource to be created.
- Key
Vault AccountReference Key Vault Reference A
key_vault_referenceblock that describes the Azure KeyVault reference to use when deploying the Azure Batch account using theUserSubscriptionpool allocation mode.- Location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
Specifies the name of the Batch account. Changing this forces a new resource to be created.
- Pool
Allocation stringMode Specifies the mode to use for pool allocation. Possible values are
BatchServiceorUserSubscription. Defaults toBatchService.- Storage
Account stringId Specifies the storage account to use for the Batch account. If not specified, Azure Batch will manage the storage.
- map[string]string
A mapping of tags to assign to the resource.
- resource
Group stringName The name of the resource group in which to create the Batch account. Changing this forces a new resource to be created.
- key
Vault AccountReference Key Vault Reference A
key_vault_referenceblock that describes the Azure KeyVault reference to use when deploying the Azure Batch account using theUserSubscriptionpool allocation mode.- location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name string
Specifies the name of the Batch account. Changing this forces a new resource to be created.
- pool
Allocation stringMode Specifies the mode to use for pool allocation. Possible values are
BatchServiceorUserSubscription. Defaults toBatchService.- storage
Account stringId Specifies the storage account to use for the Batch account. If not specified, Azure Batch will manage the storage.
- {[key: string]: string}
A mapping of tags to assign to the resource.
- resource_
group_ strname The name of the resource group in which to create the Batch account. Changing this forces a new resource to be created.
- key_
vault_ Dict[Accountreference Key Vault Reference] A
key_vault_referenceblock that describes the Azure KeyVault reference to use when deploying the Azure Batch account using theUserSubscriptionpool allocation mode.- location str
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name str
Specifies the name of the Batch account. Changing this forces a new resource to be created.
- pool_
allocation_ strmode Specifies the mode to use for pool allocation. Possible values are
BatchServiceorUserSubscription. Defaults toBatchService.- storage_
account_ strid Specifies the storage account to use for the Batch account. If not specified, Azure Batch will manage the storage.
- Dict[str, str]
A mapping of tags to assign to the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the Account resource produces the following output properties:
- Account
Endpoint string The account endpoint used to interact with the Batch service.
- Id string
- The provider-assigned unique ID for this managed resource.
- Primary
Access stringKey The Batch account primary access key.
- Secondary
Access stringKey The Batch account secondary access key.
- Account
Endpoint string The account endpoint used to interact with the Batch service.
- Id string
- The provider-assigned unique ID for this managed resource.
- Primary
Access stringKey The Batch account primary access key.
- Secondary
Access stringKey The Batch account secondary access key.
- account
Endpoint string The account endpoint used to interact with the Batch service.
- id string
- The provider-assigned unique ID for this managed resource.
- primary
Access stringKey The Batch account primary access key.
- secondary
Access stringKey The Batch account secondary access key.
- account_
endpoint str The account endpoint used to interact with the Batch service.
- id str
- The provider-assigned unique ID for this managed resource.
- primary_
access_ strkey The Batch account primary access key.
- secondary_
access_ strkey The Batch account secondary access key.
Look up an Existing Account Resource
Get an existing Account resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AccountState, opts?: CustomResourceOptions): Accountstatic get(resource_name, id, opts=None, account_endpoint=None, key_vault_reference=None, location=None, name=None, pool_allocation_mode=None, primary_access_key=None, resource_group_name=None, secondary_access_key=None, storage_account_id=None, tags=None, __props__=None);func GetAccount(ctx *Context, name string, id IDInput, state *AccountState, opts ...ResourceOption) (*Account, error)public static Account Get(string name, Input<string> id, AccountState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Account
Endpoint string The account endpoint used to interact with the Batch service.
- Key
Vault AccountReference Key Vault Reference Args A
key_vault_referenceblock that describes the Azure KeyVault reference to use when deploying the Azure Batch account using theUserSubscriptionpool allocation mode.- Location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
Specifies the name of the Batch account. Changing this forces a new resource to be created.
- Pool
Allocation stringMode Specifies the mode to use for pool allocation. Possible values are
BatchServiceorUserSubscription. Defaults toBatchService.- Primary
Access stringKey The Batch account primary access key.
- Resource
Group stringName The name of the resource group in which to create the Batch account. Changing this forces a new resource to be created.
- Secondary
Access stringKey The Batch account secondary access key.
- Storage
Account stringId Specifies the storage account to use for the Batch account. If not specified, Azure Batch will manage the storage.
- Dictionary<string, string>
A mapping of tags to assign to the resource.
- Account
Endpoint string The account endpoint used to interact with the Batch service.
- Key
Vault AccountReference Key Vault Reference A
key_vault_referenceblock that describes the Azure KeyVault reference to use when deploying the Azure Batch account using theUserSubscriptionpool allocation mode.- Location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
Specifies the name of the Batch account. Changing this forces a new resource to be created.
- Pool
Allocation stringMode Specifies the mode to use for pool allocation. Possible values are
BatchServiceorUserSubscription. Defaults toBatchService.- Primary
Access stringKey The Batch account primary access key.
- Resource
Group stringName The name of the resource group in which to create the Batch account. Changing this forces a new resource to be created.
- Secondary
Access stringKey The Batch account secondary access key.
- Storage
Account stringId Specifies the storage account to use for the Batch account. If not specified, Azure Batch will manage the storage.
- map[string]string
A mapping of tags to assign to the resource.
- account
Endpoint string The account endpoint used to interact with the Batch service.
- key
Vault AccountReference Key Vault Reference A
key_vault_referenceblock that describes the Azure KeyVault reference to use when deploying the Azure Batch account using theUserSubscriptionpool allocation mode.- location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name string
Specifies the name of the Batch account. Changing this forces a new resource to be created.
- pool
Allocation stringMode Specifies the mode to use for pool allocation. Possible values are
BatchServiceorUserSubscription. Defaults toBatchService.- primary
Access stringKey The Batch account primary access key.
- resource
Group stringName The name of the resource group in which to create the Batch account. Changing this forces a new resource to be created.
- secondary
Access stringKey The Batch account secondary access key.
- storage
Account stringId Specifies the storage account to use for the Batch account. If not specified, Azure Batch will manage the storage.
- {[key: string]: string}
A mapping of tags to assign to the resource.
- account_
endpoint str The account endpoint used to interact with the Batch service.
- key_
vault_ Dict[Accountreference Key Vault Reference] A
key_vault_referenceblock that describes the Azure KeyVault reference to use when deploying the Azure Batch account using theUserSubscriptionpool allocation mode.- location str
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name str
Specifies the name of the Batch account. Changing this forces a new resource to be created.
- pool_
allocation_ strmode Specifies the mode to use for pool allocation. Possible values are
BatchServiceorUserSubscription. Defaults toBatchService.- primary_
access_ strkey The Batch account primary access key.
- resource_
group_ strname The name of the resource group in which to create the Batch account. Changing this forces a new resource to be created.
- secondary_
access_ strkey The Batch account secondary access key.
- storage_
account_ strid Specifies the storage account to use for the Batch account. If not specified, Azure Batch will manage the storage.
- Dict[str, str]
A mapping of tags to assign to the resource.
Supporting Types
AccountKeyVaultReference
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.