/
getX509AuthenticationDatabaseUser.go
116 lines (97 loc) · 5.23 KB
/
getX509AuthenticationDatabaseUser.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
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package mongodbatlas
import (
"context"
"reflect"
"github.com/pulumi/pulumi-mongodbatlas/sdk/v3/go/mongodbatlas/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// `X509AuthenticationDatabaseUser` describe a X509 Authentication Database User. This represents a X509 Authentication Database User.
//
// > **NOTE:** Groups and projects are synonymous terms. You may find groupId in the official documentation.
//
// ## Example Usage
//
// ### S
func LookupX509AuthenticationDatabaseUser(ctx *pulumi.Context, args *LookupX509AuthenticationDatabaseUserArgs, opts ...pulumi.InvokeOption) (*LookupX509AuthenticationDatabaseUserResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupX509AuthenticationDatabaseUserResult
err := ctx.Invoke("mongodbatlas:index/getX509AuthenticationDatabaseUser:getX509AuthenticationDatabaseUser", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getX509AuthenticationDatabaseUser.
type LookupX509AuthenticationDatabaseUserArgs struct {
// Identifier for the Atlas project associated with the X.509 configuration.
ProjectId string `pulumi:"projectId"`
// Username of the database user to create a certificate for.
Username *string `pulumi:"username"`
}
// A collection of values returned by getX509AuthenticationDatabaseUser.
type LookupX509AuthenticationDatabaseUserResult struct {
// Array of objects where each details one unexpired database user certificate.
Certificates []GetX509AuthenticationDatabaseUserCertificate `pulumi:"certificates"`
CustomerX509Cas string `pulumi:"customerX509Cas"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
ProjectId string `pulumi:"projectId"`
Username *string `pulumi:"username"`
}
func LookupX509AuthenticationDatabaseUserOutput(ctx *pulumi.Context, args LookupX509AuthenticationDatabaseUserOutputArgs, opts ...pulumi.InvokeOption) LookupX509AuthenticationDatabaseUserResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupX509AuthenticationDatabaseUserResult, error) {
args := v.(LookupX509AuthenticationDatabaseUserArgs)
r, err := LookupX509AuthenticationDatabaseUser(ctx, &args, opts...)
var s LookupX509AuthenticationDatabaseUserResult
if r != nil {
s = *r
}
return s, err
}).(LookupX509AuthenticationDatabaseUserResultOutput)
}
// A collection of arguments for invoking getX509AuthenticationDatabaseUser.
type LookupX509AuthenticationDatabaseUserOutputArgs struct {
// Identifier for the Atlas project associated with the X.509 configuration.
ProjectId pulumi.StringInput `pulumi:"projectId"`
// Username of the database user to create a certificate for.
Username pulumi.StringPtrInput `pulumi:"username"`
}
func (LookupX509AuthenticationDatabaseUserOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupX509AuthenticationDatabaseUserArgs)(nil)).Elem()
}
// A collection of values returned by getX509AuthenticationDatabaseUser.
type LookupX509AuthenticationDatabaseUserResultOutput struct{ *pulumi.OutputState }
func (LookupX509AuthenticationDatabaseUserResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupX509AuthenticationDatabaseUserResult)(nil)).Elem()
}
func (o LookupX509AuthenticationDatabaseUserResultOutput) ToLookupX509AuthenticationDatabaseUserResultOutput() LookupX509AuthenticationDatabaseUserResultOutput {
return o
}
func (o LookupX509AuthenticationDatabaseUserResultOutput) ToLookupX509AuthenticationDatabaseUserResultOutputWithContext(ctx context.Context) LookupX509AuthenticationDatabaseUserResultOutput {
return o
}
// Array of objects where each details one unexpired database user certificate.
func (o LookupX509AuthenticationDatabaseUserResultOutput) Certificates() GetX509AuthenticationDatabaseUserCertificateArrayOutput {
return o.ApplyT(func(v LookupX509AuthenticationDatabaseUserResult) []GetX509AuthenticationDatabaseUserCertificate {
return v.Certificates
}).(GetX509AuthenticationDatabaseUserCertificateArrayOutput)
}
func (o LookupX509AuthenticationDatabaseUserResultOutput) CustomerX509Cas() pulumi.StringOutput {
return o.ApplyT(func(v LookupX509AuthenticationDatabaseUserResult) string { return v.CustomerX509Cas }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupX509AuthenticationDatabaseUserResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupX509AuthenticationDatabaseUserResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupX509AuthenticationDatabaseUserResultOutput) ProjectId() pulumi.StringOutput {
return o.ApplyT(func(v LookupX509AuthenticationDatabaseUserResult) string { return v.ProjectId }).(pulumi.StringOutput)
}
func (o LookupX509AuthenticationDatabaseUserResultOutput) Username() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupX509AuthenticationDatabaseUserResult) *string { return v.Username }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(LookupX509AuthenticationDatabaseUserResultOutput{})
}