1. Packages
  2. Azure Native
  3. API Docs
  4. datashare
  5. ShareSubscription
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi

azure-native.datashare.ShareSubscription

Explore with Pulumi AI

This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi

A share subscription data transfer object.

Uses Azure REST API version 2021-08-01. In version 2.x of the Azure Native provider, it used API version 2021-08-01.

Example Usage

ShareSubscriptions_Create

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

return await Deployment.RunAsync(() => 
{
    var shareSubscription = new AzureNative.DataShare.ShareSubscription("shareSubscription", new()
    {
        AccountName = "Account1",
        ExpirationDate = "2020-08-26T22:33:24.5785265Z",
        InvitationId = "12345678-1234-1234-12345678abd",
        ResourceGroupName = "SampleResourceGroup",
        ShareSubscriptionName = "ShareSubscription1",
        SourceShareLocation = "eastus2",
    });

});
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := datashare.NewShareSubscription(ctx, "shareSubscription", &datashare.ShareSubscriptionArgs{
			AccountName:           pulumi.String("Account1"),
			ExpirationDate:        pulumi.String("2020-08-26T22:33:24.5785265Z"),
			InvitationId:          pulumi.String("12345678-1234-1234-12345678abd"),
			ResourceGroupName:     pulumi.String("SampleResourceGroup"),
			ShareSubscriptionName: pulumi.String("ShareSubscription1"),
			SourceShareLocation:   pulumi.String("eastus2"),
		})
		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.ShareSubscription;
import com.pulumi.azurenative.datashare.ShareSubscriptionArgs;
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 shareSubscription = new ShareSubscription("shareSubscription", ShareSubscriptionArgs.builder()
            .accountName("Account1")
            .expirationDate("2020-08-26T22:33:24.5785265Z")
            .invitationId("12345678-1234-1234-12345678abd")
            .resourceGroupName("SampleResourceGroup")
            .shareSubscriptionName("ShareSubscription1")
            .sourceShareLocation("eastus2")
            .build());

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

const shareSubscription = new azure_native.datashare.ShareSubscription("shareSubscription", {
    accountName: "Account1",
    expirationDate: "2020-08-26T22:33:24.5785265Z",
    invitationId: "12345678-1234-1234-12345678abd",
    resourceGroupName: "SampleResourceGroup",
    shareSubscriptionName: "ShareSubscription1",
    sourceShareLocation: "eastus2",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

share_subscription = azure_native.datashare.ShareSubscription("shareSubscription",
    account_name="Account1",
    expiration_date="2020-08-26T22:33:24.5785265Z",
    invitation_id="12345678-1234-1234-12345678abd",
    resource_group_name="SampleResourceGroup",
    share_subscription_name="ShareSubscription1",
    source_share_location="eastus2")
Copy
resources:
  shareSubscription:
    type: azure-native:datashare:ShareSubscription
    properties:
      accountName: Account1
      expirationDate: 2020-08-26T22:33:24.5785265Z
      invitationId: 12345678-1234-1234-12345678abd
      resourceGroupName: SampleResourceGroup
      shareSubscriptionName: ShareSubscription1
      sourceShareLocation: eastus2
Copy

Create ShareSubscription Resource

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

Constructor syntax

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

@overload
def ShareSubscription(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      account_name: Optional[str] = None,
                      invitation_id: Optional[str] = None,
                      resource_group_name: Optional[str] = None,
                      source_share_location: Optional[str] = None,
                      expiration_date: Optional[str] = None,
                      share_subscription_name: Optional[str] = None)
func NewShareSubscription(ctx *Context, name string, args ShareSubscriptionArgs, opts ...ResourceOption) (*ShareSubscription, error)
public ShareSubscription(string name, ShareSubscriptionArgs args, CustomResourceOptions? opts = null)
public ShareSubscription(String name, ShareSubscriptionArgs args)
public ShareSubscription(String name, ShareSubscriptionArgs args, CustomResourceOptions options)
type: azure-native:datashare:ShareSubscription
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. ShareSubscriptionArgs
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. ShareSubscriptionArgs
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. ShareSubscriptionArgs
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. ShareSubscriptionArgs
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. ShareSubscriptionArgs
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 shareSubscriptionResource = new AzureNative.DataShare.ShareSubscription("shareSubscriptionResource", new()
{
    AccountName = "string",
    InvitationId = "string",
    ResourceGroupName = "string",
    SourceShareLocation = "string",
    ExpirationDate = "string",
    ShareSubscriptionName = "string",
});
Copy
example, err := datashare.NewShareSubscription(ctx, "shareSubscriptionResource", &datashare.ShareSubscriptionArgs{
	AccountName:           pulumi.String("string"),
	InvitationId:          pulumi.String("string"),
	ResourceGroupName:     pulumi.String("string"),
	SourceShareLocation:   pulumi.String("string"),
	ExpirationDate:        pulumi.String("string"),
	ShareSubscriptionName: pulumi.String("string"),
})
Copy
var shareSubscriptionResource = new ShareSubscription("shareSubscriptionResource", ShareSubscriptionArgs.builder()
    .accountName("string")
    .invitationId("string")
    .resourceGroupName("string")
    .sourceShareLocation("string")
    .expirationDate("string")
    .shareSubscriptionName("string")
    .build());
Copy
share_subscription_resource = azure_native.datashare.ShareSubscription("shareSubscriptionResource",
    account_name="string",
    invitation_id="string",
    resource_group_name="string",
    source_share_location="string",
    expiration_date="string",
    share_subscription_name="string")
Copy
const shareSubscriptionResource = new azure_native.datashare.ShareSubscription("shareSubscriptionResource", {
    accountName: "string",
    invitationId: "string",
    resourceGroupName: "string",
    sourceShareLocation: "string",
    expirationDate: "string",
    shareSubscriptionName: "string",
});
Copy
type: azure-native:datashare:ShareSubscription
properties:
    accountName: string
    expirationDate: string
    invitationId: string
    resourceGroupName: string
    shareSubscriptionName: string
    sourceShareLocation: string
Copy

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

AccountName
This property is required.
Changes to this property will trigger replacement.
string
The name of the share account.
InvitationId This property is required. string
The invitation id.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The resource group name.
SourceShareLocation This property is required. string
Source share location.
ExpirationDate string
The expiration date of the share subscription.
ShareSubscriptionName Changes to this property will trigger replacement. string
The name of the shareSubscription.
AccountName
This property is required.
Changes to this property will trigger replacement.
string
The name of the share account.
InvitationId This property is required. string
The invitation id.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The resource group name.
SourceShareLocation This property is required. string
Source share location.
ExpirationDate string
The expiration date of the share subscription.
ShareSubscriptionName Changes to this property will trigger replacement. string
The name of the shareSubscription.
accountName
This property is required.
Changes to this property will trigger replacement.
String
The name of the share account.
invitationId This property is required. String
The invitation id.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The resource group name.
sourceShareLocation This property is required. String
Source share location.
expirationDate String
The expiration date of the share subscription.
shareSubscriptionName Changes to this property will trigger replacement. String
The name of the shareSubscription.
accountName
This property is required.
Changes to this property will trigger replacement.
string
The name of the share account.
invitationId This property is required. string
The invitation id.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The resource group name.
sourceShareLocation This property is required. string
Source share location.
expirationDate string
The expiration date of the share subscription.
shareSubscriptionName Changes to this property will trigger replacement. string
The name of the shareSubscription.
account_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the share account.
invitation_id This property is required. str
The invitation id.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The resource group name.
source_share_location This property is required. str
Source share location.
expiration_date str
The expiration date of the share subscription.
share_subscription_name Changes to this property will trigger replacement. str
The name of the shareSubscription.
accountName
This property is required.
Changes to this property will trigger replacement.
String
The name of the share account.
invitationId This property is required. String
The invitation id.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The resource group name.
sourceShareLocation This property is required. String
Source share location.
expirationDate String
The expiration date of the share subscription.
shareSubscriptionName Changes to this property will trigger replacement. String
The name of the shareSubscription.

Outputs

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

AzureApiVersion string
The Azure API version of the resource.
CreatedAt string
Time at which the share subscription was created.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Name of the azure resource
ProviderEmail string
Email of the provider who created the resource
ProviderName string
Name of the provider who created the resource
ProviderTenantName string
Tenant name of the provider who created the resource
ProvisioningState string
Provisioning state of the share subscription
ShareDescription string
Description of share
ShareKind string
Kind of share
ShareName string
Name of the share
ShareSubscriptionStatus string
Gets the current status of share subscription.
ShareTerms string
Terms of a share
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
AzureApiVersion string
The Azure API version of the resource.
CreatedAt string
Time at which the share subscription was created.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Name of the azure resource
ProviderEmail string
Email of the provider who created the resource
ProviderName string
Name of the provider who created the resource
ProviderTenantName string
Tenant name of the provider who created the resource
ProvisioningState string
Provisioning state of the share subscription
ShareDescription string
Description of share
ShareKind string
Kind of share
ShareName string
Name of the share
ShareSubscriptionStatus string
Gets the current status of share subscription.
ShareTerms string
Terms of a share
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
azureApiVersion String
The Azure API version of the resource.
createdAt String
Time at which the share subscription was created.
id String
The provider-assigned unique ID for this managed resource.
name String
Name of the azure resource
providerEmail String
Email of the provider who created the resource
providerName String
Name of the provider who created the resource
providerTenantName String
Tenant name of the provider who created the resource
provisioningState String
Provisioning state of the share subscription
shareDescription String
Description of share
shareKind String
Kind of share
shareName String
Name of the share
shareSubscriptionStatus String
Gets the current status of share subscription.
shareTerms String
Terms of a share
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
azureApiVersion string
The Azure API version of the resource.
createdAt string
Time at which the share subscription was created.
id string
The provider-assigned unique ID for this managed resource.
name string
Name of the azure resource
providerEmail string
Email of the provider who created the resource
providerName string
Name of the provider who created the resource
providerTenantName string
Tenant name of the provider who created the resource
provisioningState string
Provisioning state of the share subscription
shareDescription string
Description of share
shareKind string
Kind of share
shareName string
Name of the share
shareSubscriptionStatus string
Gets the current status of share subscription.
shareTerms string
Terms of a share
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
azure_api_version str
The Azure API version of the resource.
created_at str
Time at which the share subscription was created.
id str
The provider-assigned unique ID for this managed resource.
name str
Name of the azure resource
provider_email str
Email of the provider who created the resource
provider_name str
Name of the provider who created the resource
provider_tenant_name str
Tenant name of the provider who created the resource
provisioning_state str
Provisioning state of the share subscription
share_description str
Description of share
share_kind str
Kind of share
share_name str
Name of the share
share_subscription_status str
Gets the current status of share subscription.
share_terms str
Terms of a share
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
azureApiVersion String
The Azure API version of the resource.
createdAt String
Time at which the share subscription was created.
id String
The provider-assigned unique ID for this managed resource.
name String
Name of the azure resource
providerEmail String
Email of the provider who created the resource
providerName String
Name of the provider who created the resource
providerTenantName String
Tenant name of the provider who created the resource
provisioningState String
Provisioning state of the share subscription
shareDescription String
Description of share
shareKind String
Kind of share
shareName String
Name of the share
shareSubscriptionStatus String
Gets the current status of share subscription.
shareTerms String
Terms of a share
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

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.

Import

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

$ pulumi import azure-native:datashare:ShareSubscription ShareSubscription1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName} 
Copy

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

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi