forked from pulumi/pulumi-azure-native-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
getApp.go
164 lines (138 loc) · 6 KB
/
getApp.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
// 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 iotcentral
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure-native-sdk/v2/utilities"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Get the metadata of an IoT Central application.
// Azure REST API version: 2021-06-01.
//
// Other available API versions: 2018-09-01, 2021-11-01-preview.
func LookupApp(ctx *pulumi.Context, args *LookupAppArgs, opts ...pulumi.InvokeOption) (*LookupAppResult, error) {
opts = utilities.PkgInvokeDefaultOpts(opts)
var rv LookupAppResult
err := ctx.Invoke("azure-native:iotcentral:getApp", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupAppArgs struct {
// The name of the resource group that contains the IoT Central application.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The ARM resource name of the IoT Central application.
ResourceName string `pulumi:"resourceName"`
}
// The IoT Central application.
type LookupAppResult struct {
// The ID of the application.
ApplicationId string `pulumi:"applicationId"`
// The display name of the application.
DisplayName *string `pulumi:"displayName"`
// The ARM resource identifier.
Id string `pulumi:"id"`
// The managed identities for the IoT Central application.
Identity *SystemAssignedServiceIdentityResponse `pulumi:"identity"`
// The resource location.
Location string `pulumi:"location"`
// The ARM resource name.
Name string `pulumi:"name"`
// A valid instance SKU.
Sku AppSkuInfoResponse `pulumi:"sku"`
// The current state of the application.
State string `pulumi:"state"`
// The subdomain of the application.
Subdomain *string `pulumi:"subdomain"`
// The resource tags.
Tags map[string]string `pulumi:"tags"`
// The ID of the application template, which is a blueprint that defines the characteristics and behaviors of an application. Optional; if not specified, defaults to a blank blueprint and allows the application to be defined from scratch.
Template *string `pulumi:"template"`
// The resource type.
Type string `pulumi:"type"`
}
func LookupAppOutput(ctx *pulumi.Context, args LookupAppOutputArgs, opts ...pulumi.InvokeOption) LookupAppResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupAppResult, error) {
args := v.(LookupAppArgs)
r, err := LookupApp(ctx, &args, opts...)
var s LookupAppResult
if r != nil {
s = *r
}
return s, err
}).(LookupAppResultOutput)
}
type LookupAppOutputArgs struct {
// The name of the resource group that contains the IoT Central application.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
// The ARM resource name of the IoT Central application.
ResourceName pulumi.StringInput `pulumi:"resourceName"`
}
func (LookupAppOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAppArgs)(nil)).Elem()
}
// The IoT Central application.
type LookupAppResultOutput struct{ *pulumi.OutputState }
func (LookupAppResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAppResult)(nil)).Elem()
}
func (o LookupAppResultOutput) ToLookupAppResultOutput() LookupAppResultOutput {
return o
}
func (o LookupAppResultOutput) ToLookupAppResultOutputWithContext(ctx context.Context) LookupAppResultOutput {
return o
}
// The ID of the application.
func (o LookupAppResultOutput) ApplicationId() pulumi.StringOutput {
return o.ApplyT(func(v LookupAppResult) string { return v.ApplicationId }).(pulumi.StringOutput)
}
// The display name of the application.
func (o LookupAppResultOutput) DisplayName() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupAppResult) *string { return v.DisplayName }).(pulumi.StringPtrOutput)
}
// The ARM resource identifier.
func (o LookupAppResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupAppResult) string { return v.Id }).(pulumi.StringOutput)
}
// The managed identities for the IoT Central application.
func (o LookupAppResultOutput) Identity() SystemAssignedServiceIdentityResponsePtrOutput {
return o.ApplyT(func(v LookupAppResult) *SystemAssignedServiceIdentityResponse { return v.Identity }).(SystemAssignedServiceIdentityResponsePtrOutput)
}
// The resource location.
func (o LookupAppResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupAppResult) string { return v.Location }).(pulumi.StringOutput)
}
// The ARM resource name.
func (o LookupAppResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupAppResult) string { return v.Name }).(pulumi.StringOutput)
}
// A valid instance SKU.
func (o LookupAppResultOutput) Sku() AppSkuInfoResponseOutput {
return o.ApplyT(func(v LookupAppResult) AppSkuInfoResponse { return v.Sku }).(AppSkuInfoResponseOutput)
}
// The current state of the application.
func (o LookupAppResultOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v LookupAppResult) string { return v.State }).(pulumi.StringOutput)
}
// The subdomain of the application.
func (o LookupAppResultOutput) Subdomain() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupAppResult) *string { return v.Subdomain }).(pulumi.StringPtrOutput)
}
// The resource tags.
func (o LookupAppResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupAppResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The ID of the application template, which is a blueprint that defines the characteristics and behaviors of an application. Optional; if not specified, defaults to a blank blueprint and allows the application to be defined from scratch.
func (o LookupAppResultOutput) Template() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupAppResult) *string { return v.Template }).(pulumi.StringPtrOutput)
}
// The resource type.
func (o LookupAppResultOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v LookupAppResult) string { return v.Type }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupAppResultOutput{})
}