/
getServer.go
99 lines (79 loc) · 3.38 KB
/
getServer.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
// 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 opsworkscm
import (
"context"
"reflect"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Resource Type definition for AWS::OpsWorksCM::Server
func LookupServer(ctx *pulumi.Context, args *LookupServerArgs, opts ...pulumi.InvokeOption) (*LookupServerResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupServerResult
err := ctx.Invoke("aws-native:opsworkscm:getServer", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupServerArgs struct {
ServerName string `pulumi:"serverName"`
}
type LookupServerResult struct {
Arn *string `pulumi:"arn"`
BackupRetentionCount *int `pulumi:"backupRetentionCount"`
DisableAutomatedBackup *bool `pulumi:"disableAutomatedBackup"`
Endpoint *string `pulumi:"endpoint"`
PreferredBackupWindow *string `pulumi:"preferredBackupWindow"`
PreferredMaintenanceWindow *string `pulumi:"preferredMaintenanceWindow"`
}
func LookupServerOutput(ctx *pulumi.Context, args LookupServerOutputArgs, opts ...pulumi.InvokeOption) LookupServerResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupServerResult, error) {
args := v.(LookupServerArgs)
r, err := LookupServer(ctx, &args, opts...)
var s LookupServerResult
if r != nil {
s = *r
}
return s, err
}).(LookupServerResultOutput)
}
type LookupServerOutputArgs struct {
ServerName pulumi.StringInput `pulumi:"serverName"`
}
func (LookupServerOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupServerArgs)(nil)).Elem()
}
type LookupServerResultOutput struct{ *pulumi.OutputState }
func (LookupServerResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupServerResult)(nil)).Elem()
}
func (o LookupServerResultOutput) ToLookupServerResultOutput() LookupServerResultOutput {
return o
}
func (o LookupServerResultOutput) ToLookupServerResultOutputWithContext(ctx context.Context) LookupServerResultOutput {
return o
}
func (o LookupServerResultOutput) Arn() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupServerResult) *string { return v.Arn }).(pulumi.StringPtrOutput)
}
func (o LookupServerResultOutput) BackupRetentionCount() pulumi.IntPtrOutput {
return o.ApplyT(func(v LookupServerResult) *int { return v.BackupRetentionCount }).(pulumi.IntPtrOutput)
}
func (o LookupServerResultOutput) DisableAutomatedBackup() pulumi.BoolPtrOutput {
return o.ApplyT(func(v LookupServerResult) *bool { return v.DisableAutomatedBackup }).(pulumi.BoolPtrOutput)
}
func (o LookupServerResultOutput) Endpoint() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupServerResult) *string { return v.Endpoint }).(pulumi.StringPtrOutput)
}
func (o LookupServerResultOutput) PreferredBackupWindow() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupServerResult) *string { return v.PreferredBackupWindow }).(pulumi.StringPtrOutput)
}
func (o LookupServerResultOutput) PreferredMaintenanceWindow() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupServerResult) *string { return v.PreferredMaintenanceWindow }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(LookupServerResultOutput{})
}