alicloud.cas.getServiceCertificates
Explore with Pulumi AI
This data source provides the Ssl Certificates Service Certificates of the current Alibaba Cloud user.
NOTE: Available in v1.129.0+.
Example Usage
Basic 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",
Ids = new[]
{
"Certificate Id",
},
});
return new Dictionary<string, object?>
{
["cert"] = certs.Apply(getCertificatesResult => getCertificatesResult.Certificates[0]?.Id),
};
});
package main
import (
"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"),
Ids: []string{
"Certificate Id",
},
}, 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")
.ids("Certificate Id")
.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",
ids=["Certificate Id"])
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",
ids: ["Certificate Id"],
});
export const cert = certs.then(certs => certs.certificates?.[0]?.id);
variables:
certs:
fn::invoke:
Function: alicloud:cas:getCertificates
Arguments:
nameRegex: ^cas
ids:
- Certificate Id
outputs:
cert: ${certs.certificates[0].id}
Using getServiceCertificates
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 getServiceCertificates(args: GetServiceCertificatesArgs, opts?: InvokeOptions): Promise<GetServiceCertificatesResult>
function getServiceCertificatesOutput(args: GetServiceCertificatesOutputArgs, opts?: InvokeOptions): Output<GetServiceCertificatesResult>
def get_service_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) -> GetServiceCertificatesResult
def get_service_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[GetServiceCertificatesResult]
func GetServiceCertificates(ctx *Context, args *GetServiceCertificatesArgs, opts ...InvokeOption) (*GetServiceCertificatesResult, error)
func GetServiceCertificatesOutput(ctx *Context, args *GetServiceCertificatesOutputArgs, opts ...InvokeOption) GetServiceCertificatesResultOutput
> Note: This function is named GetServiceCertificates
in the Go SDK.
public static class GetServiceCertificates
{
public static Task<GetServiceCertificatesResult> InvokeAsync(GetServiceCertificatesArgs args, InvokeOptions? opts = null)
public static Output<GetServiceCertificatesResult> Invoke(GetServiceCertificatesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetServiceCertificatesResult> getServiceCertificates(GetServiceCertificatesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:cas/getServiceCertificates:getServiceCertificates
arguments:
# arguments dictionary
The following arguments are supported:
- Enable
Details bool Default to
false
. Set it totrue
can output more details about resource attributes.- Ids List<string>
A list of Certificate IDs.
- Lang string
The lang.
- Name
Regex string A regex string to filter results by Certificate name.
- Output
File string File name where to save data source results (after running
pulumi preview
).
- Enable
Details bool Default to
false
. Set it totrue
can output more details about resource attributes.- Ids []string
A list of Certificate IDs.
- Lang string
The lang.
- Name
Regex string A regex string to filter results by Certificate name.
- Output
File string File name where to save data source results (after running
pulumi preview
).
- enable
Details Boolean Default to
false
. Set it totrue
can output more details about resource attributes.- ids List<String>
A list of Certificate IDs.
- lang String
The lang.
- name
Regex String A regex string to filter results by Certificate name.
- output
File String File name where to save data source results (after running
pulumi preview
).
- enable
Details boolean Default to
false
. Set it totrue
can output more details about resource attributes.- ids string[]
A list of Certificate IDs.
- lang string
The lang.
- name
Regex string A regex string to filter results by Certificate name.
- output
File string File name where to save data source results (after running
pulumi preview
).
- enable_
details bool Default to
false
. Set it totrue
can output more details about resource attributes.- ids Sequence[str]
A list of Certificate IDs.
- lang str
The lang.
- name_
regex str A regex string to filter results by Certificate name.
- output_
file str File name where to save data source results (after running
pulumi preview
).
- enable
Details Boolean Default to
false
. Set it totrue
can output more details about resource attributes.- ids List<String>
A list of Certificate IDs.
- lang String
The lang.
- name
Regex String A regex string to filter results by Certificate name.
- output
File String File name where to save data source results (after running
pulumi preview
).
getServiceCertificates Result
The following output properties are available:
- Certificates
List<Pulumi.
Ali Cloud. Cas. Outputs. Get Service Certificates Certificate> - Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Enable
Details bool - Lang string
- Name
Regex string - Output
File string
- Certificates
[]Get
Service Certificates Certificate - Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Enable
Details bool - Lang string
- Name
Regex string - Output
File string
- certificates
List<Get
Service Certificates Certificate> - id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- enable
Details Boolean - lang String
- name
Regex String - output
File String
- certificates
Get
Service Certificates Certificate[] - id string
The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- enable
Details boolean - lang string
- name
Regex string - output
File string
- certificates
Sequence[Get
Service Certificates Certificate] - id str
The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- enable_
details bool - lang str
- name_
regex str - output_
file str
- certificates List<Property Map>
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- enable
Details Boolean - lang String
- name
Regex String - output
File String
Supporting Types
GetServiceCertificatesCertificate
- Buy
In boolAliyun The cert is buy from aliyun or not.
- Cert string
The cert's Cert.
- Cert
Id string The cert's id.
- Certificate
Name string The cert's name.
- 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
The cert's finger.
- Id string
The cert's id.
- Issuer string
The cert's Issuer.
- Key string
The cert's Keye.
- Name string
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
The cert's Cert.
- Cert
Id string The cert's id.
- Certificate
Name string The cert's name.
- 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
The cert's finger.
- Id string
The cert's id.
- Issuer string
The cert's Issuer.
- Key string
The cert's Keye.
- Name string
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
The cert's Cert.
- cert
Id String The cert's id.
- certificate
Name String The cert's name.
- 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
The cert's finger.
- id String
The cert's id.
- issuer String
The cert's Issuer.
- key String
The cert's Keye.
- name String
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
The cert's Cert.
- cert
Id string The cert's id.
- certificate
Name string The cert's name.
- 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
The cert's finger.
- id string
The cert's id.
- issuer string
The cert's Issuer.
- key string
The cert's Keye.
- name string
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
The cert's Cert.
- cert_
id str The cert's id.
- certificate_
name str The cert's name.
- 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
The cert's finger.
- id str
The cert's id.
- issuer str
The cert's Issuer.
- key str
The cert's Keye.
- name str
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
The cert's Cert.
- cert
Id String The cert's id.
- certificate
Name String The cert's name.
- 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
The cert's finger.
- id String
The cert's id.
- issuer String
The cert's Issuer.
- key String
The cert's Keye.
- name String
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.