/
getOrganizationReplay.go
105 lines (87 loc) · 4.69 KB
/
getOrganizationReplay.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
// 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 v1alpha
import (
"context"
"reflect"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Gets the specified Replay. Each `Replay` is available for at least 7 days.
func LookupOrganizationReplay(ctx *pulumi.Context, args *LookupOrganizationReplayArgs, opts ...pulumi.InvokeOption) (*LookupOrganizationReplayResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupOrganizationReplayResult
err := ctx.Invoke("google-native:policysimulator/v1alpha:getOrganizationReplay", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupOrganizationReplayArgs struct {
Location string `pulumi:"location"`
OrganizationId string `pulumi:"organizationId"`
ReplayId string `pulumi:"replayId"`
}
type LookupOrganizationReplayResult struct {
// The configuration used for the `Replay`.
Config GoogleCloudPolicysimulatorV1alphaReplayConfigResponse `pulumi:"config"`
// The resource name of the `Replay`, which has the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`
Name string `pulumi:"name"`
// Summary statistics about the replayed log entries.
ResultsSummary GoogleCloudPolicysimulatorV1alphaReplayResultsSummaryResponse `pulumi:"resultsSummary"`
// The current state of the `Replay`.
State string `pulumi:"state"`
}
func LookupOrganizationReplayOutput(ctx *pulumi.Context, args LookupOrganizationReplayOutputArgs, opts ...pulumi.InvokeOption) LookupOrganizationReplayResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupOrganizationReplayResult, error) {
args := v.(LookupOrganizationReplayArgs)
r, err := LookupOrganizationReplay(ctx, &args, opts...)
var s LookupOrganizationReplayResult
if r != nil {
s = *r
}
return s, err
}).(LookupOrganizationReplayResultOutput)
}
type LookupOrganizationReplayOutputArgs struct {
Location pulumi.StringInput `pulumi:"location"`
OrganizationId pulumi.StringInput `pulumi:"organizationId"`
ReplayId pulumi.StringInput `pulumi:"replayId"`
}
func (LookupOrganizationReplayOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupOrganizationReplayArgs)(nil)).Elem()
}
type LookupOrganizationReplayResultOutput struct{ *pulumi.OutputState }
func (LookupOrganizationReplayResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupOrganizationReplayResult)(nil)).Elem()
}
func (o LookupOrganizationReplayResultOutput) ToLookupOrganizationReplayResultOutput() LookupOrganizationReplayResultOutput {
return o
}
func (o LookupOrganizationReplayResultOutput) ToLookupOrganizationReplayResultOutputWithContext(ctx context.Context) LookupOrganizationReplayResultOutput {
return o
}
// The configuration used for the `Replay`.
func (o LookupOrganizationReplayResultOutput) Config() GoogleCloudPolicysimulatorV1alphaReplayConfigResponseOutput {
return o.ApplyT(func(v LookupOrganizationReplayResult) GoogleCloudPolicysimulatorV1alphaReplayConfigResponse {
return v.Config
}).(GoogleCloudPolicysimulatorV1alphaReplayConfigResponseOutput)
}
// The resource name of the `Replay`, which has the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`
func (o LookupOrganizationReplayResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupOrganizationReplayResult) string { return v.Name }).(pulumi.StringOutput)
}
// Summary statistics about the replayed log entries.
func (o LookupOrganizationReplayResultOutput) ResultsSummary() GoogleCloudPolicysimulatorV1alphaReplayResultsSummaryResponseOutput {
return o.ApplyT(func(v LookupOrganizationReplayResult) GoogleCloudPolicysimulatorV1alphaReplayResultsSummaryResponse {
return v.ResultsSummary
}).(GoogleCloudPolicysimulatorV1alphaReplayResultsSummaryResponseOutput)
}
// The current state of the `Replay`.
func (o LookupOrganizationReplayResultOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v LookupOrganizationReplayResult) string { return v.State }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupOrganizationReplayResultOutput{})
}