github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/dms/getCertificate.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package dms 5 6 import ( 7 "context" 8 "reflect" 9 10 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // Data source for managing an AWS DMS (Database Migration) Certificate. 15 // 16 // ## Example Usage 17 // 18 // ### Basic Usage 19 // 20 // <!--Start PulumiCodeChooser --> 21 // ```go 22 // package main 23 // 24 // import ( 25 // 26 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/dms" 27 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 28 // 29 // ) 30 // 31 // func main() { 32 // pulumi.Run(func(ctx *pulumi.Context) error { 33 // _, err := dms.LookupCertificate(ctx, &dms.LookupCertificateArgs{ 34 // CertificateId: test.CertificateId, 35 // }, nil) 36 // if err != nil { 37 // return err 38 // } 39 // return nil 40 // }) 41 // } 42 // 43 // ``` 44 // <!--End PulumiCodeChooser --> 45 func LookupCertificate(ctx *pulumi.Context, args *LookupCertificateArgs, opts ...pulumi.InvokeOption) (*LookupCertificateResult, error) { 46 opts = internal.PkgInvokeDefaultOpts(opts) 47 var rv LookupCertificateResult 48 err := ctx.Invoke("aws:dms/getCertificate:getCertificate", args, &rv, opts...) 49 if err != nil { 50 return nil, err 51 } 52 return &rv, nil 53 } 54 55 // A collection of arguments for invoking getCertificate. 56 type LookupCertificateArgs struct { 57 // A customer-assigned name for the certificate. Identifiers must begin with a letter and must contain only ASCII letters, digits, and hyphens. They can't end with a hyphen or contain two consecutive hyphens. 58 CertificateId string `pulumi:"certificateId"` 59 Tags map[string]string `pulumi:"tags"` 60 } 61 62 // A collection of values returned by getCertificate. 63 type LookupCertificateResult struct { 64 // The Amazon Resource Name (ARN) for the certificate. 65 CertificateArn string `pulumi:"certificateArn"` 66 // The date that the certificate was created. 67 CertificateCreationDate string `pulumi:"certificateCreationDate"` 68 CertificateId string `pulumi:"certificateId"` 69 // The owner of the certificate. 70 CertificateOwner string `pulumi:"certificateOwner"` 71 // The contents of a .pem file, which contains an X.509 certificate. 72 CertificatePem string `pulumi:"certificatePem"` 73 // The owner of the certificate. 74 CertificateWallet string `pulumi:"certificateWallet"` 75 // The provider-assigned unique ID for this managed resource. 76 Id string `pulumi:"id"` 77 // The key length of the cryptographic algorithm being used. 78 KeyLength int `pulumi:"keyLength"` 79 // The algorithm for the certificate. 80 SigningAlgorithm string `pulumi:"signingAlgorithm"` 81 Tags map[string]string `pulumi:"tags"` 82 // The beginning date that the certificate is valid. 83 ValidFromDate string `pulumi:"validFromDate"` 84 // The final date that the certificate is valid. 85 ValidToDate string `pulumi:"validToDate"` 86 } 87 88 func LookupCertificateOutput(ctx *pulumi.Context, args LookupCertificateOutputArgs, opts ...pulumi.InvokeOption) LookupCertificateResultOutput { 89 return pulumi.ToOutputWithContext(context.Background(), args). 90 ApplyT(func(v interface{}) (LookupCertificateResult, error) { 91 args := v.(LookupCertificateArgs) 92 r, err := LookupCertificate(ctx, &args, opts...) 93 var s LookupCertificateResult 94 if r != nil { 95 s = *r 96 } 97 return s, err 98 }).(LookupCertificateResultOutput) 99 } 100 101 // A collection of arguments for invoking getCertificate. 102 type LookupCertificateOutputArgs struct { 103 // A customer-assigned name for the certificate. Identifiers must begin with a letter and must contain only ASCII letters, digits, and hyphens. They can't end with a hyphen or contain two consecutive hyphens. 104 CertificateId pulumi.StringInput `pulumi:"certificateId"` 105 Tags pulumi.StringMapInput `pulumi:"tags"` 106 } 107 108 func (LookupCertificateOutputArgs) ElementType() reflect.Type { 109 return reflect.TypeOf((*LookupCertificateArgs)(nil)).Elem() 110 } 111 112 // A collection of values returned by getCertificate. 113 type LookupCertificateResultOutput struct{ *pulumi.OutputState } 114 115 func (LookupCertificateResultOutput) ElementType() reflect.Type { 116 return reflect.TypeOf((*LookupCertificateResult)(nil)).Elem() 117 } 118 119 func (o LookupCertificateResultOutput) ToLookupCertificateResultOutput() LookupCertificateResultOutput { 120 return o 121 } 122 123 func (o LookupCertificateResultOutput) ToLookupCertificateResultOutputWithContext(ctx context.Context) LookupCertificateResultOutput { 124 return o 125 } 126 127 // The Amazon Resource Name (ARN) for the certificate. 128 func (o LookupCertificateResultOutput) CertificateArn() pulumi.StringOutput { 129 return o.ApplyT(func(v LookupCertificateResult) string { return v.CertificateArn }).(pulumi.StringOutput) 130 } 131 132 // The date that the certificate was created. 133 func (o LookupCertificateResultOutput) CertificateCreationDate() pulumi.StringOutput { 134 return o.ApplyT(func(v LookupCertificateResult) string { return v.CertificateCreationDate }).(pulumi.StringOutput) 135 } 136 137 func (o LookupCertificateResultOutput) CertificateId() pulumi.StringOutput { 138 return o.ApplyT(func(v LookupCertificateResult) string { return v.CertificateId }).(pulumi.StringOutput) 139 } 140 141 // The owner of the certificate. 142 func (o LookupCertificateResultOutput) CertificateOwner() pulumi.StringOutput { 143 return o.ApplyT(func(v LookupCertificateResult) string { return v.CertificateOwner }).(pulumi.StringOutput) 144 } 145 146 // The contents of a .pem file, which contains an X.509 certificate. 147 func (o LookupCertificateResultOutput) CertificatePem() pulumi.StringOutput { 148 return o.ApplyT(func(v LookupCertificateResult) string { return v.CertificatePem }).(pulumi.StringOutput) 149 } 150 151 // The owner of the certificate. 152 func (o LookupCertificateResultOutput) CertificateWallet() pulumi.StringOutput { 153 return o.ApplyT(func(v LookupCertificateResult) string { return v.CertificateWallet }).(pulumi.StringOutput) 154 } 155 156 // The provider-assigned unique ID for this managed resource. 157 func (o LookupCertificateResultOutput) Id() pulumi.StringOutput { 158 return o.ApplyT(func(v LookupCertificateResult) string { return v.Id }).(pulumi.StringOutput) 159 } 160 161 // The key length of the cryptographic algorithm being used. 162 func (o LookupCertificateResultOutput) KeyLength() pulumi.IntOutput { 163 return o.ApplyT(func(v LookupCertificateResult) int { return v.KeyLength }).(pulumi.IntOutput) 164 } 165 166 // The algorithm for the certificate. 167 func (o LookupCertificateResultOutput) SigningAlgorithm() pulumi.StringOutput { 168 return o.ApplyT(func(v LookupCertificateResult) string { return v.SigningAlgorithm }).(pulumi.StringOutput) 169 } 170 171 func (o LookupCertificateResultOutput) Tags() pulumi.StringMapOutput { 172 return o.ApplyT(func(v LookupCertificateResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) 173 } 174 175 // The beginning date that the certificate is valid. 176 func (o LookupCertificateResultOutput) ValidFromDate() pulumi.StringOutput { 177 return o.ApplyT(func(v LookupCertificateResult) string { return v.ValidFromDate }).(pulumi.StringOutput) 178 } 179 180 // The final date that the certificate is valid. 181 func (o LookupCertificateResultOutput) ValidToDate() pulumi.StringOutput { 182 return o.ApplyT(func(v LookupCertificateResult) string { return v.ValidToDate }).(pulumi.StringOutput) 183 } 184 185 func init() { 186 pulumi.RegisterOutputType(LookupCertificateResultOutput{}) 187 }