/
getRollout.go
120 lines (99 loc) · 5.53 KB
/
getRollout.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
// 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 a service configuration rollout.
func LookupRollout(ctx *pulumi.Context, args *LookupRolloutArgs, opts ...pulumi.InvokeOption) (*LookupRolloutResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupRolloutResult
err := ctx.Invoke("google-native:servicemanagement/v1:getRollout", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupRolloutArgs struct {
RolloutId string `pulumi:"rolloutId"`
ServiceName string `pulumi:"serviceName"`
}
type LookupRolloutResult struct {
// Creation time of the rollout. Readonly.
CreateTime string `pulumi:"createTime"`
// The user who created the Rollout. Readonly.
CreatedBy string `pulumi:"createdBy"`
// The strategy associated with a rollout to delete a `ManagedService`. Readonly.
DeleteServiceStrategy DeleteServiceStrategyResponse `pulumi:"deleteServiceStrategy"`
// Optional. Unique identifier of this Rollout. Must be no longer than 63 characters and only lower case letters, digits, '.', '_' and '-' are allowed. If not specified by client, the server will generate one. The generated id will have the form of , where "date" is the create date in ISO 8601 format. "revision number" is a monotonically increasing positive number that is reset every day for each service. An example of the generated rollout_id is '2016-02-16r1'
RolloutId string `pulumi:"rolloutId"`
// The name of the service associated with this Rollout.
ServiceName string `pulumi:"serviceName"`
// The status of this rollout. Readonly. In case of a failed rollout, the system will automatically rollback to the current Rollout version. Readonly.
Status string `pulumi:"status"`
// Google Service Control selects service configurations based on traffic percentage.
TrafficPercentStrategy TrafficPercentStrategyResponse `pulumi:"trafficPercentStrategy"`
}
func LookupRolloutOutput(ctx *pulumi.Context, args LookupRolloutOutputArgs, opts ...pulumi.InvokeOption) LookupRolloutResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupRolloutResult, error) {
args := v.(LookupRolloutArgs)
r, err := LookupRollout(ctx, &args, opts...)
var s LookupRolloutResult
if r != nil {
s = *r
}
return s, err
}).(LookupRolloutResultOutput)
}
type LookupRolloutOutputArgs struct {
RolloutId pulumi.StringInput `pulumi:"rolloutId"`
ServiceName pulumi.StringInput `pulumi:"serviceName"`
}
func (LookupRolloutOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupRolloutArgs)(nil)).Elem()
}
type LookupRolloutResultOutput struct{ *pulumi.OutputState }
func (LookupRolloutResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupRolloutResult)(nil)).Elem()
}
func (o LookupRolloutResultOutput) ToLookupRolloutResultOutput() LookupRolloutResultOutput {
return o
}
func (o LookupRolloutResultOutput) ToLookupRolloutResultOutputWithContext(ctx context.Context) LookupRolloutResultOutput {
return o
}
// Creation time of the rollout. Readonly.
func (o LookupRolloutResultOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupRolloutResult) string { return v.CreateTime }).(pulumi.StringOutput)
}
// The user who created the Rollout. Readonly.
func (o LookupRolloutResultOutput) CreatedBy() pulumi.StringOutput {
return o.ApplyT(func(v LookupRolloutResult) string { return v.CreatedBy }).(pulumi.StringOutput)
}
// The strategy associated with a rollout to delete a `ManagedService`. Readonly.
func (o LookupRolloutResultOutput) DeleteServiceStrategy() DeleteServiceStrategyResponseOutput {
return o.ApplyT(func(v LookupRolloutResult) DeleteServiceStrategyResponse { return v.DeleteServiceStrategy }).(DeleteServiceStrategyResponseOutput)
}
// Optional. Unique identifier of this Rollout. Must be no longer than 63 characters and only lower case letters, digits, '.', '_' and '-' are allowed. If not specified by client, the server will generate one. The generated id will have the form of , where "date" is the create date in ISO 8601 format. "revision number" is a monotonically increasing positive number that is reset every day for each service. An example of the generated rollout_id is '2016-02-16r1'
func (o LookupRolloutResultOutput) RolloutId() pulumi.StringOutput {
return o.ApplyT(func(v LookupRolloutResult) string { return v.RolloutId }).(pulumi.StringOutput)
}
// The name of the service associated with this Rollout.
func (o LookupRolloutResultOutput) ServiceName() pulumi.StringOutput {
return o.ApplyT(func(v LookupRolloutResult) string { return v.ServiceName }).(pulumi.StringOutput)
}
// The status of this rollout. Readonly. In case of a failed rollout, the system will automatically rollback to the current Rollout version. Readonly.
func (o LookupRolloutResultOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v LookupRolloutResult) string { return v.Status }).(pulumi.StringOutput)
}
// Google Service Control selects service configurations based on traffic percentage.
func (o LookupRolloutResultOutput) TrafficPercentStrategy() TrafficPercentStrategyResponseOutput {
return o.ApplyT(func(v LookupRolloutResult) TrafficPercentStrategyResponse { return v.TrafficPercentStrategy }).(TrafficPercentStrategyResponseOutput)
}
func init() {
pulumi.RegisterOutputType(LookupRolloutResultOutput{})
}