1. Packages
  2. Azure Native v2
  3. API Docs
  4. datashare
  5. Account
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

azure-native-v2.datashare.Account

Explore with Pulumi AI

These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

An account data transfer object. Azure REST API version: 2021-08-01. Prior API version in Azure Native 1.x: 2020-09-01.

Example Usage

Accounts_Create

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var account = new AzureNative.DataShare.Account("account", new()
    {
        AccountName = "Account1",
        Identity = new AzureNative.DataShare.Inputs.IdentityArgs
        {
            Type = AzureNative.DataShare.Type.SystemAssigned,
        },
        Location = "West US 2",
        ResourceGroupName = "SampleResourceGroup",
        Tags = 
        {
            { "tag1", "Red" },
            { "tag2", "White" },
        },
    });

});
Copy
package main

import (
	datashare "github.com/pulumi/pulumi-azure-native-sdk/datashare/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := datashare.NewAccount(ctx, "account", &datashare.AccountArgs{
			AccountName: pulumi.String("Account1"),
			Identity: &datashare.IdentityArgs{
				Type: pulumi.String(datashare.TypeSystemAssigned),
			},
			Location:          pulumi.String("West US 2"),
			ResourceGroupName: pulumi.String("SampleResourceGroup"),
			Tags: pulumi.StringMap{
				"tag1": pulumi.String("Red"),
				"tag2": pulumi.String("White"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.datashare.Account;
import com.pulumi.azurenative.datashare.AccountArgs;
import com.pulumi.azurenative.datashare.inputs.IdentityArgs;
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 account = new Account("account", AccountArgs.builder()
            .accountName("Account1")
            .identity(IdentityArgs.builder()
                .type("SystemAssigned")
                .build())
            .location("West US 2")
            .resourceGroupName("SampleResourceGroup")
            .tags(Map.ofEntries(
                Map.entry("tag1", "Red"),
                Map.entry("tag2", "White")
            ))
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const account = new azure_native.datashare.Account("account", {
    accountName: "Account1",
    identity: {
        type: azure_native.datashare.Type.SystemAssigned,
    },
    location: "West US 2",
    resourceGroupName: "SampleResourceGroup",
    tags: {
        tag1: "Red",
        tag2: "White",
    },
});
Copy
import pulumi
import pulumi_azure_native as azure_native

account = azure_native.datashare.Account("account",
    account_name="Account1",
    identity={
        "type": azure_native.datashare.Type.SYSTEM_ASSIGNED,
    },
    location="West US 2",
    resource_group_name="SampleResourceGroup",
    tags={
        "tag1": "Red",
        "tag2": "White",
    })
Copy
resources:
  account:
    type: azure-native:datashare:Account
    properties:
      accountName: Account1
      identity:
        type: SystemAssigned
      location: West US 2
      resourceGroupName: SampleResourceGroup
      tags:
        tag1: Red
        tag2: White
Copy

Create Account Resource

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

Constructor syntax

new Account(name: string, args: AccountArgs, opts?: CustomResourceOptions);
@overload
def Account(resource_name: str,
            args: AccountArgs,
            opts: Optional[ResourceOptions] = None)

@overload
def Account(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            identity: Optional[IdentityArgs] = None,
            resource_group_name: Optional[str] = None,
            account_name: Optional[str] = None,
            location: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None)
func NewAccount(ctx *Context, name string, args AccountArgs, opts ...ResourceOption) (*Account, error)
public Account(string name, AccountArgs args, CustomResourceOptions? opts = null)
public Account(String name, AccountArgs args)
public Account(String name, AccountArgs args, CustomResourceOptions options)
type: azure-native:datashare:Account
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. AccountArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. AccountArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. AccountArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. AccountArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. AccountArgs
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 exampleaccountResourceResourceFromDatashare = new AzureNative.Datashare.Account("exampleaccountResourceResourceFromDatashare", new()
{
    Identity = 
    {
        { "type", "string" },
    },
    ResourceGroupName = "string",
    AccountName = "string",
    Location = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
Copy
example, err := datashare.NewAccount(ctx, "exampleaccountResourceResourceFromDatashare", &datashare.AccountArgs{
	Identity: map[string]interface{}{
		"type": "string",
	},
	ResourceGroupName: "string",
	AccountName:       "string",
	Location:          "string",
	Tags: map[string]interface{}{
		"string": "string",
	},
})
Copy
var exampleaccountResourceResourceFromDatashare = new com.pulumi.azurenative.datashare.Account("exampleaccountResourceResourceFromDatashare", com.pulumi.azurenative.datashare.AccountArgs.builder()
    .identity(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .resourceGroupName("string")
    .accountName("string")
    .location("string")
    .tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .build());
Copy
exampleaccount_resource_resource_from_datashare = azure_native.datashare.Account("exampleaccountResourceResourceFromDatashare",
    identity={
        type: string,
    },
    resource_group_name=string,
    account_name=string,
    location=string,
    tags={
        string: string,
    })
Copy
const exampleaccountResourceResourceFromDatashare = new azure_native.datashare.Account("exampleaccountResourceResourceFromDatashare", {
    identity: {
        type: "string",
    },
    resourceGroupName: "string",
    accountName: "string",
    location: "string",
    tags: {
        string: "string",
    },
});
Copy
type: azure-native:datashare:Account
properties:
    accountName: string
    identity:
        type: string
    location: string
    resourceGroupName: string
    tags:
        string: string
Copy

Account 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 Account resource accepts the following input properties:

Identity This property is required. Pulumi.AzureNative.DataShare.Inputs.Identity
Identity Info on the Account
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The resource group name.
AccountName Changes to this property will trigger replacement. string
The name of the share account.
Location string
Location of the azure resource.
Tags Dictionary<string, string>
Tags on the azure resource.
Identity This property is required. IdentityArgs
Identity Info on the Account
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The resource group name.
AccountName Changes to this property will trigger replacement. string
The name of the share account.
Location string
Location of the azure resource.
Tags map[string]string
Tags on the azure resource.
identity This property is required. Identity
Identity Info on the Account
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The resource group name.
accountName Changes to this property will trigger replacement. String
The name of the share account.
location String
Location of the azure resource.
tags Map<String,String>
Tags on the azure resource.
identity This property is required. Identity
Identity Info on the Account
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The resource group name.
accountName Changes to this property will trigger replacement. string
The name of the share account.
location string
Location of the azure resource.
tags {[key: string]: string}
Tags on the azure resource.
identity This property is required. IdentityArgs
Identity Info on the Account
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The resource group name.
account_name Changes to this property will trigger replacement. str
The name of the share account.
location str
Location of the azure resource.
tags Mapping[str, str]
Tags on the azure resource.
identity This property is required. Property Map
Identity Info on the Account
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The resource group name.
accountName Changes to this property will trigger replacement. String
The name of the share account.
location String
Location of the azure resource.
tags Map<String>
Tags on the azure resource.

Outputs

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

CreatedAt string
Time at which the account was created.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Name of the azure resource
ProvisioningState string
Provisioning state of the Account
SystemData Pulumi.AzureNative.DataShare.Outputs.SystemDataResponse
System Data of the Azure resource.
Type string
Type of the azure resource
UserEmail string
Email of the user who created the resource
UserName string
Name of the user who created the resource
CreatedAt string
Time at which the account was created.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Name of the azure resource
ProvisioningState string
Provisioning state of the Account
SystemData SystemDataResponse
System Data of the Azure resource.
Type string
Type of the azure resource
UserEmail string
Email of the user who created the resource
UserName string
Name of the user who created the resource
createdAt String
Time at which the account was created.
id String
The provider-assigned unique ID for this managed resource.
name String
Name of the azure resource
provisioningState String
Provisioning state of the Account
systemData SystemDataResponse
System Data of the Azure resource.
type String
Type of the azure resource
userEmail String
Email of the user who created the resource
userName String
Name of the user who created the resource
createdAt string
Time at which the account was created.
id string
The provider-assigned unique ID for this managed resource.
name string
Name of the azure resource
provisioningState string
Provisioning state of the Account
systemData SystemDataResponse
System Data of the Azure resource.
type string
Type of the azure resource
userEmail string
Email of the user who created the resource
userName string
Name of the user who created the resource
created_at str
Time at which the account was created.
id str
The provider-assigned unique ID for this managed resource.
name str
Name of the azure resource
provisioning_state str
Provisioning state of the Account
system_data SystemDataResponse
System Data of the Azure resource.
type str
Type of the azure resource
user_email str
Email of the user who created the resource
user_name str
Name of the user who created the resource
createdAt String
Time at which the account was created.
id String
The provider-assigned unique ID for this managed resource.
name String
Name of the azure resource
provisioningState String
Provisioning state of the Account
systemData Property Map
System Data of the Azure resource.
type String
Type of the azure resource
userEmail String
Email of the user who created the resource
userName String
Name of the user who created the resource

Supporting Types

Identity
, IdentityArgs

Type string | Type
Identity Type
type String | Type
Identity Type
type string | Type
Identity Type
type str | Type
Identity Type
type String | "SystemAssigned"
Identity Type

IdentityResponse
, IdentityResponseArgs

PrincipalId This property is required. string
service principal Id
TenantId This property is required. string
Tenant Id
Type string
Identity Type
PrincipalId This property is required. string
service principal Id
TenantId This property is required. string
Tenant Id
Type string
Identity Type
principalId This property is required. String
service principal Id
tenantId This property is required. String
Tenant Id
type String
Identity Type
principalId This property is required. string
service principal Id
tenantId This property is required. string
Tenant Id
type string
Identity Type
principal_id This property is required. str
service principal Id
tenant_id This property is required. str
Tenant Id
type str
Identity Type
principalId This property is required. String
service principal Id
tenantId This property is required. String
Tenant Id
type String
Identity Type

SystemDataResponse
, SystemDataResponseArgs

CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The type of identity that last modified the resource.
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The type of identity that last modified the resource.
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The type of identity that last modified the resource.
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.
createdAt string
The timestamp of resource creation (UTC).
createdBy string
The identity that created the resource.
createdByType string
The type of identity that created the resource.
lastModifiedAt string
The type of identity that last modified the resource.
lastModifiedBy string
The identity that last modified the resource.
lastModifiedByType string
The type of identity that last modified the resource.
created_at str
The timestamp of resource creation (UTC).
created_by str
The identity that created the resource.
created_by_type str
The type of identity that created the resource.
last_modified_at str
The type of identity that last modified the resource.
last_modified_by str
The identity that last modified the resource.
last_modified_by_type str
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The type of identity that last modified the resource.
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.

Type
, TypeArgs

SystemAssigned
SystemAssigned
TypeSystemAssigned
SystemAssigned
SystemAssigned
SystemAssigned
SystemAssigned
SystemAssigned
SYSTEM_ASSIGNED
SystemAssigned
"SystemAssigned"
SystemAssigned

Import

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

$ pulumi import azure-native:datashare:Account Account1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName} 
Copy

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

Package Details

Repository
azure-native-v2 pulumi/pulumi-azure-native
License
Apache-2.0
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi