/
getPublishedVersion.go
178 lines (154 loc) · 6.38 KB
/
getPublishedVersion.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
// 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 blueprint
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source to access information about an existing Blueprint Published Version
//
// > **NOTE:** Azure Blueprints are in Preview and potentially subject to breaking change without notice.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/blueprint"
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.LookupSubscription(ctx, nil, nil)
// if err != nil {
// return err
// }
// _, err = blueprint.GetPublishedVersion(ctx, &blueprint.GetPublishedVersionArgs{
// ScopeId: current.Id,
// BlueprintName: "exampleBluePrint",
// Version: "dev_v2.3",
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func GetPublishedVersion(ctx *pulumi.Context, args *GetPublishedVersionArgs, opts ...pulumi.InvokeOption) (*GetPublishedVersionResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetPublishedVersionResult
err := ctx.Invoke("azure:blueprint/getPublishedVersion:getPublishedVersion", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getPublishedVersion.
type GetPublishedVersionArgs struct {
// The name of the Blueprint Definition
BlueprintName string `pulumi:"blueprintName"`
// The ID of the Management Group / Subscription where this Blueprint Definition is stored.
ScopeId string `pulumi:"scopeId"`
// The Version name of the Published Version of the Blueprint Definition
Version string `pulumi:"version"`
}
// A collection of values returned by getPublishedVersion.
type GetPublishedVersionResult struct {
BlueprintName string `pulumi:"blueprintName"`
// The description of the Blueprint Published Version
Description string `pulumi:"description"`
// The display name of the Blueprint Published Version
DisplayName string `pulumi:"displayName"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
LastModified string `pulumi:"lastModified"`
ScopeId string `pulumi:"scopeId"`
// The target scope
TargetScope string `pulumi:"targetScope"`
TimeCreated string `pulumi:"timeCreated"`
// The type of the Blueprint
Type string `pulumi:"type"`
Version string `pulumi:"version"`
}
func GetPublishedVersionOutput(ctx *pulumi.Context, args GetPublishedVersionOutputArgs, opts ...pulumi.InvokeOption) GetPublishedVersionResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (GetPublishedVersionResult, error) {
args := v.(GetPublishedVersionArgs)
r, err := GetPublishedVersion(ctx, &args, opts...)
var s GetPublishedVersionResult
if r != nil {
s = *r
}
return s, err
}).(GetPublishedVersionResultOutput)
}
// A collection of arguments for invoking getPublishedVersion.
type GetPublishedVersionOutputArgs struct {
// The name of the Blueprint Definition
BlueprintName pulumi.StringInput `pulumi:"blueprintName"`
// The ID of the Management Group / Subscription where this Blueprint Definition is stored.
ScopeId pulumi.StringInput `pulumi:"scopeId"`
// The Version name of the Published Version of the Blueprint Definition
Version pulumi.StringInput `pulumi:"version"`
}
func (GetPublishedVersionOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetPublishedVersionArgs)(nil)).Elem()
}
// A collection of values returned by getPublishedVersion.
type GetPublishedVersionResultOutput struct{ *pulumi.OutputState }
func (GetPublishedVersionResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetPublishedVersionResult)(nil)).Elem()
}
func (o GetPublishedVersionResultOutput) ToGetPublishedVersionResultOutput() GetPublishedVersionResultOutput {
return o
}
func (o GetPublishedVersionResultOutput) ToGetPublishedVersionResultOutputWithContext(ctx context.Context) GetPublishedVersionResultOutput {
return o
}
func (o GetPublishedVersionResultOutput) BlueprintName() pulumi.StringOutput {
return o.ApplyT(func(v GetPublishedVersionResult) string { return v.BlueprintName }).(pulumi.StringOutput)
}
// The description of the Blueprint Published Version
func (o GetPublishedVersionResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v GetPublishedVersionResult) string { return v.Description }).(pulumi.StringOutput)
}
// The display name of the Blueprint Published Version
func (o GetPublishedVersionResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v GetPublishedVersionResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetPublishedVersionResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetPublishedVersionResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetPublishedVersionResultOutput) LastModified() pulumi.StringOutput {
return o.ApplyT(func(v GetPublishedVersionResult) string { return v.LastModified }).(pulumi.StringOutput)
}
func (o GetPublishedVersionResultOutput) ScopeId() pulumi.StringOutput {
return o.ApplyT(func(v GetPublishedVersionResult) string { return v.ScopeId }).(pulumi.StringOutput)
}
// The target scope
func (o GetPublishedVersionResultOutput) TargetScope() pulumi.StringOutput {
return o.ApplyT(func(v GetPublishedVersionResult) string { return v.TargetScope }).(pulumi.StringOutput)
}
func (o GetPublishedVersionResultOutput) TimeCreated() pulumi.StringOutput {
return o.ApplyT(func(v GetPublishedVersionResult) string { return v.TimeCreated }).(pulumi.StringOutput)
}
// The type of the Blueprint
func (o GetPublishedVersionResultOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v GetPublishedVersionResult) string { return v.Type }).(pulumi.StringOutput)
}
func (o GetPublishedVersionResultOutput) Version() pulumi.StringOutput {
return o.ApplyT(func(v GetPublishedVersionResult) string { return v.Version }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetPublishedVersionResultOutput{})
}