/
getAccessPointPolicy.go
82 lines (67 loc) · 3.73 KB
/
getAccessPointPolicy.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
// 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 s3objectlambda
import (
"context"
"reflect"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// AWS::S3ObjectLambda::AccessPointPolicy resource is an Amazon S3ObjectLambda policy type that you can use to control permissions for your S3ObjectLambda
func LookupAccessPointPolicy(ctx *pulumi.Context, args *LookupAccessPointPolicyArgs, opts ...pulumi.InvokeOption) (*LookupAccessPointPolicyResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupAccessPointPolicyResult
err := ctx.Invoke("aws-native:s3objectlambda:getAccessPointPolicy", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupAccessPointPolicyArgs struct {
// The name of the Amazon S3 ObjectLambdaAccessPoint to which the policy applies.
ObjectLambdaAccessPoint string `pulumi:"objectLambdaAccessPoint"`
}
type LookupAccessPointPolicyResult struct {
// A policy document containing permissions to add to the specified ObjectLambdaAccessPoint. For more information, see Access Policy Language Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-policy-language-overview.html) in the Amazon Simple Storage Service Developer Guide.
//
// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::S3ObjectLambda::AccessPointPolicy` for more information about the expected schema for this property.
PolicyDocument interface{} `pulumi:"policyDocument"`
}
func LookupAccessPointPolicyOutput(ctx *pulumi.Context, args LookupAccessPointPolicyOutputArgs, opts ...pulumi.InvokeOption) LookupAccessPointPolicyResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupAccessPointPolicyResult, error) {
args := v.(LookupAccessPointPolicyArgs)
r, err := LookupAccessPointPolicy(ctx, &args, opts...)
var s LookupAccessPointPolicyResult
if r != nil {
s = *r
}
return s, err
}).(LookupAccessPointPolicyResultOutput)
}
type LookupAccessPointPolicyOutputArgs struct {
// The name of the Amazon S3 ObjectLambdaAccessPoint to which the policy applies.
ObjectLambdaAccessPoint pulumi.StringInput `pulumi:"objectLambdaAccessPoint"`
}
func (LookupAccessPointPolicyOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAccessPointPolicyArgs)(nil)).Elem()
}
type LookupAccessPointPolicyResultOutput struct{ *pulumi.OutputState }
func (LookupAccessPointPolicyResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAccessPointPolicyResult)(nil)).Elem()
}
func (o LookupAccessPointPolicyResultOutput) ToLookupAccessPointPolicyResultOutput() LookupAccessPointPolicyResultOutput {
return o
}
func (o LookupAccessPointPolicyResultOutput) ToLookupAccessPointPolicyResultOutputWithContext(ctx context.Context) LookupAccessPointPolicyResultOutput {
return o
}
// A policy document containing permissions to add to the specified ObjectLambdaAccessPoint. For more information, see Access Policy Language Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-policy-language-overview.html) in the Amazon Simple Storage Service Developer Guide.
//
// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::S3ObjectLambda::AccessPointPolicy` for more information about the expected schema for this property.
func (o LookupAccessPointPolicyResultOutput) PolicyDocument() pulumi.AnyOutput {
return o.ApplyT(func(v LookupAccessPointPolicyResult) interface{} { return v.PolicyDocument }).(pulumi.AnyOutput)
}
func init() {
pulumi.RegisterOutputType(LookupAccessPointPolicyResultOutput{})
}