/
getListing.go
166 lines (139 loc) · 8.55 KB
/
getListing.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package v1
import (
"context"
"reflect"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Gets the details of a listing.
func LookupListing(ctx *pulumi.Context, args *LookupListingArgs, opts ...pulumi.InvokeOption) (*LookupListingResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupListingResult
err := ctx.Invoke("google-native:analyticshub/v1:getListing", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupListingArgs struct {
DataExchangeId string `pulumi:"dataExchangeId"`
ListingId string `pulumi:"listingId"`
Location string `pulumi:"location"`
Project *string `pulumi:"project"`
}
type LookupListingResult struct {
// Shared dataset i.e. BigQuery dataset source.
BigqueryDataset BigQueryDatasetSourceResponse `pulumi:"bigqueryDataset"`
// Optional. Categories of the listing. Up to two categories are allowed.
Categories []string `pulumi:"categories"`
// Optional. Details of the data provider who owns the source data.
DataProvider DataProviderResponse `pulumi:"dataProvider"`
// Optional. Short description of the listing. The description must not contain Unicode non-characters and C0 and C1 control codes except tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default value is an empty string. Max length: 2000 bytes.
Description string `pulumi:"description"`
// Human-readable display name of the listing. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces. Default value is an empty string. Max length: 63 bytes.
DisplayName string `pulumi:"displayName"`
// Optional. Documentation describing the listing.
Documentation string `pulumi:"documentation"`
// Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB Expected image dimensions are 512x512 pixels, however the API only performs validation on size of the encoded data. Note: For byte fields, the contents of the field are base64-encoded (which increases the size of the data by 33-36%) when using JSON on the wire.
Icon string `pulumi:"icon"`
// The resource name of the listing. e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`
Name string `pulumi:"name"`
// Optional. Email or URL of the primary point of contact of the listing. Max Length: 1000 bytes.
PrimaryContact string `pulumi:"primaryContact"`
// Optional. Details of the publisher who owns the listing and who can share the source data.
Publisher PublisherResponse `pulumi:"publisher"`
// Optional. Email or URL of the request access of the listing. Subscribers can use this reference to request access. Max Length: 1000 bytes.
RequestAccess string `pulumi:"requestAccess"`
// Optional. If set, restricted export configuration will be propagated and enforced on the linked dataset.
RestrictedExportConfig RestrictedExportConfigResponse `pulumi:"restrictedExportConfig"`
// Current state of the listing.
State string `pulumi:"state"`
}
func LookupListingOutput(ctx *pulumi.Context, args LookupListingOutputArgs, opts ...pulumi.InvokeOption) LookupListingResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupListingResult, error) {
args := v.(LookupListingArgs)
r, err := LookupListing(ctx, &args, opts...)
var s LookupListingResult
if r != nil {
s = *r
}
return s, err
}).(LookupListingResultOutput)
}
type LookupListingOutputArgs struct {
DataExchangeId pulumi.StringInput `pulumi:"dataExchangeId"`
ListingId pulumi.StringInput `pulumi:"listingId"`
Location pulumi.StringInput `pulumi:"location"`
Project pulumi.StringPtrInput `pulumi:"project"`
}
func (LookupListingOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupListingArgs)(nil)).Elem()
}
type LookupListingResultOutput struct{ *pulumi.OutputState }
func (LookupListingResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupListingResult)(nil)).Elem()
}
func (o LookupListingResultOutput) ToLookupListingResultOutput() LookupListingResultOutput {
return o
}
func (o LookupListingResultOutput) ToLookupListingResultOutputWithContext(ctx context.Context) LookupListingResultOutput {
return o
}
// Shared dataset i.e. BigQuery dataset source.
func (o LookupListingResultOutput) BigqueryDataset() BigQueryDatasetSourceResponseOutput {
return o.ApplyT(func(v LookupListingResult) BigQueryDatasetSourceResponse { return v.BigqueryDataset }).(BigQueryDatasetSourceResponseOutput)
}
// Optional. Categories of the listing. Up to two categories are allowed.
func (o LookupListingResultOutput) Categories() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupListingResult) []string { return v.Categories }).(pulumi.StringArrayOutput)
}
// Optional. Details of the data provider who owns the source data.
func (o LookupListingResultOutput) DataProvider() DataProviderResponseOutput {
return o.ApplyT(func(v LookupListingResult) DataProviderResponse { return v.DataProvider }).(DataProviderResponseOutput)
}
// Optional. Short description of the listing. The description must not contain Unicode non-characters and C0 and C1 control codes except tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default value is an empty string. Max length: 2000 bytes.
func (o LookupListingResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupListingResult) string { return v.Description }).(pulumi.StringOutput)
}
// Human-readable display name of the listing. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces. Default value is an empty string. Max length: 63 bytes.
func (o LookupListingResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupListingResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// Optional. Documentation describing the listing.
func (o LookupListingResultOutput) Documentation() pulumi.StringOutput {
return o.ApplyT(func(v LookupListingResult) string { return v.Documentation }).(pulumi.StringOutput)
}
// Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB Expected image dimensions are 512x512 pixels, however the API only performs validation on size of the encoded data. Note: For byte fields, the contents of the field are base64-encoded (which increases the size of the data by 33-36%) when using JSON on the wire.
func (o LookupListingResultOutput) Icon() pulumi.StringOutput {
return o.ApplyT(func(v LookupListingResult) string { return v.Icon }).(pulumi.StringOutput)
}
// The resource name of the listing. e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`
func (o LookupListingResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupListingResult) string { return v.Name }).(pulumi.StringOutput)
}
// Optional. Email or URL of the primary point of contact of the listing. Max Length: 1000 bytes.
func (o LookupListingResultOutput) PrimaryContact() pulumi.StringOutput {
return o.ApplyT(func(v LookupListingResult) string { return v.PrimaryContact }).(pulumi.StringOutput)
}
// Optional. Details of the publisher who owns the listing and who can share the source data.
func (o LookupListingResultOutput) Publisher() PublisherResponseOutput {
return o.ApplyT(func(v LookupListingResult) PublisherResponse { return v.Publisher }).(PublisherResponseOutput)
}
// Optional. Email or URL of the request access of the listing. Subscribers can use this reference to request access. Max Length: 1000 bytes.
func (o LookupListingResultOutput) RequestAccess() pulumi.StringOutput {
return o.ApplyT(func(v LookupListingResult) string { return v.RequestAccess }).(pulumi.StringOutput)
}
// Optional. If set, restricted export configuration will be propagated and enforced on the linked dataset.
func (o LookupListingResultOutput) RestrictedExportConfig() RestrictedExportConfigResponseOutput {
return o.ApplyT(func(v LookupListingResult) RestrictedExportConfigResponse { return v.RestrictedExportConfig }).(RestrictedExportConfigResponseOutput)
}
// Current state of the listing.
func (o LookupListingResultOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v LookupListingResult) string { return v.State }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupListingResultOutput{})
}