/
getShare.go
75 lines (70 loc) · 2.19 KB
/
getShare.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package datashare
import (
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// Use this data source to access information about an existing Data Share.
//
// ## Example Usage
//
// ```go
// 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 {
// exampleAccount, 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: exampleAccount.Id,
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("id", exampleShare.Id)
// return nil
// })
// }
// ```
func LookupShare(ctx *pulumi.Context, args *LookupShareArgs, opts ...pulumi.InvokeOption) (*LookupShareResult, error) {
var rv LookupShareResult
err := ctx.Invoke("azure:datashare/getShare:getShare", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getShare.
type LookupShareArgs struct {
// The ID of the Data Share account in which the Data Share is created.
AccountId string `pulumi:"accountId"`
// The name of this Data Share.
Name string `pulumi:"name"`
}
// A collection of values returned by getShare.
type LookupShareResult struct {
AccountId string `pulumi:"accountId"`
// The description of the Data Share.
Description string `pulumi:"description"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The kind of the Data Share.
Kind string `pulumi:"kind"`
// The name of the snapshot schedule.
Name string `pulumi:"name"`
// A `snapshotSchedule` block as defined below.
SnapshotSchedules []GetShareSnapshotSchedule `pulumi:"snapshotSchedules"`
// The terms of the Data Share.
Terms string `pulumi:"terms"`
}