GetShare

Use this data source to access information about an existing Data Share.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleAccount = Output.Create(Azure.DataShare.GetAccount.InvokeAsync(new Azure.DataShare.GetAccountArgs
        {
            Name = "example-account",
            ResourceGroupName = "example-resource-group",
        }));
        var exampleShare = Output.Create(Azure.DataShare.GetShare.InvokeAsync(new Azure.DataShare.GetShareArgs
        {
            Name = "existing",
            AccountId = data.Azurerm_data_share_account.Exmaple.Id,
        }));
        this.Id = exampleShare.Apply(exampleShare => exampleShare.Id);
    }

    [Output("id")]
    public Output<string> Id { get; set; }
}
package main

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

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := datashare.LookupAccount(ctx, &datashare.LookupAccountArgs{
            Name:              "example-account",
            ResourceGroupName: "example-resource-group",
        }, nil)
        if err != nil {
            return err
        }
        exampleShare, err := datashare.LookupShare(ctx, &datashare.LookupShareArgs{
            Name:      "existing",
            AccountId: data.Azurerm_data_share_account.Exmaple.Id,
        }, nil)
        if err != nil {
            return err
        }
        ctx.Export("id", exampleShare.Id)
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example_account = azure.datashare.get_account(name="example-account",
    resource_group_name="example-resource-group")
example_share = azure.datashare.get_share(name="existing",
    account_id=data["azurerm_data_share_account"]["exmaple"]["id"])
pulumi.export("id", example_share.id)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleAccount = azure.datashare.getAccount({
    name: "example-account",
    resourceGroupName: "example-resource-group",
});
const exampleShare = azure.datashare.getShare({
    name: "existing",
    accountId: data.azurerm_data_share_account.exmaple.id,
});
export const id = exampleShare.then(exampleShare => exampleShare.id);

Using GetShare

function getShare(args: GetShareArgs, opts?: InvokeOptions): Promise<GetShareResult>
function  get_share(account_id=None, name=None, opts=None)
func LookupShare(ctx *Context, args *LookupShareArgs, opts ...InvokeOption) (*LookupShareResult, error)

Note: This function is named LookupShare in the Go SDK.

public static class GetShare {
    public static Task<GetShareResult> InvokeAsync(GetShareArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

AccountId string

The ID of the Data Share account in which the Data Share is created.

Name string

The name of this Data Share.

AccountId string

The ID of the Data Share account in which the Data Share is created.

Name string

The name of this Data Share.

accountId string

The ID of the Data Share account in which the Data Share is created.

name string

The name of this Data Share.

account_id str

The ID of the Data Share account in which the Data Share is created.

name str

The name of this Data Share.

GetShare Result

The following output properties are available:

AccountId string
Description string

The description of the Data Share.

Id string

The provider-assigned unique ID for this managed resource.

Kind string

The kind of the Data Share.

Name string

The name of the snapshot schedule.

SnapshotSchedules List<GetShareSnapshotSchedule>

A snapshot_schedule block as defined below.

Terms string

The terms of the Data Share.

AccountId string
Description string

The description of the Data Share.

Id string

The provider-assigned unique ID for this managed resource.

Kind string

The kind of the Data Share.

Name string

The name of the snapshot schedule.

SnapshotSchedules []GetShareSnapshotSchedule

A snapshot_schedule block as defined below.

Terms string

The terms of the Data Share.

accountId string
description string

The description of the Data Share.

id string

The provider-assigned unique ID for this managed resource.

kind string

The kind of the Data Share.

name string

The name of the snapshot schedule.

snapshotSchedules GetShareSnapshotSchedule[]

A snapshot_schedule block as defined below.

terms string

The terms of the Data Share.

account_id str
description str

The description of the Data Share.

id str

The provider-assigned unique ID for this managed resource.

kind str

The kind of the Data Share.

name str

The name of the snapshot schedule.

snapshot_schedules List[GetShareSnapshotSchedule]

A snapshot_schedule block as defined below.

terms str

The terms of the Data Share.

Supporting Types

GetShareSnapshotSchedule

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Name string

The name of this Data Share.

Recurrence string

The interval of the synchronization with the source data.

StartTime string

The synchronization with the source data’s start time.

Name string

The name of this Data Share.

Recurrence string

The interval of the synchronization with the source data.

StartTime string

The synchronization with the source data’s start time.

name string

The name of this Data Share.

recurrence string

The interval of the synchronization with the source data.

startTime string

The synchronization with the source data’s start time.

name str

The name of this Data Share.

recurrence str

The interval of the synchronization with the source data.

start_time str

The synchronization with the source data’s start time.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.