/
getSecurityAction.go
152 lines (127 loc) · 7.11 KB
/
getSecurityAction.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
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package v1
import (
"context"
"reflect"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Get a SecurityAction by name.
func LookupSecurityAction(ctx *pulumi.Context, args *LookupSecurityActionArgs, opts ...pulumi.InvokeOption) (*LookupSecurityActionResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupSecurityActionResult
err := ctx.Invoke("google-native:apigee/v1:getSecurityAction", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupSecurityActionArgs struct {
EnvironmentId string `pulumi:"environmentId"`
OrganizationId string `pulumi:"organizationId"`
SecurityActionId string `pulumi:"securityActionId"`
}
type LookupSecurityActionResult struct {
// Allow a request through if it matches this SecurityAction.
Allow GoogleCloudApigeeV1SecurityActionAllowResponse `pulumi:"allow"`
// A valid SecurityAction must contain at least one condition.
ConditionConfig GoogleCloudApigeeV1SecurityActionConditionConfigResponse `pulumi:"conditionConfig"`
// The create time for this SecurityAction.
CreateTime string `pulumi:"createTime"`
// Deny a request through if it matches this SecurityAction.
Deny GoogleCloudApigeeV1SecurityActionDenyResponse `pulumi:"deny"`
// Optional. An optional user provided description of the SecurityAction.
Description string `pulumi:"description"`
// The expiration for this SecurityAction.
ExpireTime string `pulumi:"expireTime"`
// Flag a request through if it matches this SecurityAction.
Flag GoogleCloudApigeeV1SecurityActionFlagResponse `pulumi:"flag"`
// Immutable. This field is ignored during creation as per AIP-133. Please set the `security_action_id` field in the CreateSecurityActionRequest when creating a new SecurityAction. Format: organizations/{org}/environments/{env}/securityActions/{security_action}
Name string `pulumi:"name"`
// Only an ENABLED SecurityAction is enforced. An ENABLED SecurityAction past its expiration time will not be enforced.
State string `pulumi:"state"`
// Input only. The TTL for this SecurityAction.
Ttl string `pulumi:"ttl"`
// The update time for this SecurityAction. This reflects when this SecurityAction changed states.
UpdateTime string `pulumi:"updateTime"`
}
func LookupSecurityActionOutput(ctx *pulumi.Context, args LookupSecurityActionOutputArgs, opts ...pulumi.InvokeOption) LookupSecurityActionResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupSecurityActionResult, error) {
args := v.(LookupSecurityActionArgs)
r, err := LookupSecurityAction(ctx, &args, opts...)
var s LookupSecurityActionResult
if r != nil {
s = *r
}
return s, err
}).(LookupSecurityActionResultOutput)
}
type LookupSecurityActionOutputArgs struct {
EnvironmentId pulumi.StringInput `pulumi:"environmentId"`
OrganizationId pulumi.StringInput `pulumi:"organizationId"`
SecurityActionId pulumi.StringInput `pulumi:"securityActionId"`
}
func (LookupSecurityActionOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupSecurityActionArgs)(nil)).Elem()
}
type LookupSecurityActionResultOutput struct{ *pulumi.OutputState }
func (LookupSecurityActionResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupSecurityActionResult)(nil)).Elem()
}
func (o LookupSecurityActionResultOutput) ToLookupSecurityActionResultOutput() LookupSecurityActionResultOutput {
return o
}
func (o LookupSecurityActionResultOutput) ToLookupSecurityActionResultOutputWithContext(ctx context.Context) LookupSecurityActionResultOutput {
return o
}
// Allow a request through if it matches this SecurityAction.
func (o LookupSecurityActionResultOutput) Allow() GoogleCloudApigeeV1SecurityActionAllowResponseOutput {
return o.ApplyT(func(v LookupSecurityActionResult) GoogleCloudApigeeV1SecurityActionAllowResponse { return v.Allow }).(GoogleCloudApigeeV1SecurityActionAllowResponseOutput)
}
// A valid SecurityAction must contain at least one condition.
func (o LookupSecurityActionResultOutput) ConditionConfig() GoogleCloudApigeeV1SecurityActionConditionConfigResponseOutput {
return o.ApplyT(func(v LookupSecurityActionResult) GoogleCloudApigeeV1SecurityActionConditionConfigResponse {
return v.ConditionConfig
}).(GoogleCloudApigeeV1SecurityActionConditionConfigResponseOutput)
}
// The create time for this SecurityAction.
func (o LookupSecurityActionResultOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupSecurityActionResult) string { return v.CreateTime }).(pulumi.StringOutput)
}
// Deny a request through if it matches this SecurityAction.
func (o LookupSecurityActionResultOutput) Deny() GoogleCloudApigeeV1SecurityActionDenyResponseOutput {
return o.ApplyT(func(v LookupSecurityActionResult) GoogleCloudApigeeV1SecurityActionDenyResponse { return v.Deny }).(GoogleCloudApigeeV1SecurityActionDenyResponseOutput)
}
// Optional. An optional user provided description of the SecurityAction.
func (o LookupSecurityActionResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupSecurityActionResult) string { return v.Description }).(pulumi.StringOutput)
}
// The expiration for this SecurityAction.
func (o LookupSecurityActionResultOutput) ExpireTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupSecurityActionResult) string { return v.ExpireTime }).(pulumi.StringOutput)
}
// Flag a request through if it matches this SecurityAction.
func (o LookupSecurityActionResultOutput) Flag() GoogleCloudApigeeV1SecurityActionFlagResponseOutput {
return o.ApplyT(func(v LookupSecurityActionResult) GoogleCloudApigeeV1SecurityActionFlagResponse { return v.Flag }).(GoogleCloudApigeeV1SecurityActionFlagResponseOutput)
}
// Immutable. This field is ignored during creation as per AIP-133. Please set the `security_action_id` field in the CreateSecurityActionRequest when creating a new SecurityAction. Format: organizations/{org}/environments/{env}/securityActions/{security_action}
func (o LookupSecurityActionResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupSecurityActionResult) string { return v.Name }).(pulumi.StringOutput)
}
// Only an ENABLED SecurityAction is enforced. An ENABLED SecurityAction past its expiration time will not be enforced.
func (o LookupSecurityActionResultOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v LookupSecurityActionResult) string { return v.State }).(pulumi.StringOutput)
}
// Input only. The TTL for this SecurityAction.
func (o LookupSecurityActionResultOutput) Ttl() pulumi.StringOutput {
return o.ApplyT(func(v LookupSecurityActionResult) string { return v.Ttl }).(pulumi.StringOutput)
}
// The update time for this SecurityAction. This reflects when this SecurityAction changed states.
func (o LookupSecurityActionResultOutput) UpdateTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupSecurityActionResult) string { return v.UpdateTime }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupSecurityActionResultOutput{})
}