/
getWorkflowInvocation.go
124 lines (103 loc) · 5.69 KB
/
getWorkflowInvocation.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"
)
// Fetches a single WorkflowInvocation.
func LookupWorkflowInvocation(ctx *pulumi.Context, args *LookupWorkflowInvocationArgs, opts ...pulumi.InvokeOption) (*LookupWorkflowInvocationResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupWorkflowInvocationResult
err := ctx.Invoke("google-native:dataform/v1beta1:getWorkflowInvocation", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupWorkflowInvocationArgs struct {
Location string `pulumi:"location"`
Project *string `pulumi:"project"`
RepositoryId string `pulumi:"repositoryId"`
WorkflowInvocationId string `pulumi:"workflowInvocationId"`
}
type LookupWorkflowInvocationResult struct {
// Immutable. The name of the compilation result to use for this invocation. Must be in the format `projects/*/locations/*/repositories/*/compilationResults/*`.
CompilationResult string `pulumi:"compilationResult"`
// Immutable. If left unset, a default InvocationConfig will be used.
InvocationConfig InvocationConfigResponse `pulumi:"invocationConfig"`
// This workflow invocation's timing details.
InvocationTiming IntervalResponse `pulumi:"invocationTiming"`
// The workflow invocation's name.
Name string `pulumi:"name"`
// The resolved compilation result that was used to create this invocation. Will be in the format `projects/*/locations/*/repositories/*/compilationResults/*`.
ResolvedCompilationResult string `pulumi:"resolvedCompilationResult"`
// This workflow invocation's current state.
State string `pulumi:"state"`
// Immutable. The name of the workflow config to invoke. Must be in the format `projects/*/locations/*/repositories/*/workflowConfigs/*`.
WorkflowConfig string `pulumi:"workflowConfig"`
}
func LookupWorkflowInvocationOutput(ctx *pulumi.Context, args LookupWorkflowInvocationOutputArgs, opts ...pulumi.InvokeOption) LookupWorkflowInvocationResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupWorkflowInvocationResult, error) {
args := v.(LookupWorkflowInvocationArgs)
r, err := LookupWorkflowInvocation(ctx, &args, opts...)
var s LookupWorkflowInvocationResult
if r != nil {
s = *r
}
return s, err
}).(LookupWorkflowInvocationResultOutput)
}
type LookupWorkflowInvocationOutputArgs struct {
Location pulumi.StringInput `pulumi:"location"`
Project pulumi.StringPtrInput `pulumi:"project"`
RepositoryId pulumi.StringInput `pulumi:"repositoryId"`
WorkflowInvocationId pulumi.StringInput `pulumi:"workflowInvocationId"`
}
func (LookupWorkflowInvocationOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupWorkflowInvocationArgs)(nil)).Elem()
}
type LookupWorkflowInvocationResultOutput struct{ *pulumi.OutputState }
func (LookupWorkflowInvocationResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupWorkflowInvocationResult)(nil)).Elem()
}
func (o LookupWorkflowInvocationResultOutput) ToLookupWorkflowInvocationResultOutput() LookupWorkflowInvocationResultOutput {
return o
}
func (o LookupWorkflowInvocationResultOutput) ToLookupWorkflowInvocationResultOutputWithContext(ctx context.Context) LookupWorkflowInvocationResultOutput {
return o
}
// Immutable. The name of the compilation result to use for this invocation. Must be in the format `projects/*/locations/*/repositories/*/compilationResults/*`.
func (o LookupWorkflowInvocationResultOutput) CompilationResult() pulumi.StringOutput {
return o.ApplyT(func(v LookupWorkflowInvocationResult) string { return v.CompilationResult }).(pulumi.StringOutput)
}
// Immutable. If left unset, a default InvocationConfig will be used.
func (o LookupWorkflowInvocationResultOutput) InvocationConfig() InvocationConfigResponseOutput {
return o.ApplyT(func(v LookupWorkflowInvocationResult) InvocationConfigResponse { return v.InvocationConfig }).(InvocationConfigResponseOutput)
}
// This workflow invocation's timing details.
func (o LookupWorkflowInvocationResultOutput) InvocationTiming() IntervalResponseOutput {
return o.ApplyT(func(v LookupWorkflowInvocationResult) IntervalResponse { return v.InvocationTiming }).(IntervalResponseOutput)
}
// The workflow invocation's name.
func (o LookupWorkflowInvocationResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupWorkflowInvocationResult) string { return v.Name }).(pulumi.StringOutput)
}
// The resolved compilation result that was used to create this invocation. Will be in the format `projects/*/locations/*/repositories/*/compilationResults/*`.
func (o LookupWorkflowInvocationResultOutput) ResolvedCompilationResult() pulumi.StringOutput {
return o.ApplyT(func(v LookupWorkflowInvocationResult) string { return v.ResolvedCompilationResult }).(pulumi.StringOutput)
}
// This workflow invocation's current state.
func (o LookupWorkflowInvocationResultOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v LookupWorkflowInvocationResult) string { return v.State }).(pulumi.StringOutput)
}
// Immutable. The name of the workflow config to invoke. Must be in the format `projects/*/locations/*/repositories/*/workflowConfigs/*`.
func (o LookupWorkflowInvocationResultOutput) WorkflowConfig() pulumi.StringOutput {
return o.ApplyT(func(v LookupWorkflowInvocationResult) string { return v.WorkflowConfig }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupWorkflowInvocationResultOutput{})
}