/
getTaxonomy.go
124 lines (103 loc) · 6.04 KB
/
getTaxonomy.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
// 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 v1beta1
import (
"context"
"reflect"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Gets a taxonomy.
func LookupTaxonomy(ctx *pulumi.Context, args *LookupTaxonomyArgs, opts ...pulumi.InvokeOption) (*LookupTaxonomyResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupTaxonomyResult
err := ctx.Invoke("google-native:datacatalog/v1beta1:getTaxonomy", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupTaxonomyArgs struct {
Location string `pulumi:"location"`
Project *string `pulumi:"project"`
TaxonomyId string `pulumi:"taxonomyId"`
}
type LookupTaxonomyResult struct {
// Optional. A list of policy types that are activated for this taxonomy. If not set, defaults to an empty list.
ActivatedPolicyTypes []string `pulumi:"activatedPolicyTypes"`
// Optional. Description of this taxonomy. It must: contain only unicode characters, tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes long when encoded in UTF-8. If not set, defaults to an empty description.
Description string `pulumi:"description"`
// User defined name of this taxonomy. It must: contain only unicode letters, numbers, underscores, dashes and spaces; not start or end with spaces; and be at most 200 bytes long when encoded in UTF-8. The taxonomy display name must be unique within an organization.
DisplayName string `pulumi:"displayName"`
// Resource name of this taxonomy, whose format is: "projects/{project_number}/locations/{location_id}/taxonomies/{id}".
Name string `pulumi:"name"`
// Number of policy tags contained in this taxonomy.
PolicyTagCount int `pulumi:"policyTagCount"`
// Identity of the service which owns the Taxonomy. This field is only populated when the taxonomy is created by a Google Cloud service. Currently only 'DATAPLEX' is supported.
Service GoogleCloudDatacatalogV1beta1TaxonomyServiceResponse `pulumi:"service"`
// Timestamps about this taxonomy. Only create_time and update_time are used.
TaxonomyTimestamps GoogleCloudDatacatalogV1beta1SystemTimestampsResponse `pulumi:"taxonomyTimestamps"`
}
func LookupTaxonomyOutput(ctx *pulumi.Context, args LookupTaxonomyOutputArgs, opts ...pulumi.InvokeOption) LookupTaxonomyResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupTaxonomyResult, error) {
args := v.(LookupTaxonomyArgs)
r, err := LookupTaxonomy(ctx, &args, opts...)
var s LookupTaxonomyResult
if r != nil {
s = *r
}
return s, err
}).(LookupTaxonomyResultOutput)
}
type LookupTaxonomyOutputArgs struct {
Location pulumi.StringInput `pulumi:"location"`
Project pulumi.StringPtrInput `pulumi:"project"`
TaxonomyId pulumi.StringInput `pulumi:"taxonomyId"`
}
func (LookupTaxonomyOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupTaxonomyArgs)(nil)).Elem()
}
type LookupTaxonomyResultOutput struct{ *pulumi.OutputState }
func (LookupTaxonomyResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupTaxonomyResult)(nil)).Elem()
}
func (o LookupTaxonomyResultOutput) ToLookupTaxonomyResultOutput() LookupTaxonomyResultOutput {
return o
}
func (o LookupTaxonomyResultOutput) ToLookupTaxonomyResultOutputWithContext(ctx context.Context) LookupTaxonomyResultOutput {
return o
}
// Optional. A list of policy types that are activated for this taxonomy. If not set, defaults to an empty list.
func (o LookupTaxonomyResultOutput) ActivatedPolicyTypes() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupTaxonomyResult) []string { return v.ActivatedPolicyTypes }).(pulumi.StringArrayOutput)
}
// Optional. Description of this taxonomy. It must: contain only unicode characters, tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes long when encoded in UTF-8. If not set, defaults to an empty description.
func (o LookupTaxonomyResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupTaxonomyResult) string { return v.Description }).(pulumi.StringOutput)
}
// User defined name of this taxonomy. It must: contain only unicode letters, numbers, underscores, dashes and spaces; not start or end with spaces; and be at most 200 bytes long when encoded in UTF-8. The taxonomy display name must be unique within an organization.
func (o LookupTaxonomyResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupTaxonomyResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// Resource name of this taxonomy, whose format is: "projects/{project_number}/locations/{location_id}/taxonomies/{id}".
func (o LookupTaxonomyResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupTaxonomyResult) string { return v.Name }).(pulumi.StringOutput)
}
// Number of policy tags contained in this taxonomy.
func (o LookupTaxonomyResultOutput) PolicyTagCount() pulumi.IntOutput {
return o.ApplyT(func(v LookupTaxonomyResult) int { return v.PolicyTagCount }).(pulumi.IntOutput)
}
// Identity of the service which owns the Taxonomy. This field is only populated when the taxonomy is created by a Google Cloud service. Currently only 'DATAPLEX' is supported.
func (o LookupTaxonomyResultOutput) Service() GoogleCloudDatacatalogV1beta1TaxonomyServiceResponseOutput {
return o.ApplyT(func(v LookupTaxonomyResult) GoogleCloudDatacatalogV1beta1TaxonomyServiceResponse { return v.Service }).(GoogleCloudDatacatalogV1beta1TaxonomyServiceResponseOutput)
}
// Timestamps about this taxonomy. Only create_time and update_time are used.
func (o LookupTaxonomyResultOutput) TaxonomyTimestamps() GoogleCloudDatacatalogV1beta1SystemTimestampsResponseOutput {
return o.ApplyT(func(v LookupTaxonomyResult) GoogleCloudDatacatalogV1beta1SystemTimestampsResponse {
return v.TaxonomyTimestamps
}).(GoogleCloudDatacatalogV1beta1SystemTimestampsResponseOutput)
}
func init() {
pulumi.RegisterOutputType(LookupTaxonomyResultOutput{})
}