/
getAuthPolicy.go
81 lines (65 loc) · 2.84 KB
/
getAuthPolicy.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
// 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 vpclattice
import (
"context"
"reflect"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Creates or updates the auth policy.
func LookupAuthPolicy(ctx *pulumi.Context, args *LookupAuthPolicyArgs, opts ...pulumi.InvokeOption) (*LookupAuthPolicyResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupAuthPolicyResult
err := ctx.Invoke("aws-native:vpclattice:getAuthPolicy", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupAuthPolicyArgs struct {
ResourceIdentifier string `pulumi:"resourceIdentifier"`
}
type LookupAuthPolicyResult struct {
// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::VpcLattice::AuthPolicy` for more information about the expected schema for this property.
Policy interface{} `pulumi:"policy"`
State *AuthPolicyStateEnum `pulumi:"state"`
}
func LookupAuthPolicyOutput(ctx *pulumi.Context, args LookupAuthPolicyOutputArgs, opts ...pulumi.InvokeOption) LookupAuthPolicyResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupAuthPolicyResult, error) {
args := v.(LookupAuthPolicyArgs)
r, err := LookupAuthPolicy(ctx, &args, opts...)
var s LookupAuthPolicyResult
if r != nil {
s = *r
}
return s, err
}).(LookupAuthPolicyResultOutput)
}
type LookupAuthPolicyOutputArgs struct {
ResourceIdentifier pulumi.StringInput `pulumi:"resourceIdentifier"`
}
func (LookupAuthPolicyOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAuthPolicyArgs)(nil)).Elem()
}
type LookupAuthPolicyResultOutput struct{ *pulumi.OutputState }
func (LookupAuthPolicyResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAuthPolicyResult)(nil)).Elem()
}
func (o LookupAuthPolicyResultOutput) ToLookupAuthPolicyResultOutput() LookupAuthPolicyResultOutput {
return o
}
func (o LookupAuthPolicyResultOutput) ToLookupAuthPolicyResultOutputWithContext(ctx context.Context) LookupAuthPolicyResultOutput {
return o
}
// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::VpcLattice::AuthPolicy` for more information about the expected schema for this property.
func (o LookupAuthPolicyResultOutput) Policy() pulumi.AnyOutput {
return o.ApplyT(func(v LookupAuthPolicyResult) interface{} { return v.Policy }).(pulumi.AnyOutput)
}
func (o LookupAuthPolicyResultOutput) State() AuthPolicyStateEnumPtrOutput {
return o.ApplyT(func(v LookupAuthPolicyResult) *AuthPolicyStateEnum { return v.State }).(AuthPolicyStateEnumPtrOutput)
}
func init() {
pulumi.RegisterOutputType(LookupAuthPolicyResultOutput{})
}