/
getRun.go
117 lines (97 loc) · 4.73 KB
/
getRun.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
// 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 the specified run.
func LookupRun(ctx *pulumi.Context, args *LookupRunArgs, opts ...pulumi.InvokeOption) (*LookupRunResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupRunResult
err := ctx.Invoke("google-native:datalineage/v1:getRun", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupRunArgs struct {
Location string `pulumi:"location"`
ProcessId string `pulumi:"processId"`
Project *string `pulumi:"project"`
RunId string `pulumi:"runId"`
}
type LookupRunResult struct {
// Optional. The attributes of the run. Should only be used for the purpose of non-semantic management (classifying, describing or labeling the run). Up to 100 attributes are allowed.
Attributes map[string]string `pulumi:"attributes"`
// Optional. A human-readable name you can set to display in a user interface. Must be not longer than 1024 characters and only contain UTF-8 letters or numbers, spaces or characters like `_-:&.`
DisplayName string `pulumi:"displayName"`
// Optional. The timestamp of the end of the run.
EndTime string `pulumi:"endTime"`
// Immutable. The resource name of the run. Format: `projects/{project}/locations/{location}/processes/{process}/runs/{run}`. Can be specified or auto-assigned. {run} must be not longer than 200 characters and only contain characters in a set: `a-zA-Z0-9_-:.`
Name string `pulumi:"name"`
// The timestamp of the start of the run.
StartTime string `pulumi:"startTime"`
// The state of the run.
State string `pulumi:"state"`
}
func LookupRunOutput(ctx *pulumi.Context, args LookupRunOutputArgs, opts ...pulumi.InvokeOption) LookupRunResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupRunResult, error) {
args := v.(LookupRunArgs)
r, err := LookupRun(ctx, &args, opts...)
var s LookupRunResult
if r != nil {
s = *r
}
return s, err
}).(LookupRunResultOutput)
}
type LookupRunOutputArgs struct {
Location pulumi.StringInput `pulumi:"location"`
ProcessId pulumi.StringInput `pulumi:"processId"`
Project pulumi.StringPtrInput `pulumi:"project"`
RunId pulumi.StringInput `pulumi:"runId"`
}
func (LookupRunOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupRunArgs)(nil)).Elem()
}
type LookupRunResultOutput struct{ *pulumi.OutputState }
func (LookupRunResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupRunResult)(nil)).Elem()
}
func (o LookupRunResultOutput) ToLookupRunResultOutput() LookupRunResultOutput {
return o
}
func (o LookupRunResultOutput) ToLookupRunResultOutputWithContext(ctx context.Context) LookupRunResultOutput {
return o
}
// Optional. The attributes of the run. Should only be used for the purpose of non-semantic management (classifying, describing or labeling the run). Up to 100 attributes are allowed.
func (o LookupRunResultOutput) Attributes() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupRunResult) map[string]string { return v.Attributes }).(pulumi.StringMapOutput)
}
// Optional. A human-readable name you can set to display in a user interface. Must be not longer than 1024 characters and only contain UTF-8 letters or numbers, spaces or characters like `_-:&.`
func (o LookupRunResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupRunResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// Optional. The timestamp of the end of the run.
func (o LookupRunResultOutput) EndTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupRunResult) string { return v.EndTime }).(pulumi.StringOutput)
}
// Immutable. The resource name of the run. Format: `projects/{project}/locations/{location}/processes/{process}/runs/{run}`. Can be specified or auto-assigned. {run} must be not longer than 200 characters and only contain characters in a set: `a-zA-Z0-9_-:.`
func (o LookupRunResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupRunResult) string { return v.Name }).(pulumi.StringOutput)
}
// The timestamp of the start of the run.
func (o LookupRunResultOutput) StartTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupRunResult) string { return v.StartTime }).(pulumi.StringOutput)
}
// The state of the run.
func (o LookupRunResultOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v LookupRunResult) string { return v.State }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupRunResultOutput{})
}