/
getDestination.go
114 lines (94 loc) · 3.97 KB
/
getDestination.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
// Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package iotwireless
import (
"context"
"reflect"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Destination's resource schema demonstrating some basic constructs and validation rules.
func LookupDestination(ctx *pulumi.Context, args *LookupDestinationArgs, opts ...pulumi.InvokeOption) (*LookupDestinationResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupDestinationResult
err := ctx.Invoke("aws-native:iotwireless:getDestination", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupDestinationArgs struct {
// Unique name of destination
Name string `pulumi:"name"`
}
type LookupDestinationResult struct {
// Destination arn. Returned after successful create.
Arn *string `pulumi:"arn"`
// Destination description
Description *string `pulumi:"description"`
// Destination expression
Expression *string `pulumi:"expression"`
// Must be RuleName
ExpressionType *DestinationExpressionType `pulumi:"expressionType"`
// AWS role ARN that grants access
RoleArn *string `pulumi:"roleArn"`
// A list of key-value pairs that contain metadata for the destination.
Tags []aws.Tag `pulumi:"tags"`
}
func LookupDestinationOutput(ctx *pulumi.Context, args LookupDestinationOutputArgs, opts ...pulumi.InvokeOption) LookupDestinationResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupDestinationResult, error) {
args := v.(LookupDestinationArgs)
r, err := LookupDestination(ctx, &args, opts...)
var s LookupDestinationResult
if r != nil {
s = *r
}
return s, err
}).(LookupDestinationResultOutput)
}
type LookupDestinationOutputArgs struct {
// Unique name of destination
Name pulumi.StringInput `pulumi:"name"`
}
func (LookupDestinationOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDestinationArgs)(nil)).Elem()
}
type LookupDestinationResultOutput struct{ *pulumi.OutputState }
func (LookupDestinationResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDestinationResult)(nil)).Elem()
}
func (o LookupDestinationResultOutput) ToLookupDestinationResultOutput() LookupDestinationResultOutput {
return o
}
func (o LookupDestinationResultOutput) ToLookupDestinationResultOutputWithContext(ctx context.Context) LookupDestinationResultOutput {
return o
}
// Destination arn. Returned after successful create.
func (o LookupDestinationResultOutput) Arn() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupDestinationResult) *string { return v.Arn }).(pulumi.StringPtrOutput)
}
// Destination description
func (o LookupDestinationResultOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupDestinationResult) *string { return v.Description }).(pulumi.StringPtrOutput)
}
// Destination expression
func (o LookupDestinationResultOutput) Expression() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupDestinationResult) *string { return v.Expression }).(pulumi.StringPtrOutput)
}
// Must be RuleName
func (o LookupDestinationResultOutput) ExpressionType() DestinationExpressionTypePtrOutput {
return o.ApplyT(func(v LookupDestinationResult) *DestinationExpressionType { return v.ExpressionType }).(DestinationExpressionTypePtrOutput)
}
// AWS role ARN that grants access
func (o LookupDestinationResultOutput) RoleArn() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupDestinationResult) *string { return v.RoleArn }).(pulumi.StringPtrOutput)
}
// A list of key-value pairs that contain metadata for the destination.
func (o LookupDestinationResultOutput) Tags() aws.TagArrayOutput {
return o.ApplyT(func(v LookupDestinationResult) []aws.Tag { return v.Tags }).(aws.TagArrayOutput)
}
func init() {
pulumi.RegisterOutputType(LookupDestinationResultOutput{})
}