azure.datashare.Share
Manages a Data Share.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
{
Location = "West Europe",
});
var exampleAccount = new Azure.DataShare.Account("exampleAccount", new()
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
Identity = new Azure.DataShare.Inputs.AccountIdentityArgs
{
Type = "SystemAssigned",
},
Tags =
{
{ "foo", "bar" },
},
});
var exampleShare = new Azure.DataShare.Share("exampleShare", new()
{
AccountId = exampleAccount.Id,
Kind = "CopyBased",
Description = "example desc",
Terms = "example terms",
SnapshotSchedule = new Azure.DataShare.Inputs.ShareSnapshotScheduleArgs
{
Name = "example-ss",
Recurrence = "Day",
StartTime = "2020-04-17T04:47:52.9614956Z",
},
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/datashare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleAccount, err := datashare.NewAccount(ctx, "exampleAccount", &datashare.AccountArgs{
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
Identity: &datashare.AccountIdentityArgs{
Type: pulumi.String("SystemAssigned"),
},
Tags: pulumi.StringMap{
"foo": pulumi.String("bar"),
},
})
if err != nil {
return err
}
_, err = datashare.NewShare(ctx, "exampleShare", &datashare.ShareArgs{
AccountId: exampleAccount.ID(),
Kind: pulumi.String("CopyBased"),
Description: pulumi.String("example desc"),
Terms: pulumi.String("example terms"),
SnapshotSchedule: &datashare.ShareSnapshotScheduleArgs{
Name: pulumi.String("example-ss"),
Recurrence: pulumi.String("Day"),
StartTime: pulumi.String("2020-04-17T04:47:52.9614956Z"),
},
})
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.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.datashare.Account;
import com.pulumi.azure.datashare.AccountArgs;
import com.pulumi.azure.datashare.inputs.AccountIdentityArgs;
import com.pulumi.azure.datashare.Share;
import com.pulumi.azure.datashare.ShareArgs;
import com.pulumi.azure.datashare.inputs.ShareSnapshotScheduleArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.identity(AccountIdentityArgs.builder()
.type("SystemAssigned")
.build())
.tags(Map.of("foo", "bar"))
.build());
var exampleShare = new Share("exampleShare", ShareArgs.builder()
.accountId(exampleAccount.id())
.kind("CopyBased")
.description("example desc")
.terms("example terms")
.snapshotSchedule(ShareSnapshotScheduleArgs.builder()
.name("example-ss")
.recurrence("Day")
.startTime("2020-04-17T04:47:52.9614956Z")
.build())
.build());
}
}
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_account = azure.datashare.Account("exampleAccount",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
identity=azure.datashare.AccountIdentityArgs(
type="SystemAssigned",
),
tags={
"foo": "bar",
})
example_share = azure.datashare.Share("exampleShare",
account_id=example_account.id,
kind="CopyBased",
description="example desc",
terms="example terms",
snapshot_schedule=azure.datashare.ShareSnapshotScheduleArgs(
name="example-ss",
recurrence="Day",
start_time="2020-04-17T04:47:52.9614956Z",
))
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleAccount = new azure.datashare.Account("exampleAccount", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
identity: {
type: "SystemAssigned",
},
tags: {
foo: "bar",
},
});
const exampleShare = new azure.datashare.Share("exampleShare", {
accountId: exampleAccount.id,
kind: "CopyBased",
description: "example desc",
terms: "example terms",
snapshotSchedule: {
name: "example-ss",
recurrence: "Day",
startTime: "2020-04-17T04:47:52.9614956Z",
},
});
resources:
exampleResourceGroup:
type: azure:core:ResourceGroup
properties:
location: West Europe
exampleAccount:
type: azure:datashare:Account
properties:
location: ${exampleResourceGroup.location}
resourceGroupName: ${exampleResourceGroup.name}
identity:
type: SystemAssigned
tags:
foo: bar
exampleShare:
type: azure:datashare:Share
properties:
accountId: ${exampleAccount.id}
kind: CopyBased
description: example desc
terms: example terms
snapshotSchedule:
name: example-ss
recurrence: Day
startTime: 2020-04-17T04:47:52.9614956Z
Create Share Resource
new Share(name: string, args: ShareArgs, opts?: CustomResourceOptions);
@overload
def Share(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
description: Optional[str] = None,
kind: Optional[str] = None,
name: Optional[str] = None,
snapshot_schedule: Optional[ShareSnapshotScheduleArgs] = None,
terms: Optional[str] = None)
@overload
def Share(resource_name: str,
args: ShareArgs,
opts: Optional[ResourceOptions] = None)
func NewShare(ctx *Context, name string, args ShareArgs, opts ...ResourceOption) (*Share, error)
public Share(string name, ShareArgs args, CustomResourceOptions? opts = null)
type: azure:datashare:Share
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ShareArgs
- 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 ShareArgs
- 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 ShareArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ShareArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ShareArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Share 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 Share resource accepts the following input properties:
- Account
Id string The ID of the Data Share account in which the Data Share is created. Changing this forces a new Data Share to be created.
- Kind string
The kind of the Data Share. Possible values are
CopyBased
andInPlace
. Changing this forces a new Data Share to be created.- Description string
The Data Share's description.
- Name string
The name which should be used for this Data Share. Changing this forces a new Data Share to be created.
- Snapshot
Schedule ShareSnapshot Schedule Args A
snapshot_schedule
block as defined below.- Terms string
The terms of the Data Share.
- Account
Id string The ID of the Data Share account in which the Data Share is created. Changing this forces a new Data Share to be created.
- Kind string
The kind of the Data Share. Possible values are
CopyBased
andInPlace
. Changing this forces a new Data Share to be created.- Description string
The Data Share's description.
- Name string
The name which should be used for this Data Share. Changing this forces a new Data Share to be created.
- Snapshot
Schedule ShareSnapshot Schedule Args A
snapshot_schedule
block as defined below.- Terms string
The terms of the Data Share.
- account
Id String The ID of the Data Share account in which the Data Share is created. Changing this forces a new Data Share to be created.
- kind String
The kind of the Data Share. Possible values are
CopyBased
andInPlace
. Changing this forces a new Data Share to be created.- description String
The Data Share's description.
- name String
The name which should be used for this Data Share. Changing this forces a new Data Share to be created.
- snapshot
Schedule ShareSnapshot Schedule Args A
snapshot_schedule
block as defined below.- terms String
The terms of the Data Share.
- account
Id string The ID of the Data Share account in which the Data Share is created. Changing this forces a new Data Share to be created.
- kind string
The kind of the Data Share. Possible values are
CopyBased
andInPlace
. Changing this forces a new Data Share to be created.- description string
The Data Share's description.
- name string
The name which should be used for this Data Share. Changing this forces a new Data Share to be created.
- snapshot
Schedule ShareSnapshot Schedule Args A
snapshot_schedule
block as defined below.- terms string
The terms of the Data Share.
- account_
id str The ID of the Data Share account in which the Data Share is created. Changing this forces a new Data Share to be created.
- kind str
The kind of the Data Share. Possible values are
CopyBased
andInPlace
. Changing this forces a new Data Share to be created.- description str
The Data Share's description.
- name str
The name which should be used for this Data Share. Changing this forces a new Data Share to be created.
- snapshot_
schedule ShareSnapshot Schedule Args A
snapshot_schedule
block as defined below.- terms str
The terms of the Data Share.
- account
Id String The ID of the Data Share account in which the Data Share is created. Changing this forces a new Data Share to be created.
- kind String
The kind of the Data Share. Possible values are
CopyBased
andInPlace
. Changing this forces a new Data Share to be created.- description String
The Data Share's description.
- name String
The name which should be used for this Data Share. Changing this forces a new Data Share to be created.
- snapshot
Schedule Property Map A
snapshot_schedule
block as defined below.- terms String
The terms of the Data Share.
Outputs
All input properties are implicitly available as output properties. Additionally, the Share resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing Share Resource
Get an existing Share 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?: ShareState, opts?: CustomResourceOptions): Share
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
description: Optional[str] = None,
kind: Optional[str] = None,
name: Optional[str] = None,
snapshot_schedule: Optional[ShareSnapshotScheduleArgs] = None,
terms: Optional[str] = None) -> Share
func GetShare(ctx *Context, name string, id IDInput, state *ShareState, opts ...ResourceOption) (*Share, error)
public static Share Get(string name, Input<string> id, ShareState? state, CustomResourceOptions? opts = null)
public static Share get(String name, Output<String> id, ShareState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- 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.
- Account
Id string The ID of the Data Share account in which the Data Share is created. Changing this forces a new Data Share to be created.
- Description string
The Data Share's description.
- Kind string
The kind of the Data Share. Possible values are
CopyBased
andInPlace
. Changing this forces a new Data Share to be created.- Name string
The name which should be used for this Data Share. Changing this forces a new Data Share to be created.
- Snapshot
Schedule ShareSnapshot Schedule Args A
snapshot_schedule
block as defined below.- Terms string
The terms of the Data Share.
- Account
Id string The ID of the Data Share account in which the Data Share is created. Changing this forces a new Data Share to be created.
- Description string
The Data Share's description.
- Kind string
The kind of the Data Share. Possible values are
CopyBased
andInPlace
. Changing this forces a new Data Share to be created.- Name string
The name which should be used for this Data Share. Changing this forces a new Data Share to be created.
- Snapshot
Schedule ShareSnapshot Schedule Args A
snapshot_schedule
block as defined below.- Terms string
The terms of the Data Share.
- account
Id String The ID of the Data Share account in which the Data Share is created. Changing this forces a new Data Share to be created.
- description String
The Data Share's description.
- kind String
The kind of the Data Share. Possible values are
CopyBased
andInPlace
. Changing this forces a new Data Share to be created.- name String
The name which should be used for this Data Share. Changing this forces a new Data Share to be created.
- snapshot
Schedule ShareSnapshot Schedule Args A
snapshot_schedule
block as defined below.- terms String
The terms of the Data Share.
- account
Id string The ID of the Data Share account in which the Data Share is created. Changing this forces a new Data Share to be created.
- description string
The Data Share's description.
- kind string
The kind of the Data Share. Possible values are
CopyBased
andInPlace
. Changing this forces a new Data Share to be created.- name string
The name which should be used for this Data Share. Changing this forces a new Data Share to be created.
- snapshot
Schedule ShareSnapshot Schedule Args A
snapshot_schedule
block as defined below.- terms string
The terms of the Data Share.
- account_
id str The ID of the Data Share account in which the Data Share is created. Changing this forces a new Data Share to be created.
- description str
The Data Share's description.
- kind str
The kind of the Data Share. Possible values are
CopyBased
andInPlace
. Changing this forces a new Data Share to be created.- name str
The name which should be used for this Data Share. Changing this forces a new Data Share to be created.
- snapshot_
schedule ShareSnapshot Schedule Args A
snapshot_schedule
block as defined below.- terms str
The terms of the Data Share.
- account
Id String The ID of the Data Share account in which the Data Share is created. Changing this forces a new Data Share to be created.
- description String
The Data Share's description.
- kind String
The kind of the Data Share. Possible values are
CopyBased
andInPlace
. Changing this forces a new Data Share to be created.- name String
The name which should be used for this Data Share. Changing this forces a new Data Share to be created.
- snapshot
Schedule Property Map A
snapshot_schedule
block as defined below.- terms String
The terms of the Data Share.
Supporting Types
ShareSnapshotSchedule
- Name string
The name of the snapshot schedule.
- Recurrence string
The interval of the synchronization with the source data. Possible values are
Hour
andDay
.- Start
Time string The synchronization with the source data's start time.
- Name string
The name of the snapshot schedule.
- Recurrence string
The interval of the synchronization with the source data. Possible values are
Hour
andDay
.- Start
Time string The synchronization with the source data's start time.
- name String
The name of the snapshot schedule.
- recurrence String
The interval of the synchronization with the source data. Possible values are
Hour
andDay
.- start
Time String The synchronization with the source data's start time.
- name string
The name of the snapshot schedule.
- recurrence string
The interval of the synchronization with the source data. Possible values are
Hour
andDay
.- start
Time string The synchronization with the source data's start time.
- name str
The name of the snapshot schedule.
- recurrence str
The interval of the synchronization with the source data. Possible values are
Hour
andDay
.- start_
time str The synchronization with the source data's start time.
- name String
The name of the snapshot schedule.
- recurrence String
The interval of the synchronization with the source data. Possible values are
Hour
andDay
.- start
Time String The synchronization with the source data's start time.
Import
Data Shares can be imported using the resource id
, e.g.
$ pulumi import azure:datashare/share:Share example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataShare/accounts/account1/shares/share1
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.