/
getDeliveryPipeline.go
150 lines (125 loc) · 7.69 KB
/
getDeliveryPipeline.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
// 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 details of a single DeliveryPipeline.
func LookupDeliveryPipeline(ctx *pulumi.Context, args *LookupDeliveryPipelineArgs, opts ...pulumi.InvokeOption) (*LookupDeliveryPipelineResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupDeliveryPipelineResult
err := ctx.Invoke("google-native:clouddeploy/v1:getDeliveryPipeline", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupDeliveryPipelineArgs struct {
DeliveryPipelineId string `pulumi:"deliveryPipelineId"`
Location string `pulumi:"location"`
Project *string `pulumi:"project"`
}
type LookupDeliveryPipelineResult struct {
// User annotations. These attributes can only be set and used by the user, and not by Cloud Deploy.
Annotations map[string]string `pulumi:"annotations"`
// Information around the state of the Delivery Pipeline.
Condition PipelineConditionResponse `pulumi:"condition"`
// Time at which the pipeline was created.
CreateTime string `pulumi:"createTime"`
// Description of the `DeliveryPipeline`. Max length is 255 characters.
Description string `pulumi:"description"`
// This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
Etag string `pulumi:"etag"`
// Labels are attributes that can be set and used by both the user and by Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.
Labels map[string]string `pulumi:"labels"`
// Optional. Name of the `DeliveryPipeline`. Format is `projects/{project}/locations/{location}/deliveryPipelines/a-z{0,62}`.
Name string `pulumi:"name"`
// SerialPipeline defines a sequential set of stages for a `DeliveryPipeline`.
SerialPipeline SerialPipelineResponse `pulumi:"serialPipeline"`
// When suspended, no new releases or rollouts can be created, but in-progress ones will complete.
Suspended bool `pulumi:"suspended"`
// Unique identifier of the `DeliveryPipeline`.
Uid string `pulumi:"uid"`
// Most recent time at which the pipeline was updated.
UpdateTime string `pulumi:"updateTime"`
}
func LookupDeliveryPipelineOutput(ctx *pulumi.Context, args LookupDeliveryPipelineOutputArgs, opts ...pulumi.InvokeOption) LookupDeliveryPipelineResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupDeliveryPipelineResult, error) {
args := v.(LookupDeliveryPipelineArgs)
r, err := LookupDeliveryPipeline(ctx, &args, opts...)
var s LookupDeliveryPipelineResult
if r != nil {
s = *r
}
return s, err
}).(LookupDeliveryPipelineResultOutput)
}
type LookupDeliveryPipelineOutputArgs struct {
DeliveryPipelineId pulumi.StringInput `pulumi:"deliveryPipelineId"`
Location pulumi.StringInput `pulumi:"location"`
Project pulumi.StringPtrInput `pulumi:"project"`
}
func (LookupDeliveryPipelineOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDeliveryPipelineArgs)(nil)).Elem()
}
type LookupDeliveryPipelineResultOutput struct{ *pulumi.OutputState }
func (LookupDeliveryPipelineResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDeliveryPipelineResult)(nil)).Elem()
}
func (o LookupDeliveryPipelineResultOutput) ToLookupDeliveryPipelineResultOutput() LookupDeliveryPipelineResultOutput {
return o
}
func (o LookupDeliveryPipelineResultOutput) ToLookupDeliveryPipelineResultOutputWithContext(ctx context.Context) LookupDeliveryPipelineResultOutput {
return o
}
// User annotations. These attributes can only be set and used by the user, and not by Cloud Deploy.
func (o LookupDeliveryPipelineResultOutput) Annotations() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupDeliveryPipelineResult) map[string]string { return v.Annotations }).(pulumi.StringMapOutput)
}
// Information around the state of the Delivery Pipeline.
func (o LookupDeliveryPipelineResultOutput) Condition() PipelineConditionResponseOutput {
return o.ApplyT(func(v LookupDeliveryPipelineResult) PipelineConditionResponse { return v.Condition }).(PipelineConditionResponseOutput)
}
// Time at which the pipeline was created.
func (o LookupDeliveryPipelineResultOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeliveryPipelineResult) string { return v.CreateTime }).(pulumi.StringOutput)
}
// Description of the `DeliveryPipeline`. Max length is 255 characters.
func (o LookupDeliveryPipelineResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeliveryPipelineResult) string { return v.Description }).(pulumi.StringOutput)
}
// This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
func (o LookupDeliveryPipelineResultOutput) Etag() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeliveryPipelineResult) string { return v.Etag }).(pulumi.StringOutput)
}
// Labels are attributes that can be set and used by both the user and by Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.
func (o LookupDeliveryPipelineResultOutput) Labels() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupDeliveryPipelineResult) map[string]string { return v.Labels }).(pulumi.StringMapOutput)
}
// Optional. Name of the `DeliveryPipeline`. Format is `projects/{project}/locations/{location}/deliveryPipelines/a-z{0,62}`.
func (o LookupDeliveryPipelineResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeliveryPipelineResult) string { return v.Name }).(pulumi.StringOutput)
}
// SerialPipeline defines a sequential set of stages for a `DeliveryPipeline`.
func (o LookupDeliveryPipelineResultOutput) SerialPipeline() SerialPipelineResponseOutput {
return o.ApplyT(func(v LookupDeliveryPipelineResult) SerialPipelineResponse { return v.SerialPipeline }).(SerialPipelineResponseOutput)
}
// When suspended, no new releases or rollouts can be created, but in-progress ones will complete.
func (o LookupDeliveryPipelineResultOutput) Suspended() pulumi.BoolOutput {
return o.ApplyT(func(v LookupDeliveryPipelineResult) bool { return v.Suspended }).(pulumi.BoolOutput)
}
// Unique identifier of the `DeliveryPipeline`.
func (o LookupDeliveryPipelineResultOutput) Uid() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeliveryPipelineResult) string { return v.Uid }).(pulumi.StringOutput)
}
// Most recent time at which the pipeline was updated.
func (o LookupDeliveryPipelineResultOutput) UpdateTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeliveryPipelineResult) string { return v.UpdateTime }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupDeliveryPipelineResultOutput{})
}