1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. slb
  5. getServerCertificates
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

alicloud.slb.getServerCertificates

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

    This data source provides the server certificate list.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const sampleDs = alicloud.slb.getServerCertificates({});
    export const firstSlbServerCertificateId = sampleDs.then(sampleDs => sampleDs.certificates?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    sample_ds = alicloud.slb.get_server_certificates()
    pulumi.export("firstSlbServerCertificateId", sample_ds.certificates[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/slb"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		sampleDs, err := slb.GetServerCertificates(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstSlbServerCertificateId", sampleDs.Certificates[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var sampleDs = AliCloud.Slb.GetServerCertificates.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["firstSlbServerCertificateId"] = sampleDs.Apply(getServerCertificatesResult => getServerCertificatesResult.Certificates[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.slb.SlbFunctions;
    import com.pulumi.alicloud.slb.inputs.GetServerCertificatesArgs;
    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 sampleDs = SlbFunctions.getServerCertificates();
    
            ctx.export("firstSlbServerCertificateId", sampleDs.applyValue(getServerCertificatesResult -> getServerCertificatesResult.certificates()[0].id()));
        }
    }
    
    variables:
      sampleDs:
        fn::invoke:
          Function: alicloud:slb:getServerCertificates
          Arguments: {}
    outputs:
      firstSlbServerCertificateId: ${sampleDs.certificates[0].id}
    

    Using getServerCertificates

    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 getServerCertificates(args: GetServerCertificatesArgs, opts?: InvokeOptions): Promise<GetServerCertificatesResult>
    function getServerCertificatesOutput(args: GetServerCertificatesOutputArgs, opts?: InvokeOptions): Output<GetServerCertificatesResult>
    def get_server_certificates(ids: Optional[Sequence[str]] = None,
                                name_regex: Optional[str] = None,
                                output_file: Optional[str] = None,
                                resource_group_id: Optional[str] = None,
                                tags: Optional[Mapping[str, Any]] = None,
                                opts: Optional[InvokeOptions] = None) -> GetServerCertificatesResult
    def get_server_certificates_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                name_regex: Optional[pulumi.Input[str]] = None,
                                output_file: Optional[pulumi.Input[str]] = None,
                                resource_group_id: Optional[pulumi.Input[str]] = None,
                                tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetServerCertificatesResult]
    func GetServerCertificates(ctx *Context, args *GetServerCertificatesArgs, opts ...InvokeOption) (*GetServerCertificatesResult, error)
    func GetServerCertificatesOutput(ctx *Context, args *GetServerCertificatesOutputArgs, opts ...InvokeOption) GetServerCertificatesResultOutput

    > Note: This function is named GetServerCertificates in the Go SDK.

    public static class GetServerCertificates 
    {
        public static Task<GetServerCertificatesResult> InvokeAsync(GetServerCertificatesArgs args, InvokeOptions? opts = null)
        public static Output<GetServerCertificatesResult> Invoke(GetServerCertificatesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetServerCertificatesResult> getServerCertificates(GetServerCertificatesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:slb/getServerCertificates:getServerCertificates
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of server certificates IDs to filter results.
    NameRegex string
    A regex string to filter results by server certificate name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ResourceGroupId string
    The Id of resource group which the slb server certificates belongs.
    Tags Dictionary<string, object>
    A mapping of tags to assign to the resource.
    Ids []string
    A list of server certificates IDs to filter results.
    NameRegex string
    A regex string to filter results by server certificate name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ResourceGroupId string
    The Id of resource group which the slb server certificates belongs.
    Tags map[string]interface{}
    A mapping of tags to assign to the resource.
    ids List<String>
    A list of server certificates IDs to filter results.
    nameRegex String
    A regex string to filter results by server certificate name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    resourceGroupId String
    The Id of resource group which the slb server certificates belongs.
    tags Map<String,Object>
    A mapping of tags to assign to the resource.
    ids string[]
    A list of server certificates IDs to filter results.
    nameRegex string
    A regex string to filter results by server certificate name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    resourceGroupId string
    The Id of resource group which the slb server certificates belongs.
    tags {[key: string]: any}
    A mapping of tags to assign to the resource.
    ids Sequence[str]
    A list of server certificates IDs to filter results.
    name_regex str
    A regex string to filter results by server certificate name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    resource_group_id str
    The Id of resource group which the slb server certificates belongs.
    tags Mapping[str, Any]
    A mapping of tags to assign to the resource.
    ids List<String>
    A list of server certificates IDs to filter results.
    nameRegex String
    A regex string to filter results by server certificate name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    resourceGroupId String
    The Id of resource group which the slb server certificates belongs.
    tags Map<Any>
    A mapping of tags to assign to the resource.

    getServerCertificates Result

    The following output properties are available:

    Certificates List<Pulumi.AliCloud.Slb.Outputs.GetServerCertificatesCertificate>
    A list of SLB server certificates. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A list of SLB server certificates IDs.
    Names List<string>
    A list of SLB server certificates names.
    NameRegex string
    OutputFile string
    ResourceGroupId string
    The Id of resource group which the slb server certificates belongs.
    Tags Dictionary<string, object>
    (Available in v1.66.0+) A mapping of tags to assign to the resource.
    Certificates []GetServerCertificatesCertificate
    A list of SLB server certificates. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of SLB server certificates IDs.
    Names []string
    A list of SLB server certificates names.
    NameRegex string
    OutputFile string
    ResourceGroupId string
    The Id of resource group which the slb server certificates belongs.
    Tags map[string]interface{}
    (Available in v1.66.0+) A mapping of tags to assign to the resource.
    certificates List<GetServerCertificatesCertificate>
    A list of SLB server certificates. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of SLB server certificates IDs.
    names List<String>
    A list of SLB server certificates names.
    nameRegex String
    outputFile String
    resourceGroupId String
    The Id of resource group which the slb server certificates belongs.
    tags Map<String,Object>
    (Available in v1.66.0+) A mapping of tags to assign to the resource.
    certificates GetServerCertificatesCertificate[]
    A list of SLB server certificates. Each element contains the following attributes:
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of SLB server certificates IDs.
    names string[]
    A list of SLB server certificates names.
    nameRegex string
    outputFile string
    resourceGroupId string
    The Id of resource group which the slb server certificates belongs.
    tags {[key: string]: any}
    (Available in v1.66.0+) A mapping of tags to assign to the resource.
    certificates Sequence[GetServerCertificatesCertificate]
    A list of SLB server certificates. Each element contains the following attributes:
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of SLB server certificates IDs.
    names Sequence[str]
    A list of SLB server certificates names.
    name_regex str
    output_file str
    resource_group_id str
    The Id of resource group which the slb server certificates belongs.
    tags Mapping[str, Any]
    (Available in v1.66.0+) A mapping of tags to assign to the resource.
    certificates List<Property Map>
    A list of SLB server certificates. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of SLB server certificates IDs.
    names List<String>
    A list of SLB server certificates names.
    nameRegex String
    outputFile String
    resourceGroupId String
    The Id of resource group which the slb server certificates belongs.
    tags Map<Any>
    (Available in v1.66.0+) A mapping of tags to assign to the resource.

    Supporting Types

    GetServerCertificatesCertificate

    AlicloudCertificateId string
    Id of server certificate issued by alibaba cloud.
    AlicloudCertificateName string
    Name of server certificate issued by alibaba cloud.
    CommonName string
    Server certificate common name.
    CreatedTime string
    Server certificate created time.
    CreatedTimestamp int
    Server certificate created timestamp.
    ExpiredTime string
    Server certificate expired time.
    ExpiredTimestamp int
    Server certificate expired timestamp.
    Fingerprint string
    Server certificate fingerprint.
    Id string
    Server certificate ID.
    IsAlicloudCertificate bool
    Is server certificate issued by alibaba cloud or not.
    Name string
    Server certificate name.
    SubjectAlternativeNames List<string>
    Server certificate subject alternative name list.
    ResourceGroupId string
    The Id of resource group which the slb server certificates belongs.
    Tags Dictionary<string, object>
    A mapping of tags to assign to the resource.
    AlicloudCertificateId string
    Id of server certificate issued by alibaba cloud.
    AlicloudCertificateName string
    Name of server certificate issued by alibaba cloud.
    CommonName string
    Server certificate common name.
    CreatedTime string
    Server certificate created time.
    CreatedTimestamp int
    Server certificate created timestamp.
    ExpiredTime string
    Server certificate expired time.
    ExpiredTimestamp int
    Server certificate expired timestamp.
    Fingerprint string
    Server certificate fingerprint.
    Id string
    Server certificate ID.
    IsAlicloudCertificate bool
    Is server certificate issued by alibaba cloud or not.
    Name string
    Server certificate name.
    SubjectAlternativeNames []string
    Server certificate subject alternative name list.
    ResourceGroupId string
    The Id of resource group which the slb server certificates belongs.
    Tags map[string]interface{}
    A mapping of tags to assign to the resource.
    alicloudCertificateId String
    Id of server certificate issued by alibaba cloud.
    alicloudCertificateName String
    Name of server certificate issued by alibaba cloud.
    commonName String
    Server certificate common name.
    createdTime String
    Server certificate created time.
    createdTimestamp Integer
    Server certificate created timestamp.
    expiredTime String
    Server certificate expired time.
    expiredTimestamp Integer
    Server certificate expired timestamp.
    fingerprint String
    Server certificate fingerprint.
    id String
    Server certificate ID.
    isAlicloudCertificate Boolean
    Is server certificate issued by alibaba cloud or not.
    name String
    Server certificate name.
    subjectAlternativeNames List<String>
    Server certificate subject alternative name list.
    resourceGroupId String
    The Id of resource group which the slb server certificates belongs.
    tags Map<String,Object>
    A mapping of tags to assign to the resource.
    alicloudCertificateId string
    Id of server certificate issued by alibaba cloud.
    alicloudCertificateName string
    Name of server certificate issued by alibaba cloud.
    commonName string
    Server certificate common name.
    createdTime string
    Server certificate created time.
    createdTimestamp number
    Server certificate created timestamp.
    expiredTime string
    Server certificate expired time.
    expiredTimestamp number
    Server certificate expired timestamp.
    fingerprint string
    Server certificate fingerprint.
    id string
    Server certificate ID.
    isAlicloudCertificate boolean
    Is server certificate issued by alibaba cloud or not.
    name string
    Server certificate name.
    subjectAlternativeNames string[]
    Server certificate subject alternative name list.
    resourceGroupId string
    The Id of resource group which the slb server certificates belongs.
    tags {[key: string]: any}
    A mapping of tags to assign to the resource.
    alicloud_certificate_id str
    Id of server certificate issued by alibaba cloud.
    alicloud_certificate_name str
    Name of server certificate issued by alibaba cloud.
    common_name str
    Server certificate common name.
    created_time str
    Server certificate created time.
    created_timestamp int
    Server certificate created timestamp.
    expired_time str
    Server certificate expired time.
    expired_timestamp int
    Server certificate expired timestamp.
    fingerprint str
    Server certificate fingerprint.
    id str
    Server certificate ID.
    is_alicloud_certificate bool
    Is server certificate issued by alibaba cloud or not.
    name str
    Server certificate name.
    subject_alternative_names Sequence[str]
    Server certificate subject alternative name list.
    resource_group_id str
    The Id of resource group which the slb server certificates belongs.
    tags Mapping[str, Any]
    A mapping of tags to assign to the resource.
    alicloudCertificateId String
    Id of server certificate issued by alibaba cloud.
    alicloudCertificateName String
    Name of server certificate issued by alibaba cloud.
    commonName String
    Server certificate common name.
    createdTime String
    Server certificate created time.
    createdTimestamp Number
    Server certificate created timestamp.
    expiredTime String
    Server certificate expired time.
    expiredTimestamp Number
    Server certificate expired timestamp.
    fingerprint String
    Server certificate fingerprint.
    id String
    Server certificate ID.
    isAlicloudCertificate Boolean
    Is server certificate issued by alibaba cloud or not.
    name String
    Server certificate name.
    subjectAlternativeNames List<String>
    Server certificate subject alternative name list.
    resourceGroupId String
    The Id of resource group which the slb server certificates belongs.
    tags Map<Any>
    A mapping of tags to assign to the resource.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi