/
getChannel.go
136 lines (113 loc) · 6.36 KB
/
getChannel.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
// 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"
)
// Retrieves information for the specified channel of the specified site.
func LookupChannel(ctx *pulumi.Context, args *LookupChannelArgs, opts ...pulumi.InvokeOption) (*LookupChannelResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupChannelResult
err := ctx.Invoke("google-native:firebasehosting/v1beta1:getChannel", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupChannelArgs struct {
ChannelId string `pulumi:"channelId"`
Project *string `pulumi:"project"`
SiteId string `pulumi:"siteId"`
}
type LookupChannelResult struct {
// The time at which the channel was created.
CreateTime string `pulumi:"createTime"`
// The time at which the channel will be automatically deleted. If null, the channel will not be automatically deleted. This field is present in the output whether it's set directly or via the `ttl` field.
ExpireTime string `pulumi:"expireTime"`
// Text labels used for extra metadata and/or filtering.
Labels map[string]string `pulumi:"labels"`
// The fully-qualified resource name for the channel, in the format: sites/ SITE_ID/channels/CHANNEL_ID
Name string `pulumi:"name"`
// The current release for the channel, if any.
Release ReleaseResponse `pulumi:"release"`
// The number of previous releases to retain on the channel for rollback or other purposes. Must be a number between 1-100. Defaults to 10 for new channels.
RetainedReleaseCount int `pulumi:"retainedReleaseCount"`
// Input only. A time-to-live for this channel. Sets `expire_time` to the provided duration past the time of the request.
Ttl string `pulumi:"ttl"`
// The time at which the channel was last updated.
UpdateTime string `pulumi:"updateTime"`
// The URL at which the content of this channel's current release can be viewed. This URL is a Firebase-provided subdomain of `web.app`. The content of this channel's current release can also be viewed at the Firebase-provided subdomain of `firebaseapp.com`. If this channel is the `live` channel for the Hosting site, then the content of this channel's current release can also be viewed at any connected custom domains.
Url string `pulumi:"url"`
}
func LookupChannelOutput(ctx *pulumi.Context, args LookupChannelOutputArgs, opts ...pulumi.InvokeOption) LookupChannelResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupChannelResult, error) {
args := v.(LookupChannelArgs)
r, err := LookupChannel(ctx, &args, opts...)
var s LookupChannelResult
if r != nil {
s = *r
}
return s, err
}).(LookupChannelResultOutput)
}
type LookupChannelOutputArgs struct {
ChannelId pulumi.StringInput `pulumi:"channelId"`
Project pulumi.StringPtrInput `pulumi:"project"`
SiteId pulumi.StringInput `pulumi:"siteId"`
}
func (LookupChannelOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupChannelArgs)(nil)).Elem()
}
type LookupChannelResultOutput struct{ *pulumi.OutputState }
func (LookupChannelResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupChannelResult)(nil)).Elem()
}
func (o LookupChannelResultOutput) ToLookupChannelResultOutput() LookupChannelResultOutput {
return o
}
func (o LookupChannelResultOutput) ToLookupChannelResultOutputWithContext(ctx context.Context) LookupChannelResultOutput {
return o
}
// The time at which the channel was created.
func (o LookupChannelResultOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupChannelResult) string { return v.CreateTime }).(pulumi.StringOutput)
}
// The time at which the channel will be automatically deleted. If null, the channel will not be automatically deleted. This field is present in the output whether it's set directly or via the `ttl` field.
func (o LookupChannelResultOutput) ExpireTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupChannelResult) string { return v.ExpireTime }).(pulumi.StringOutput)
}
// Text labels used for extra metadata and/or filtering.
func (o LookupChannelResultOutput) Labels() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupChannelResult) map[string]string { return v.Labels }).(pulumi.StringMapOutput)
}
// The fully-qualified resource name for the channel, in the format: sites/ SITE_ID/channels/CHANNEL_ID
func (o LookupChannelResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupChannelResult) string { return v.Name }).(pulumi.StringOutput)
}
// The current release for the channel, if any.
func (o LookupChannelResultOutput) Release() ReleaseResponseOutput {
return o.ApplyT(func(v LookupChannelResult) ReleaseResponse { return v.Release }).(ReleaseResponseOutput)
}
// The number of previous releases to retain on the channel for rollback or other purposes. Must be a number between 1-100. Defaults to 10 for new channels.
func (o LookupChannelResultOutput) RetainedReleaseCount() pulumi.IntOutput {
return o.ApplyT(func(v LookupChannelResult) int { return v.RetainedReleaseCount }).(pulumi.IntOutput)
}
// Input only. A time-to-live for this channel. Sets `expire_time` to the provided duration past the time of the request.
func (o LookupChannelResultOutput) Ttl() pulumi.StringOutput {
return o.ApplyT(func(v LookupChannelResult) string { return v.Ttl }).(pulumi.StringOutput)
}
// The time at which the channel was last updated.
func (o LookupChannelResultOutput) UpdateTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupChannelResult) string { return v.UpdateTime }).(pulumi.StringOutput)
}
// The URL at which the content of this channel's current release can be viewed. This URL is a Firebase-provided subdomain of `web.app`. The content of this channel's current release can also be viewed at the Firebase-provided subdomain of `firebaseapp.com`. If this channel is the `live` channel for the Hosting site, then the content of this channel's current release can also be viewed at any connected custom domains.
func (o LookupChannelResultOutput) Url() pulumi.StringOutput {
return o.ApplyT(func(v LookupChannelResult) string { return v.Url }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupChannelResultOutput{})
}