alicloud.cas.getCertificates
Explore with Pulumi AI
Deprecated:
This resource has been deprecated in favour of getServiceCertificates
DEPRECATED: This datasource has been deprecated from version
1.129.0
. Please use new datasource alicloud_ssl_certificates_service_certificates.
This data source provides a list of CAS Certificates in an Alibaba Cloud account according to the specified filters.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var certs = AliCloud.Cas.GetCertificates.Invoke(new()
{
NameRegex = "^cas",
OutputFile = $"{path.Module}/cas_certificates.json",
});
return new Dictionary<string, object?>
{
["cert"] = certs.Apply(getCertificatesResult => getCertificatesResult.Certificates[0]?.Id),
};
});
package main
import (
"fmt"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cas"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
certs, err := cas.GetCertificates(ctx, &cas.GetCertificatesArgs{
NameRegex: pulumi.StringRef("^cas"),
OutputFile: pulumi.StringRef(fmt.Sprintf("%v/cas_certificates.json", path.Module)),
}, nil)
if err != nil {
return err
}
ctx.Export("cert", certs.Certificates[0].Id)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cas.CasFunctions;
import com.pulumi.alicloud.cas.inputs.GetCertificatesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var certs = CasFunctions.getCertificates(GetCertificatesArgs.builder()
.nameRegex("^cas")
.outputFile(String.format("%s/cas_certificates.json", path.module()))
.build());
ctx.export("cert", certs.applyValue(getCertificatesResult -> getCertificatesResult.certificates()[0].id()));
}
}
import pulumi
import pulumi_alicloud as alicloud
certs = alicloud.cas.get_certificates(name_regex="^cas",
output_file=f"{path['module']}/cas_certificates.json")
pulumi.export("cert", certs.certificates[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const certs = alicloud.cas.getCertificates({
nameRegex: "^cas",
outputFile: `${path.module}/cas_certificates.json`,
});
export const cert = certs.then(certs => certs.certificates?.[0]?.id);
variables:
certs:
fn::invoke:
Function: alicloud:cas:getCertificates
Arguments:
nameRegex: ^cas
outputFile: ${path.module}/cas_certificates.json
outputs:
cert: ${certs.certificates[0].id}
Using getCertificates
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getCertificates(args: GetCertificatesArgs, opts?: InvokeOptions): Promise<GetCertificatesResult>
function getCertificatesOutput(args: GetCertificatesOutputArgs, opts?: InvokeOptions): Output<GetCertificatesResult>
def get_certificates(enable_details: Optional[bool] = None,
ids: Optional[Sequence[str]] = None,
lang: Optional[str] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCertificatesResult
def get_certificates_output(enable_details: Optional[pulumi.Input[bool]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
lang: Optional[pulumi.Input[str]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCertificatesResult]
func GetCertificates(ctx *Context, args *GetCertificatesArgs, opts ...InvokeOption) (*GetCertificatesResult, error)
func GetCertificatesOutput(ctx *Context, args *GetCertificatesOutputArgs, opts ...InvokeOption) GetCertificatesResultOutput
> Note: This function is named GetCertificates
in the Go SDK.
public static class GetCertificates
{
public static Task<GetCertificatesResult> InvokeAsync(GetCertificatesArgs args, InvokeOptions? opts = null)
public static Output<GetCertificatesResult> Invoke(GetCertificatesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCertificatesResult> getCertificates(GetCertificatesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:cas/getCertificates:getCertificates
arguments:
# arguments dictionary
The following arguments are supported:
- Enable
Details bool - Ids List<string>
A list of cert IDs.
- Lang string
- Name
Regex string A regex string to filter results by the certificate name.
- Output
File string File name where to save data source results (after running
pulumi preview
).
- Enable
Details bool - Ids []string
A list of cert IDs.
- Lang string
- Name
Regex string A regex string to filter results by the certificate name.
- Output
File string File name where to save data source results (after running
pulumi preview
).
- enable
Details Boolean - ids List<String>
A list of cert IDs.
- lang String
- name
Regex String A regex string to filter results by the certificate name.
- output
File String File name where to save data source results (after running
pulumi preview
).
- enable
Details boolean - ids string[]
A list of cert IDs.
- lang string
- name
Regex string A regex string to filter results by the certificate name.
- output
File string File name where to save data source results (after running
pulumi preview
).
- enable_
details bool - ids Sequence[str]
A list of cert IDs.
- lang str
- name_
regex str A regex string to filter results by the certificate name.
- output_
file str File name where to save data source results (after running
pulumi preview
).
- enable
Details Boolean - ids List<String>
A list of cert IDs.
- lang String
- name
Regex String A regex string to filter results by the certificate name.
- output
File String File name where to save data source results (after running
pulumi preview
).
getCertificates Result
The following output properties are available:
- Certificates
List<Pulumi.
Ali Cloud. Cas. Outputs. Get Certificates Certificate> A list of apis. Each element contains the following attributes:
- Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
A list of cert IDs.
- Names List<string>
A list of cert names.
- Enable
Details bool - Lang string
- Name
Regex string - Output
File string
- Certificates
[]Get
Certificates Certificate A list of apis. Each element contains the following attributes:
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
A list of cert IDs.
- Names []string
A list of cert names.
- Enable
Details bool - Lang string
- Name
Regex string - Output
File string
- certificates
List<Get
Certificates Certificate> A list of apis. Each element contains the following attributes:
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
A list of cert IDs.
- names List<String>
A list of cert names.
- enable
Details Boolean - lang String
- name
Regex String - output
File String
- certificates
Get
Certificates Certificate[] A list of apis. Each element contains the following attributes:
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
A list of cert IDs.
- names string[]
A list of cert names.
- enable
Details boolean - lang string
- name
Regex string - output
File string
- certificates
Sequence[Get
Certificates Certificate] A list of apis. Each element contains the following attributes:
- id str
The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
A list of cert IDs.
- names Sequence[str]
A list of cert names.
- enable_
details bool - lang str
- name_
regex str - output_
file str
- certificates List<Property Map>
A list of apis. Each element contains the following attributes:
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
A list of cert IDs.
- names List<String>
A list of cert names.
- enable
Details Boolean - lang String
- name
Regex String - output
File String
Supporting Types
GetCertificatesCertificate
- Buy
In boolAliyun The cert is buy from aliyun or not.
- Cert string
- Cert
Id string - Certificate
Name string - City string
The cert's city.
- Common string
The cert's common name.
- Country string
The cert's country.
- End
Date string The cert's not valid after time.
- Expired bool
The cert is expired or not.
- Fingerprint string
- Id string
The cert's id.
- Issuer string
The cert's .
- Key string
- Name string
The cert's name.
Field 'name' has been deprecated from provider version 1.129.0 and it will be removed in the future version. Please use the new attribute 'certificate_name' instead.
- Org
Name string The cert's organization.
- Province string
The cert's province.
- Sans string
The cert's subject alternative name.
- Start
Date string The cert's not valid before time.
- Buy
In boolAliyun The cert is buy from aliyun or not.
- Cert string
- Cert
Id string - Certificate
Name string - City string
The cert's city.
- Common string
The cert's common name.
- Country string
The cert's country.
- End
Date string The cert's not valid after time.
- Expired bool
The cert is expired or not.
- Fingerprint string
- Id string
The cert's id.
- Issuer string
The cert's .
- Key string
- Name string
The cert's name.
Field 'name' has been deprecated from provider version 1.129.0 and it will be removed in the future version. Please use the new attribute 'certificate_name' instead.
- Org
Name string The cert's organization.
- Province string
The cert's province.
- Sans string
The cert's subject alternative name.
- Start
Date string The cert's not valid before time.
- buy
In BooleanAliyun The cert is buy from aliyun or not.
- cert String
- cert
Id String - certificate
Name String - city String
The cert's city.
- common String
The cert's common name.
- country String
The cert's country.
- end
Date String The cert's not valid after time.
- expired Boolean
The cert is expired or not.
- fingerprint String
- id String
The cert's id.
- issuer String
The cert's .
- key String
- name String
The cert's name.
Field 'name' has been deprecated from provider version 1.129.0 and it will be removed in the future version. Please use the new attribute 'certificate_name' instead.
- org
Name String The cert's organization.
- province String
The cert's province.
- sans String
The cert's subject alternative name.
- start
Date String The cert's not valid before time.
- buy
In booleanAliyun The cert is buy from aliyun or not.
- cert string
- cert
Id string - certificate
Name string - city string
The cert's city.
- common string
The cert's common name.
- country string
The cert's country.
- end
Date string The cert's not valid after time.
- expired boolean
The cert is expired or not.
- fingerprint string
- id string
The cert's id.
- issuer string
The cert's .
- key string
- name string
The cert's name.
Field 'name' has been deprecated from provider version 1.129.0 and it will be removed in the future version. Please use the new attribute 'certificate_name' instead.
- org
Name string The cert's organization.
- province string
The cert's province.
- sans string
The cert's subject alternative name.
- start
Date string The cert's not valid before time.
- buy_
in_ boolaliyun The cert is buy from aliyun or not.
- cert str
- cert_
id str - certificate_
name str - city str
The cert's city.
- common str
The cert's common name.
- country str
The cert's country.
- end_
date str The cert's not valid after time.
- expired bool
The cert is expired or not.
- fingerprint str
- id str
The cert's id.
- issuer str
The cert's .
- key str
- name str
The cert's name.
Field 'name' has been deprecated from provider version 1.129.0 and it will be removed in the future version. Please use the new attribute 'certificate_name' instead.
- org_
name str The cert's organization.
- province str
The cert's province.
- sans str
The cert's subject alternative name.
- start_
date str The cert's not valid before time.
- buy
In BooleanAliyun The cert is buy from aliyun or not.
- cert String
- cert
Id String - certificate
Name String - city String
The cert's city.
- common String
The cert's common name.
- country String
The cert's country.
- end
Date String The cert's not valid after time.
- expired Boolean
The cert is expired or not.
- fingerprint String
- id String
The cert's id.
- issuer String
The cert's .
- key String
- name String
The cert's name.
Field 'name' has been deprecated from provider version 1.129.0 and it will be removed in the future version. Please use the new attribute 'certificate_name' instead.
- org
Name String The cert's organization.
- province String
The cert's province.
- sans String
The cert's subject alternative name.
- start
Date String The cert's not valid before time.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.