generated from pulumi/pulumi-tf-provider-boilerplate
/
getStack.go
174 lines (149 loc) · 6.93 KB
/
getStack.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
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package resourcemanager
import (
"context"
"reflect"
"github.com/pulumi/pulumi-oci/sdk/go/oci/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// This data source provides details about a specific Stack resource in Oracle Cloud Infrastructure Resource Manager service.
//
// Gets a stack using the stack ID.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-oci/sdk/go/oci/ResourceManager"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := ResourceManager.GetStack(ctx, &resourcemanager.GetStackArgs{
// StackId: testStackOciResourcemanagerStack.Id,
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func GetStack(ctx *pulumi.Context, args *GetStackArgs, opts ...pulumi.InvokeOption) (*GetStackResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetStackResult
err := ctx.Invoke("oci:ResourceManager/getStack:getStack", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getStack.
type GetStackArgs struct {
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the stack.
StackId string `pulumi:"stackId"`
}
// A collection of values returned by getStack.
type GetStackResult struct {
// Unique identifier ([OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)) for the compartment where the stack is located.
CompartmentId string `pulumi:"compartmentId"`
ConfigSources []GetStackConfigSource `pulumi:"configSources"`
// Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`
DefinedTags map[string]interface{} `pulumi:"definedTags"`
// General description of the stack.
Description string `pulumi:"description"`
// Human-readable display name for the stack.
DisplayName string `pulumi:"displayName"`
// Free-form tags associated with this resource. Each tag is a key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
FreeformTags map[string]interface{} `pulumi:"freeformTags"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
StackId string `pulumi:"stackId"`
// The current lifecycle state of the stack.
State string `pulumi:"state"`
// The date and time at which the stack was created.
TimeCreated string `pulumi:"timeCreated"`
Variables map[string]interface{} `pulumi:"variables"`
}
func GetStackOutput(ctx *pulumi.Context, args GetStackOutputArgs, opts ...pulumi.InvokeOption) GetStackResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (GetStackResult, error) {
args := v.(GetStackArgs)
r, err := GetStack(ctx, &args, opts...)
var s GetStackResult
if r != nil {
s = *r
}
return s, err
}).(GetStackResultOutput)
}
// A collection of arguments for invoking getStack.
type GetStackOutputArgs struct {
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the stack.
StackId pulumi.StringInput `pulumi:"stackId"`
}
func (GetStackOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetStackArgs)(nil)).Elem()
}
// A collection of values returned by getStack.
type GetStackResultOutput struct{ *pulumi.OutputState }
func (GetStackResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetStackResult)(nil)).Elem()
}
func (o GetStackResultOutput) ToGetStackResultOutput() GetStackResultOutput {
return o
}
func (o GetStackResultOutput) ToGetStackResultOutputWithContext(ctx context.Context) GetStackResultOutput {
return o
}
// Unique identifier ([OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)) for the compartment where the stack is located.
func (o GetStackResultOutput) CompartmentId() pulumi.StringOutput {
return o.ApplyT(func(v GetStackResult) string { return v.CompartmentId }).(pulumi.StringOutput)
}
func (o GetStackResultOutput) ConfigSources() GetStackConfigSourceArrayOutput {
return o.ApplyT(func(v GetStackResult) []GetStackConfigSource { return v.ConfigSources }).(GetStackConfigSourceArrayOutput)
}
// Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`
func (o GetStackResultOutput) DefinedTags() pulumi.MapOutput {
return o.ApplyT(func(v GetStackResult) map[string]interface{} { return v.DefinedTags }).(pulumi.MapOutput)
}
// General description of the stack.
func (o GetStackResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v GetStackResult) string { return v.Description }).(pulumi.StringOutput)
}
// Human-readable display name for the stack.
func (o GetStackResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v GetStackResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// Free-form tags associated with this resource. Each tag is a key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
func (o GetStackResultOutput) FreeformTags() pulumi.MapOutput {
return o.ApplyT(func(v GetStackResult) map[string]interface{} { return v.FreeformTags }).(pulumi.MapOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetStackResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetStackResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetStackResultOutput) StackId() pulumi.StringOutput {
return o.ApplyT(func(v GetStackResult) string { return v.StackId }).(pulumi.StringOutput)
}
// The current lifecycle state of the stack.
func (o GetStackResultOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v GetStackResult) string { return v.State }).(pulumi.StringOutput)
}
// The date and time at which the stack was created.
func (o GetStackResultOutput) TimeCreated() pulumi.StringOutput {
return o.ApplyT(func(v GetStackResult) string { return v.TimeCreated }).(pulumi.StringOutput)
}
func (o GetStackResultOutput) Variables() pulumi.MapOutput {
return o.ApplyT(func(v GetStackResult) map[string]interface{} { return v.Variables }).(pulumi.MapOutput)
}
func init() {
pulumi.RegisterOutputType(GetStackResultOutput{})
}