/
getContactChannel.go
147 lines (126 loc) · 5.11 KB
/
getContactChannel.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
// 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 ssmcontacts
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Data source for managing an AWS SSM Contacts Contact Channel.
//
// ## Example Usage
// ### Basic Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ssmcontacts"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := ssmcontacts.LookupContactChannel(ctx, &ssmcontacts.LookupContactChannelArgs{
// Arn: "arn:aws:ssm-contacts:us-west-2:123456789012:contact-channel/example",
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func LookupContactChannel(ctx *pulumi.Context, args *LookupContactChannelArgs, opts ...pulumi.InvokeOption) (*LookupContactChannelResult, error) {
var rv LookupContactChannelResult
err := ctx.Invoke("aws:ssmcontacts/getContactChannel:getContactChannel", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getContactChannel.
type LookupContactChannelArgs struct {
// Amazon Resource Name (ARN) of the contact channel.
Arn string `pulumi:"arn"`
}
// A collection of values returned by getContactChannel.
type LookupContactChannelResult struct {
// Whether the contact channel is activated.
ActivationStatus string `pulumi:"activationStatus"`
Arn string `pulumi:"arn"`
// Amazon Resource Name (ARN) of the AWS SSM Contact that the contact channel belongs to.
ContactId string `pulumi:"contactId"`
// Details used to engage the contact channel.
DeliveryAddresses []GetContactChannelDeliveryAddress `pulumi:"deliveryAddresses"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// Name of the contact channel.
Name string `pulumi:"name"`
// Type of the contact channel.
Type string `pulumi:"type"`
}
func LookupContactChannelOutput(ctx *pulumi.Context, args LookupContactChannelOutputArgs, opts ...pulumi.InvokeOption) LookupContactChannelResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupContactChannelResult, error) {
args := v.(LookupContactChannelArgs)
r, err := LookupContactChannel(ctx, &args, opts...)
var s LookupContactChannelResult
if r != nil {
s = *r
}
return s, err
}).(LookupContactChannelResultOutput)
}
// A collection of arguments for invoking getContactChannel.
type LookupContactChannelOutputArgs struct {
// Amazon Resource Name (ARN) of the contact channel.
Arn pulumi.StringInput `pulumi:"arn"`
}
func (LookupContactChannelOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupContactChannelArgs)(nil)).Elem()
}
// A collection of values returned by getContactChannel.
type LookupContactChannelResultOutput struct{ *pulumi.OutputState }
func (LookupContactChannelResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupContactChannelResult)(nil)).Elem()
}
func (o LookupContactChannelResultOutput) ToLookupContactChannelResultOutput() LookupContactChannelResultOutput {
return o
}
func (o LookupContactChannelResultOutput) ToLookupContactChannelResultOutputWithContext(ctx context.Context) LookupContactChannelResultOutput {
return o
}
// Whether the contact channel is activated.
func (o LookupContactChannelResultOutput) ActivationStatus() pulumi.StringOutput {
return o.ApplyT(func(v LookupContactChannelResult) string { return v.ActivationStatus }).(pulumi.StringOutput)
}
func (o LookupContactChannelResultOutput) Arn() pulumi.StringOutput {
return o.ApplyT(func(v LookupContactChannelResult) string { return v.Arn }).(pulumi.StringOutput)
}
// Amazon Resource Name (ARN) of the AWS SSM Contact that the contact channel belongs to.
func (o LookupContactChannelResultOutput) ContactId() pulumi.StringOutput {
return o.ApplyT(func(v LookupContactChannelResult) string { return v.ContactId }).(pulumi.StringOutput)
}
// Details used to engage the contact channel.
func (o LookupContactChannelResultOutput) DeliveryAddresses() GetContactChannelDeliveryAddressArrayOutput {
return o.ApplyT(func(v LookupContactChannelResult) []GetContactChannelDeliveryAddress { return v.DeliveryAddresses }).(GetContactChannelDeliveryAddressArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupContactChannelResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupContactChannelResult) string { return v.Id }).(pulumi.StringOutput)
}
// Name of the contact channel.
func (o LookupContactChannelResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupContactChannelResult) string { return v.Name }).(pulumi.StringOutput)
}
// Type of the contact channel.
func (o LookupContactChannelResultOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v LookupContactChannelResult) string { return v.Type }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupContactChannelResultOutput{})
}