/
trustAnchor.go
156 lines (125 loc) · 5.59 KB
/
trustAnchor.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
// 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 rolesanywhere
import (
"context"
"reflect"
"errors"
"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"
)
// Definition of AWS::RolesAnywhere::TrustAnchor Resource Type.
type TrustAnchor struct {
pulumi.CustomResourceState
Enabled pulumi.BoolPtrOutput `pulumi:"enabled"`
Name pulumi.StringOutput `pulumi:"name"`
NotificationSettings TrustAnchorNotificationSettingArrayOutput `pulumi:"notificationSettings"`
Source TrustAnchorSourceOutput `pulumi:"source"`
Tags aws.TagArrayOutput `pulumi:"tags"`
TrustAnchorArn pulumi.StringOutput `pulumi:"trustAnchorArn"`
TrustAnchorId pulumi.StringOutput `pulumi:"trustAnchorId"`
}
// NewTrustAnchor registers a new resource with the given unique name, arguments, and options.
func NewTrustAnchor(ctx *pulumi.Context,
name string, args *TrustAnchorArgs, opts ...pulumi.ResourceOption) (*TrustAnchor, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Source == nil {
return nil, errors.New("invalid value for required argument 'Source'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource TrustAnchor
err := ctx.RegisterResource("aws-native:rolesanywhere:TrustAnchor", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetTrustAnchor gets an existing TrustAnchor resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetTrustAnchor(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *TrustAnchorState, opts ...pulumi.ResourceOption) (*TrustAnchor, error) {
var resource TrustAnchor
err := ctx.ReadResource("aws-native:rolesanywhere:TrustAnchor", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering TrustAnchor resources.
type trustAnchorState struct {
}
type TrustAnchorState struct {
}
func (TrustAnchorState) ElementType() reflect.Type {
return reflect.TypeOf((*trustAnchorState)(nil)).Elem()
}
type trustAnchorArgs struct {
Enabled *bool `pulumi:"enabled"`
Name *string `pulumi:"name"`
NotificationSettings []TrustAnchorNotificationSetting `pulumi:"notificationSettings"`
Source TrustAnchorSource `pulumi:"source"`
Tags []aws.Tag `pulumi:"tags"`
}
// The set of arguments for constructing a TrustAnchor resource.
type TrustAnchorArgs struct {
Enabled pulumi.BoolPtrInput
Name pulumi.StringPtrInput
NotificationSettings TrustAnchorNotificationSettingArrayInput
Source TrustAnchorSourceInput
Tags aws.TagArrayInput
}
func (TrustAnchorArgs) ElementType() reflect.Type {
return reflect.TypeOf((*trustAnchorArgs)(nil)).Elem()
}
type TrustAnchorInput interface {
pulumi.Input
ToTrustAnchorOutput() TrustAnchorOutput
ToTrustAnchorOutputWithContext(ctx context.Context) TrustAnchorOutput
}
func (*TrustAnchor) ElementType() reflect.Type {
return reflect.TypeOf((**TrustAnchor)(nil)).Elem()
}
func (i *TrustAnchor) ToTrustAnchorOutput() TrustAnchorOutput {
return i.ToTrustAnchorOutputWithContext(context.Background())
}
func (i *TrustAnchor) ToTrustAnchorOutputWithContext(ctx context.Context) TrustAnchorOutput {
return pulumi.ToOutputWithContext(ctx, i).(TrustAnchorOutput)
}
type TrustAnchorOutput struct{ *pulumi.OutputState }
func (TrustAnchorOutput) ElementType() reflect.Type {
return reflect.TypeOf((**TrustAnchor)(nil)).Elem()
}
func (o TrustAnchorOutput) ToTrustAnchorOutput() TrustAnchorOutput {
return o
}
func (o TrustAnchorOutput) ToTrustAnchorOutputWithContext(ctx context.Context) TrustAnchorOutput {
return o
}
func (o TrustAnchorOutput) Enabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *TrustAnchor) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput)
}
func (o TrustAnchorOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *TrustAnchor) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
func (o TrustAnchorOutput) NotificationSettings() TrustAnchorNotificationSettingArrayOutput {
return o.ApplyT(func(v *TrustAnchor) TrustAnchorNotificationSettingArrayOutput { return v.NotificationSettings }).(TrustAnchorNotificationSettingArrayOutput)
}
func (o TrustAnchorOutput) Source() TrustAnchorSourceOutput {
return o.ApplyT(func(v *TrustAnchor) TrustAnchorSourceOutput { return v.Source }).(TrustAnchorSourceOutput)
}
func (o TrustAnchorOutput) Tags() aws.TagArrayOutput {
return o.ApplyT(func(v *TrustAnchor) aws.TagArrayOutput { return v.Tags }).(aws.TagArrayOutput)
}
func (o TrustAnchorOutput) TrustAnchorArn() pulumi.StringOutput {
return o.ApplyT(func(v *TrustAnchor) pulumi.StringOutput { return v.TrustAnchorArn }).(pulumi.StringOutput)
}
func (o TrustAnchorOutput) TrustAnchorId() pulumi.StringOutput {
return o.ApplyT(func(v *TrustAnchor) pulumi.StringOutput { return v.TrustAnchorId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*TrustAnchorInput)(nil)).Elem(), &TrustAnchor{})
pulumi.RegisterOutputType(TrustAnchorOutput{})
}