forked from pulumi/pulumi-azure-native-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
getTrigger.go
133 lines (112 loc) · 5.02 KB
/
getTrigger.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
// 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 virtualmachineimages
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure-native-sdk/v2/utilities"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Get the specified trigger for the specified image template resource
// Azure REST API version: 2022-07-01.
//
// Other available API versions: 2023-07-01.
func LookupTrigger(ctx *pulumi.Context, args *LookupTriggerArgs, opts ...pulumi.InvokeOption) (*LookupTriggerResult, error) {
opts = utilities.PkgInvokeDefaultOpts(opts)
var rv LookupTriggerResult
err := ctx.Invoke("azure-native:virtualmachineimages:getTrigger", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupTriggerArgs struct {
// The name of the image Template
ImageTemplateName string `pulumi:"imageTemplateName"`
// The name of the resource group.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The name of the trigger
TriggerName string `pulumi:"triggerName"`
}
// Represents a trigger that can invoke an image template build.
type LookupTriggerResult struct {
// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
Id string `pulumi:"id"`
// The kind of trigger.
Kind string `pulumi:"kind"`
// The name of the resource
Name string `pulumi:"name"`
// Provisioning state of the resource
ProvisioningState string `pulumi:"provisioningState"`
// Trigger status
Status TriggerStatusResponse `pulumi:"status"`
// Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData SystemDataResponse `pulumi:"systemData"`
// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type string `pulumi:"type"`
}
func LookupTriggerOutput(ctx *pulumi.Context, args LookupTriggerOutputArgs, opts ...pulumi.InvokeOption) LookupTriggerResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupTriggerResult, error) {
args := v.(LookupTriggerArgs)
r, err := LookupTrigger(ctx, &args, opts...)
var s LookupTriggerResult
if r != nil {
s = *r
}
return s, err
}).(LookupTriggerResultOutput)
}
type LookupTriggerOutputArgs struct {
// The name of the image Template
ImageTemplateName pulumi.StringInput `pulumi:"imageTemplateName"`
// The name of the resource group.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
// The name of the trigger
TriggerName pulumi.StringInput `pulumi:"triggerName"`
}
func (LookupTriggerOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupTriggerArgs)(nil)).Elem()
}
// Represents a trigger that can invoke an image template build.
type LookupTriggerResultOutput struct{ *pulumi.OutputState }
func (LookupTriggerResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupTriggerResult)(nil)).Elem()
}
func (o LookupTriggerResultOutput) ToLookupTriggerResultOutput() LookupTriggerResultOutput {
return o
}
func (o LookupTriggerResultOutput) ToLookupTriggerResultOutputWithContext(ctx context.Context) LookupTriggerResultOutput {
return o
}
// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
func (o LookupTriggerResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupTriggerResult) string { return v.Id }).(pulumi.StringOutput)
}
// The kind of trigger.
func (o LookupTriggerResultOutput) Kind() pulumi.StringOutput {
return o.ApplyT(func(v LookupTriggerResult) string { return v.Kind }).(pulumi.StringOutput)
}
// The name of the resource
func (o LookupTriggerResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupTriggerResult) string { return v.Name }).(pulumi.StringOutput)
}
// Provisioning state of the resource
func (o LookupTriggerResultOutput) ProvisioningState() pulumi.StringOutput {
return o.ApplyT(func(v LookupTriggerResult) string { return v.ProvisioningState }).(pulumi.StringOutput)
}
// Trigger status
func (o LookupTriggerResultOutput) Status() TriggerStatusResponseOutput {
return o.ApplyT(func(v LookupTriggerResult) TriggerStatusResponse { return v.Status }).(TriggerStatusResponseOutput)
}
// Azure Resource Manager metadata containing createdBy and modifiedBy information.
func (o LookupTriggerResultOutput) SystemData() SystemDataResponseOutput {
return o.ApplyT(func(v LookupTriggerResult) SystemDataResponse { return v.SystemData }).(SystemDataResponseOutput)
}
// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
func (o LookupTriggerResultOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v LookupTriggerResult) string { return v.Type }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupTriggerResultOutput{})
}