/
multiRegionAccessPoint.go
165 lines (136 loc) · 8.52 KB
/
multiRegionAccessPoint.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
157
158
159
160
161
162
163
164
165
// 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 s3
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// AWS::S3::MultiRegionAccessPoint is an Amazon S3 resource type that dynamically routes S3 requests to easily satisfy geographic compliance requirements based on customer-defined routing policies.
type MultiRegionAccessPoint struct {
pulumi.CustomResourceState
// The alias is a unique identifier to, and is part of the public DNS name for this Multi Region Access Point
Alias pulumi.StringOutput `pulumi:"alias"`
// The timestamp of the when the Multi Region Access Point is created
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// The name you want to assign to this Multi Region Access Point.
Name pulumi.StringPtrOutput `pulumi:"name"`
// The PublicAccessBlock configuration that you want to apply to this Multi Region Access Point. You can enable the configuration options in any combination. For more information about when Amazon S3 considers a bucket or object public, see https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status 'The Meaning of Public' in the Amazon Simple Storage Service Developer Guide.
PublicAccessBlockConfiguration MultiRegionAccessPointPublicAccessBlockConfigurationPtrOutput `pulumi:"publicAccessBlockConfiguration"`
// The list of buckets that you want to associate this Multi Region Access Point with.
Regions MultiRegionAccessPointRegionArrayOutput `pulumi:"regions"`
}
// NewMultiRegionAccessPoint registers a new resource with the given unique name, arguments, and options.
func NewMultiRegionAccessPoint(ctx *pulumi.Context,
name string, args *MultiRegionAccessPointArgs, opts ...pulumi.ResourceOption) (*MultiRegionAccessPoint, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Regions == nil {
return nil, errors.New("invalid value for required argument 'Regions'")
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"name",
"publicAccessBlockConfiguration",
"regions[*]",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource MultiRegionAccessPoint
err := ctx.RegisterResource("aws-native:s3:MultiRegionAccessPoint", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetMultiRegionAccessPoint gets an existing MultiRegionAccessPoint 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 GetMultiRegionAccessPoint(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *MultiRegionAccessPointState, opts ...pulumi.ResourceOption) (*MultiRegionAccessPoint, error) {
var resource MultiRegionAccessPoint
err := ctx.ReadResource("aws-native:s3:MultiRegionAccessPoint", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering MultiRegionAccessPoint resources.
type multiRegionAccessPointState struct {
}
type MultiRegionAccessPointState struct {
}
func (MultiRegionAccessPointState) ElementType() reflect.Type {
return reflect.TypeOf((*multiRegionAccessPointState)(nil)).Elem()
}
type multiRegionAccessPointArgs struct {
// The name you want to assign to this Multi Region Access Point.
Name *string `pulumi:"name"`
// The PublicAccessBlock configuration that you want to apply to this Multi Region Access Point. You can enable the configuration options in any combination. For more information about when Amazon S3 considers a bucket or object public, see https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status 'The Meaning of Public' in the Amazon Simple Storage Service Developer Guide.
PublicAccessBlockConfiguration *MultiRegionAccessPointPublicAccessBlockConfiguration `pulumi:"publicAccessBlockConfiguration"`
// The list of buckets that you want to associate this Multi Region Access Point with.
Regions []MultiRegionAccessPointRegion `pulumi:"regions"`
}
// The set of arguments for constructing a MultiRegionAccessPoint resource.
type MultiRegionAccessPointArgs struct {
// The name you want to assign to this Multi Region Access Point.
Name pulumi.StringPtrInput
// The PublicAccessBlock configuration that you want to apply to this Multi Region Access Point. You can enable the configuration options in any combination. For more information about when Amazon S3 considers a bucket or object public, see https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status 'The Meaning of Public' in the Amazon Simple Storage Service Developer Guide.
PublicAccessBlockConfiguration MultiRegionAccessPointPublicAccessBlockConfigurationPtrInput
// The list of buckets that you want to associate this Multi Region Access Point with.
Regions MultiRegionAccessPointRegionArrayInput
}
func (MultiRegionAccessPointArgs) ElementType() reflect.Type {
return reflect.TypeOf((*multiRegionAccessPointArgs)(nil)).Elem()
}
type MultiRegionAccessPointInput interface {
pulumi.Input
ToMultiRegionAccessPointOutput() MultiRegionAccessPointOutput
ToMultiRegionAccessPointOutputWithContext(ctx context.Context) MultiRegionAccessPointOutput
}
func (*MultiRegionAccessPoint) ElementType() reflect.Type {
return reflect.TypeOf((**MultiRegionAccessPoint)(nil)).Elem()
}
func (i *MultiRegionAccessPoint) ToMultiRegionAccessPointOutput() MultiRegionAccessPointOutput {
return i.ToMultiRegionAccessPointOutputWithContext(context.Background())
}
func (i *MultiRegionAccessPoint) ToMultiRegionAccessPointOutputWithContext(ctx context.Context) MultiRegionAccessPointOutput {
return pulumi.ToOutputWithContext(ctx, i).(MultiRegionAccessPointOutput)
}
type MultiRegionAccessPointOutput struct{ *pulumi.OutputState }
func (MultiRegionAccessPointOutput) ElementType() reflect.Type {
return reflect.TypeOf((**MultiRegionAccessPoint)(nil)).Elem()
}
func (o MultiRegionAccessPointOutput) ToMultiRegionAccessPointOutput() MultiRegionAccessPointOutput {
return o
}
func (o MultiRegionAccessPointOutput) ToMultiRegionAccessPointOutputWithContext(ctx context.Context) MultiRegionAccessPointOutput {
return o
}
// The alias is a unique identifier to, and is part of the public DNS name for this Multi Region Access Point
func (o MultiRegionAccessPointOutput) Alias() pulumi.StringOutput {
return o.ApplyT(func(v *MultiRegionAccessPoint) pulumi.StringOutput { return v.Alias }).(pulumi.StringOutput)
}
// The timestamp of the when the Multi Region Access Point is created
func (o MultiRegionAccessPointOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v *MultiRegionAccessPoint) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput)
}
// The name you want to assign to this Multi Region Access Point.
func (o MultiRegionAccessPointOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MultiRegionAccessPoint) pulumi.StringPtrOutput { return v.Name }).(pulumi.StringPtrOutput)
}
// The PublicAccessBlock configuration that you want to apply to this Multi Region Access Point. You can enable the configuration options in any combination. For more information about when Amazon S3 considers a bucket or object public, see https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status 'The Meaning of Public' in the Amazon Simple Storage Service Developer Guide.
func (o MultiRegionAccessPointOutput) PublicAccessBlockConfiguration() MultiRegionAccessPointPublicAccessBlockConfigurationPtrOutput {
return o.ApplyT(func(v *MultiRegionAccessPoint) MultiRegionAccessPointPublicAccessBlockConfigurationPtrOutput {
return v.PublicAccessBlockConfiguration
}).(MultiRegionAccessPointPublicAccessBlockConfigurationPtrOutput)
}
// The list of buckets that you want to associate this Multi Region Access Point with.
func (o MultiRegionAccessPointOutput) Regions() MultiRegionAccessPointRegionArrayOutput {
return o.ApplyT(func(v *MultiRegionAccessPoint) MultiRegionAccessPointRegionArrayOutput { return v.Regions }).(MultiRegionAccessPointRegionArrayOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*MultiRegionAccessPointInput)(nil)).Elem(), &MultiRegionAccessPoint{})
pulumi.RegisterOutputType(MultiRegionAccessPointOutput{})
}