/
roleAlias.go
148 lines (119 loc) · 4.77 KB
/
roleAlias.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
// 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 iot
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"
)
// Use the AWS::IoT::RoleAlias resource to declare an AWS IoT RoleAlias.
type RoleAlias struct {
pulumi.CustomResourceState
CredentialDurationSeconds pulumi.IntPtrOutput `pulumi:"credentialDurationSeconds"`
RoleAlias pulumi.StringPtrOutput `pulumi:"roleAlias"`
RoleAliasArn pulumi.StringOutput `pulumi:"roleAliasArn"`
RoleArn pulumi.StringOutput `pulumi:"roleArn"`
Tags aws.TagArrayOutput `pulumi:"tags"`
}
// NewRoleAlias registers a new resource with the given unique name, arguments, and options.
func NewRoleAlias(ctx *pulumi.Context,
name string, args *RoleAliasArgs, opts ...pulumi.ResourceOption) (*RoleAlias, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.RoleArn == nil {
return nil, errors.New("invalid value for required argument 'RoleArn'")
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"roleAlias",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource RoleAlias
err := ctx.RegisterResource("aws-native:iot:RoleAlias", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetRoleAlias gets an existing RoleAlias 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 GetRoleAlias(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *RoleAliasState, opts ...pulumi.ResourceOption) (*RoleAlias, error) {
var resource RoleAlias
err := ctx.ReadResource("aws-native:iot:RoleAlias", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering RoleAlias resources.
type roleAliasState struct {
}
type RoleAliasState struct {
}
func (RoleAliasState) ElementType() reflect.Type {
return reflect.TypeOf((*roleAliasState)(nil)).Elem()
}
type roleAliasArgs struct {
CredentialDurationSeconds *int `pulumi:"credentialDurationSeconds"`
RoleAlias *string `pulumi:"roleAlias"`
RoleArn string `pulumi:"roleArn"`
Tags []aws.Tag `pulumi:"tags"`
}
// The set of arguments for constructing a RoleAlias resource.
type RoleAliasArgs struct {
CredentialDurationSeconds pulumi.IntPtrInput
RoleAlias pulumi.StringPtrInput
RoleArn pulumi.StringInput
Tags aws.TagArrayInput
}
func (RoleAliasArgs) ElementType() reflect.Type {
return reflect.TypeOf((*roleAliasArgs)(nil)).Elem()
}
type RoleAliasInput interface {
pulumi.Input
ToRoleAliasOutput() RoleAliasOutput
ToRoleAliasOutputWithContext(ctx context.Context) RoleAliasOutput
}
func (*RoleAlias) ElementType() reflect.Type {
return reflect.TypeOf((**RoleAlias)(nil)).Elem()
}
func (i *RoleAlias) ToRoleAliasOutput() RoleAliasOutput {
return i.ToRoleAliasOutputWithContext(context.Background())
}
func (i *RoleAlias) ToRoleAliasOutputWithContext(ctx context.Context) RoleAliasOutput {
return pulumi.ToOutputWithContext(ctx, i).(RoleAliasOutput)
}
type RoleAliasOutput struct{ *pulumi.OutputState }
func (RoleAliasOutput) ElementType() reflect.Type {
return reflect.TypeOf((**RoleAlias)(nil)).Elem()
}
func (o RoleAliasOutput) ToRoleAliasOutput() RoleAliasOutput {
return o
}
func (o RoleAliasOutput) ToRoleAliasOutputWithContext(ctx context.Context) RoleAliasOutput {
return o
}
func (o RoleAliasOutput) CredentialDurationSeconds() pulumi.IntPtrOutput {
return o.ApplyT(func(v *RoleAlias) pulumi.IntPtrOutput { return v.CredentialDurationSeconds }).(pulumi.IntPtrOutput)
}
func (o RoleAliasOutput) RoleAlias() pulumi.StringPtrOutput {
return o.ApplyT(func(v *RoleAlias) pulumi.StringPtrOutput { return v.RoleAlias }).(pulumi.StringPtrOutput)
}
func (o RoleAliasOutput) RoleAliasArn() pulumi.StringOutput {
return o.ApplyT(func(v *RoleAlias) pulumi.StringOutput { return v.RoleAliasArn }).(pulumi.StringOutput)
}
func (o RoleAliasOutput) RoleArn() pulumi.StringOutput {
return o.ApplyT(func(v *RoleAlias) pulumi.StringOutput { return v.RoleArn }).(pulumi.StringOutput)
}
func (o RoleAliasOutput) Tags() aws.TagArrayOutput {
return o.ApplyT(func(v *RoleAlias) aws.TagArrayOutput { return v.Tags }).(aws.TagArrayOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*RoleAliasInput)(nil)).Elem(), &RoleAlias{})
pulumi.RegisterOutputType(RoleAliasOutput{})
}