This repository has been archived by the owner on Oct 6, 2023. It is now read-only.
generated from pulumi/pulumi-tf-provider-boilerplate
/
getServerlessContainer.go
215 lines (185 loc) · 9.63 KB
/
getServerlessContainer.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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package yandex
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Get information about a Yandex Cloud Serverless Container.
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-yandex/sdk/go/yandex"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// opt0 := "are1samplecontainer11"
// _, err := yandex.LookupServerlessContainer(ctx, &GetServerlessContainerArgs{
// ContainerId: &opt0,
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// This data source is used to define Yandex Cloud Container that can be used by other resources.
func LookupServerlessContainer(ctx *pulumi.Context, args *LookupServerlessContainerArgs, opts ...pulumi.InvokeOption) (*LookupServerlessContainerResult, error) {
var rv LookupServerlessContainerResult
err := ctx.Invoke("yandex:index/getServerlessContainer:getServerlessContainer", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getServerlessContainer.
type LookupServerlessContainerArgs struct {
// Yandex Cloud Serverless Container id used to define container
ContainerId *string `pulumi:"containerId"`
// Folder ID for the Yandex Cloud Serverless Container
FolderId *string `pulumi:"folderId"`
// Yandex Cloud Serverless Container name used to define container
Name *string `pulumi:"name"`
}
// A collection of values returned by getServerlessContainer.
type LookupServerlessContainerResult struct {
// Concurrency of Yandex Cloud Serverless Container
Concurrency int `pulumi:"concurrency"`
ContainerId *string `pulumi:"containerId"`
// Core fraction (**0...100**) of the Yandex Cloud Serverless Container
CoreFraction int `pulumi:"coreFraction"`
Cores int `pulumi:"cores"`
// Creation timestamp of the Yandex Cloud Serverless Container
CreatedAt string `pulumi:"createdAt"`
// Description of the Yandex Cloud Serverless Container
Description string `pulumi:"description"`
// Execution timeout (duration format) of Yandex Cloud Serverless Container
ExecutionTimeout string `pulumi:"executionTimeout"`
FolderId *string `pulumi:"folderId"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Images []GetServerlessContainerImage `pulumi:"images"`
// A set of key/value label pairs assigned to the Yandex Cloud Serverless Container
Labels map[string]string `pulumi:"labels"`
// Memory in megabytes of Yandex Cloud Serverless Container
Memory int `pulumi:"memory"`
Name *string `pulumi:"name"`
// Last revision ID of the Yandex Cloud Serverless Container
RevisionId string `pulumi:"revisionId"`
// Service account ID of Yandex Cloud Serverless Container
// * `image.0.url` - URL of image that deployed as Yandex Cloud Serverless Container
// * `image.0.work_dir` - Working directory of Yandex Cloud Serverless Container
// * `image.0.digest` - Digest of image that deployed as Yandex Cloud Serverless Container
// * `image.0.command` - List of commands of the Yandex Cloud Serverless Container
// * `image.0.args` - List of arguments of the Yandex Cloud Serverless Container
// * `image.0.environment` - A set of key/value environment variable pairs of Yandex Cloud Serverless Container
ServiceAccountId string `pulumi:"serviceAccountId"`
// Invoke URL of the Yandex Cloud Serverless Container
Url string `pulumi:"url"`
}
func LookupServerlessContainerOutput(ctx *pulumi.Context, args LookupServerlessContainerOutputArgs, opts ...pulumi.InvokeOption) LookupServerlessContainerResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupServerlessContainerResult, error) {
args := v.(LookupServerlessContainerArgs)
r, err := LookupServerlessContainer(ctx, &args, opts...)
return *r, err
}).(LookupServerlessContainerResultOutput)
}
// A collection of arguments for invoking getServerlessContainer.
type LookupServerlessContainerOutputArgs struct {
// Yandex Cloud Serverless Container id used to define container
ContainerId pulumi.StringPtrInput `pulumi:"containerId"`
// Folder ID for the Yandex Cloud Serverless Container
FolderId pulumi.StringPtrInput `pulumi:"folderId"`
// Yandex Cloud Serverless Container name used to define container
Name pulumi.StringPtrInput `pulumi:"name"`
}
func (LookupServerlessContainerOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupServerlessContainerArgs)(nil)).Elem()
}
// A collection of values returned by getServerlessContainer.
type LookupServerlessContainerResultOutput struct{ *pulumi.OutputState }
func (LookupServerlessContainerResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupServerlessContainerResult)(nil)).Elem()
}
func (o LookupServerlessContainerResultOutput) ToLookupServerlessContainerResultOutput() LookupServerlessContainerResultOutput {
return o
}
func (o LookupServerlessContainerResultOutput) ToLookupServerlessContainerResultOutputWithContext(ctx context.Context) LookupServerlessContainerResultOutput {
return o
}
// Concurrency of Yandex Cloud Serverless Container
func (o LookupServerlessContainerResultOutput) Concurrency() pulumi.IntOutput {
return o.ApplyT(func(v LookupServerlessContainerResult) int { return v.Concurrency }).(pulumi.IntOutput)
}
func (o LookupServerlessContainerResultOutput) ContainerId() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupServerlessContainerResult) *string { return v.ContainerId }).(pulumi.StringPtrOutput)
}
// Core fraction (**0...100**) of the Yandex Cloud Serverless Container
func (o LookupServerlessContainerResultOutput) CoreFraction() pulumi.IntOutput {
return o.ApplyT(func(v LookupServerlessContainerResult) int { return v.CoreFraction }).(pulumi.IntOutput)
}
func (o LookupServerlessContainerResultOutput) Cores() pulumi.IntOutput {
return o.ApplyT(func(v LookupServerlessContainerResult) int { return v.Cores }).(pulumi.IntOutput)
}
// Creation timestamp of the Yandex Cloud Serverless Container
func (o LookupServerlessContainerResultOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v LookupServerlessContainerResult) string { return v.CreatedAt }).(pulumi.StringOutput)
}
// Description of the Yandex Cloud Serverless Container
func (o LookupServerlessContainerResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupServerlessContainerResult) string { return v.Description }).(pulumi.StringOutput)
}
// Execution timeout (duration format) of Yandex Cloud Serverless Container
func (o LookupServerlessContainerResultOutput) ExecutionTimeout() pulumi.StringOutput {
return o.ApplyT(func(v LookupServerlessContainerResult) string { return v.ExecutionTimeout }).(pulumi.StringOutput)
}
func (o LookupServerlessContainerResultOutput) FolderId() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupServerlessContainerResult) *string { return v.FolderId }).(pulumi.StringPtrOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupServerlessContainerResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupServerlessContainerResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupServerlessContainerResultOutput) Images() GetServerlessContainerImageArrayOutput {
return o.ApplyT(func(v LookupServerlessContainerResult) []GetServerlessContainerImage { return v.Images }).(GetServerlessContainerImageArrayOutput)
}
// A set of key/value label pairs assigned to the Yandex Cloud Serverless Container
func (o LookupServerlessContainerResultOutput) Labels() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupServerlessContainerResult) map[string]string { return v.Labels }).(pulumi.StringMapOutput)
}
// Memory in megabytes of Yandex Cloud Serverless Container
func (o LookupServerlessContainerResultOutput) Memory() pulumi.IntOutput {
return o.ApplyT(func(v LookupServerlessContainerResult) int { return v.Memory }).(pulumi.IntOutput)
}
func (o LookupServerlessContainerResultOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupServerlessContainerResult) *string { return v.Name }).(pulumi.StringPtrOutput)
}
// Last revision ID of the Yandex Cloud Serverless Container
func (o LookupServerlessContainerResultOutput) RevisionId() pulumi.StringOutput {
return o.ApplyT(func(v LookupServerlessContainerResult) string { return v.RevisionId }).(pulumi.StringOutput)
}
// Service account ID of Yandex Cloud Serverless Container
// * `image.0.url` - URL of image that deployed as Yandex Cloud Serverless Container
// * `image.0.work_dir` - Working directory of Yandex Cloud Serverless Container
// * `image.0.digest` - Digest of image that deployed as Yandex Cloud Serverless Container
// * `image.0.command` - List of commands of the Yandex Cloud Serverless Container
// * `image.0.args` - List of arguments of the Yandex Cloud Serverless Container
// * `image.0.environment` - A set of key/value environment variable pairs of Yandex Cloud Serverless Container
func (o LookupServerlessContainerResultOutput) ServiceAccountId() pulumi.StringOutput {
return o.ApplyT(func(v LookupServerlessContainerResult) string { return v.ServiceAccountId }).(pulumi.StringOutput)
}
// Invoke URL of the Yandex Cloud Serverless Container
func (o LookupServerlessContainerResultOutput) Url() pulumi.StringOutput {
return o.ApplyT(func(v LookupServerlessContainerResult) string { return v.Url }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupServerlessContainerResultOutput{})
}