1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. CertificatesManagement
  5. getCertificateVersions
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

oci.CertificatesManagement.getCertificateVersions

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

This data source provides the list of Certificate Versions in Oracle Cloud Infrastructure Certificates Management service.

Lists all certificate versions for the specified certificate. Optionally, you can use the parameter FilterByVersionNumberQueryParam to limit the result set to a single item that matches the specified version number.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testCertificateVersions = oci.CertificatesManagement.getCertificateVersions({
    certificateId: testCertificate.id,
    versionNumber: certificateVersionVersionNumber,
});
Copy
import pulumi
import pulumi_oci as oci

test_certificate_versions = oci.CertificatesManagement.get_certificate_versions(certificate_id=test_certificate["id"],
    version_number=certificate_version_version_number)
Copy
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/certificatesmanagement"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := certificatesmanagement.GetCertificateVersions(ctx, &certificatesmanagement.GetCertificateVersionsArgs{
			CertificateId: testCertificate.Id,
			VersionNumber: pulumi.StringRef(certificateVersionVersionNumber),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testCertificateVersions = Oci.CertificatesManagement.GetCertificateVersions.Invoke(new()
    {
        CertificateId = testCertificate.Id,
        VersionNumber = certificateVersionVersionNumber,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.CertificatesManagement.CertificatesManagementFunctions;
import com.pulumi.oci.CertificatesManagement.inputs.GetCertificateVersionsArgs;
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 testCertificateVersions = CertificatesManagementFunctions.getCertificateVersions(GetCertificateVersionsArgs.builder()
            .certificateId(testCertificate.id())
            .versionNumber(certificateVersionVersionNumber)
            .build());

    }
}
Copy
variables:
  testCertificateVersions:
    fn::invoke:
      function: oci:CertificatesManagement:getCertificateVersions
      arguments:
        certificateId: ${testCertificate.id}
        versionNumber: ${certificateVersionVersionNumber}
Copy

Using getCertificateVersions

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 getCertificateVersions(args: GetCertificateVersionsArgs, opts?: InvokeOptions): Promise<GetCertificateVersionsResult>
function getCertificateVersionsOutput(args: GetCertificateVersionsOutputArgs, opts?: InvokeOptions): Output<GetCertificateVersionsResult>
Copy
def get_certificate_versions(certificate_id: Optional[str] = None,
                             filters: Optional[Sequence[_certificatesmanagement.GetCertificateVersionsFilter]] = None,
                             version_number: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetCertificateVersionsResult
def get_certificate_versions_output(certificate_id: Optional[pulumi.Input[str]] = None,
                             filters: Optional[pulumi.Input[Sequence[pulumi.Input[_certificatesmanagement.GetCertificateVersionsFilterArgs]]]] = None,
                             version_number: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetCertificateVersionsResult]
Copy
func GetCertificateVersions(ctx *Context, args *GetCertificateVersionsArgs, opts ...InvokeOption) (*GetCertificateVersionsResult, error)
func GetCertificateVersionsOutput(ctx *Context, args *GetCertificateVersionsOutputArgs, opts ...InvokeOption) GetCertificateVersionsResultOutput
Copy

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

public static class GetCertificateVersions 
{
    public static Task<GetCertificateVersionsResult> InvokeAsync(GetCertificateVersionsArgs args, InvokeOptions? opts = null)
    public static Output<GetCertificateVersionsResult> Invoke(GetCertificateVersionsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetCertificateVersionsResult> getCertificateVersions(GetCertificateVersionsArgs args, InvokeOptions options)
public static Output<GetCertificateVersionsResult> getCertificateVersions(GetCertificateVersionsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:CertificatesManagement/getCertificateVersions:getCertificateVersions
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CertificateId This property is required. string
The OCID of the certificate.
Filters Changes to this property will trigger replacement. List<GetCertificateVersionsFilter>
VersionNumber string
A filter that returns only resources that match the specified version number. The default value is 0, which means that this filter is not applied.
CertificateId This property is required. string
The OCID of the certificate.
Filters Changes to this property will trigger replacement. []GetCertificateVersionsFilter
VersionNumber string
A filter that returns only resources that match the specified version number. The default value is 0, which means that this filter is not applied.
certificateId This property is required. String
The OCID of the certificate.
filters Changes to this property will trigger replacement. List<GetCertificateVersionsFilter>
versionNumber String
A filter that returns only resources that match the specified version number. The default value is 0, which means that this filter is not applied.
certificateId This property is required. string
The OCID of the certificate.
filters Changes to this property will trigger replacement. GetCertificateVersionsFilter[]
versionNumber string
A filter that returns only resources that match the specified version number. The default value is 0, which means that this filter is not applied.
certificate_id This property is required. str
The OCID of the certificate.
filters Changes to this property will trigger replacement. Sequence[certificatesmanagement.GetCertificateVersionsFilter]
version_number str
A filter that returns only resources that match the specified version number. The default value is 0, which means that this filter is not applied.
certificateId This property is required. String
The OCID of the certificate.
filters Changes to this property will trigger replacement. List<Property Map>
versionNumber String
A filter that returns only resources that match the specified version number. The default value is 0, which means that this filter is not applied.

getCertificateVersions Result

The following output properties are available:

CertificateId string
The OCID of the certificate.
CertificateVersionCollections List<GetCertificateVersionsCertificateVersionCollection>
The list of certificate_version_collection.
Id string
The provider-assigned unique ID for this managed resource.
Filters List<GetCertificateVersionsFilter>
VersionNumber string
The version number of the certificate.
CertificateId string
The OCID of the certificate.
CertificateVersionCollections []GetCertificateVersionsCertificateVersionCollection
The list of certificate_version_collection.
Id string
The provider-assigned unique ID for this managed resource.
Filters []GetCertificateVersionsFilter
VersionNumber string
The version number of the certificate.
certificateId String
The OCID of the certificate.
certificateVersionCollections List<GetCertificateVersionsCertificateVersionCollection>
The list of certificate_version_collection.
id String
The provider-assigned unique ID for this managed resource.
filters List<GetCertificateVersionsFilter>
versionNumber String
The version number of the certificate.
certificateId string
The OCID of the certificate.
certificateVersionCollections GetCertificateVersionsCertificateVersionCollection[]
The list of certificate_version_collection.
id string
The provider-assigned unique ID for this managed resource.
filters GetCertificateVersionsFilter[]
versionNumber string
The version number of the certificate.
certificate_id str
The OCID of the certificate.
certificate_version_collections Sequence[certificatesmanagement.GetCertificateVersionsCertificateVersionCollection]
The list of certificate_version_collection.
id str
The provider-assigned unique ID for this managed resource.
filters Sequence[certificatesmanagement.GetCertificateVersionsFilter]
version_number str
The version number of the certificate.
certificateId String
The OCID of the certificate.
certificateVersionCollections List<Property Map>
The list of certificate_version_collection.
id String
The provider-assigned unique ID for this managed resource.
filters List<Property Map>
versionNumber String
The version number of the certificate.

Supporting Types

GetCertificateVersionsCertificateVersionCollection

Items This property is required. List<GetCertificateVersionsCertificateVersionCollectionItem>
A list of certificate version summary objects.
Items This property is required. []GetCertificateVersionsCertificateVersionCollectionItem
A list of certificate version summary objects.
items This property is required. List<GetCertificateVersionsCertificateVersionCollectionItem>
A list of certificate version summary objects.
items This property is required. GetCertificateVersionsCertificateVersionCollectionItem[]
A list of certificate version summary objects.
items This property is required. Sequence[certificatesmanagement.GetCertificateVersionsCertificateVersionCollectionItem]
A list of certificate version summary objects.
items This property is required. List<Property Map>
A list of certificate version summary objects.

GetCertificateVersionsCertificateVersionCollectionItem

CertificateId This property is required. string
The OCID of the certificate.
IssuerCaVersionNumber This property is required. string
The version number of the issuing certificate authority (CA).
RevocationStatuses This property is required. List<GetCertificateVersionsCertificateVersionCollectionItemRevocationStatus>
The current revocation status of the entity.
SerialNumber This property is required. string
A unique certificate identifier used in certificate revocation tracking, formatted as octets. Example: 03 AC FC FA CC B3 CB 02 B8 F8 DE F5 85 E7 7B FF
Stages This property is required. List<string>
A list of rotation states for this certificate version.
SubjectAlternativeNames This property is required. List<GetCertificateVersionsCertificateVersionCollectionItemSubjectAlternativeName>
A list of subject alternative names.
TimeCreated This property is required. string
A optional property indicating the time when the certificate version was created, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
TimeOfDeletion This property is required. string
An optional property indicating when to delete the certificate version, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
Validities This property is required. List<GetCertificateVersionsCertificateVersionCollectionItemValidity>
An object that describes a period of time during which an entity is valid. If this is not provided when you create a certificate, the validity of the issuing CA is used.
VersionName This property is required. string
The name of the certificate version. When the value is not null, a name is unique across versions of a given certificate.
VersionNumber This property is required. string
A filter that returns only resources that match the specified version number. The default value is 0, which means that this filter is not applied.
CertificateId This property is required. string
The OCID of the certificate.
IssuerCaVersionNumber This property is required. string
The version number of the issuing certificate authority (CA).
RevocationStatuses This property is required. []GetCertificateVersionsCertificateVersionCollectionItemRevocationStatus
The current revocation status of the entity.
SerialNumber This property is required. string
A unique certificate identifier used in certificate revocation tracking, formatted as octets. Example: 03 AC FC FA CC B3 CB 02 B8 F8 DE F5 85 E7 7B FF
Stages This property is required. []string
A list of rotation states for this certificate version.
SubjectAlternativeNames This property is required. []GetCertificateVersionsCertificateVersionCollectionItemSubjectAlternativeName
A list of subject alternative names.
TimeCreated This property is required. string
A optional property indicating the time when the certificate version was created, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
TimeOfDeletion This property is required. string
An optional property indicating when to delete the certificate version, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
Validities This property is required. []GetCertificateVersionsCertificateVersionCollectionItemValidity
An object that describes a period of time during which an entity is valid. If this is not provided when you create a certificate, the validity of the issuing CA is used.
VersionName This property is required. string
The name of the certificate version. When the value is not null, a name is unique across versions of a given certificate.
VersionNumber This property is required. string
A filter that returns only resources that match the specified version number. The default value is 0, which means that this filter is not applied.
certificateId This property is required. String
The OCID of the certificate.
issuerCaVersionNumber This property is required. String
The version number of the issuing certificate authority (CA).
revocationStatuses This property is required. List<GetCertificateVersionsCertificateVersionCollectionItemRevocationStatus>
The current revocation status of the entity.
serialNumber This property is required. String
A unique certificate identifier used in certificate revocation tracking, formatted as octets. Example: 03 AC FC FA CC B3 CB 02 B8 F8 DE F5 85 E7 7B FF
stages This property is required. List<String>
A list of rotation states for this certificate version.
subjectAlternativeNames This property is required. List<GetCertificateVersionsCertificateVersionCollectionItemSubjectAlternativeName>
A list of subject alternative names.
timeCreated This property is required. String
A optional property indicating the time when the certificate version was created, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
timeOfDeletion This property is required. String
An optional property indicating when to delete the certificate version, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
validities This property is required. List<GetCertificateVersionsCertificateVersionCollectionItemValidity>
An object that describes a period of time during which an entity is valid. If this is not provided when you create a certificate, the validity of the issuing CA is used.
versionName This property is required. String
The name of the certificate version. When the value is not null, a name is unique across versions of a given certificate.
versionNumber This property is required. String
A filter that returns only resources that match the specified version number. The default value is 0, which means that this filter is not applied.
certificateId This property is required. string
The OCID of the certificate.
issuerCaVersionNumber This property is required. string
The version number of the issuing certificate authority (CA).
revocationStatuses This property is required. GetCertificateVersionsCertificateVersionCollectionItemRevocationStatus[]
The current revocation status of the entity.
serialNumber This property is required. string
A unique certificate identifier used in certificate revocation tracking, formatted as octets. Example: 03 AC FC FA CC B3 CB 02 B8 F8 DE F5 85 E7 7B FF
stages This property is required. string[]
A list of rotation states for this certificate version.
subjectAlternativeNames This property is required. GetCertificateVersionsCertificateVersionCollectionItemSubjectAlternativeName[]
A list of subject alternative names.
timeCreated This property is required. string
A optional property indicating the time when the certificate version was created, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
timeOfDeletion This property is required. string
An optional property indicating when to delete the certificate version, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
validities This property is required. GetCertificateVersionsCertificateVersionCollectionItemValidity[]
An object that describes a period of time during which an entity is valid. If this is not provided when you create a certificate, the validity of the issuing CA is used.
versionName This property is required. string
The name of the certificate version. When the value is not null, a name is unique across versions of a given certificate.
versionNumber This property is required. string
A filter that returns only resources that match the specified version number. The default value is 0, which means that this filter is not applied.
certificate_id This property is required. str
The OCID of the certificate.
issuer_ca_version_number This property is required. str
The version number of the issuing certificate authority (CA).
revocation_statuses This property is required. Sequence[certificatesmanagement.GetCertificateVersionsCertificateVersionCollectionItemRevocationStatus]
The current revocation status of the entity.
serial_number This property is required. str
A unique certificate identifier used in certificate revocation tracking, formatted as octets. Example: 03 AC FC FA CC B3 CB 02 B8 F8 DE F5 85 E7 7B FF
stages This property is required. Sequence[str]
A list of rotation states for this certificate version.
subject_alternative_names This property is required. Sequence[certificatesmanagement.GetCertificateVersionsCertificateVersionCollectionItemSubjectAlternativeName]
A list of subject alternative names.
time_created This property is required. str
A optional property indicating the time when the certificate version was created, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
time_of_deletion This property is required. str
An optional property indicating when to delete the certificate version, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
validities This property is required. Sequence[certificatesmanagement.GetCertificateVersionsCertificateVersionCollectionItemValidity]
An object that describes a period of time during which an entity is valid. If this is not provided when you create a certificate, the validity of the issuing CA is used.
version_name This property is required. str
The name of the certificate version. When the value is not null, a name is unique across versions of a given certificate.
version_number This property is required. str
A filter that returns only resources that match the specified version number. The default value is 0, which means that this filter is not applied.
certificateId This property is required. String
The OCID of the certificate.
issuerCaVersionNumber This property is required. String
The version number of the issuing certificate authority (CA).
revocationStatuses This property is required. List<Property Map>
The current revocation status of the entity.
serialNumber This property is required. String
A unique certificate identifier used in certificate revocation tracking, formatted as octets. Example: 03 AC FC FA CC B3 CB 02 B8 F8 DE F5 85 E7 7B FF
stages This property is required. List<String>
A list of rotation states for this certificate version.
subjectAlternativeNames This property is required. List<Property Map>
A list of subject alternative names.
timeCreated This property is required. String
A optional property indicating the time when the certificate version was created, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
timeOfDeletion This property is required. String
An optional property indicating when to delete the certificate version, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
validities This property is required. List<Property Map>
An object that describes a period of time during which an entity is valid. If this is not provided when you create a certificate, the validity of the issuing CA is used.
versionName This property is required. String
The name of the certificate version. When the value is not null, a name is unique across versions of a given certificate.
versionNumber This property is required. String
A filter that returns only resources that match the specified version number. The default value is 0, which means that this filter is not applied.

GetCertificateVersionsCertificateVersionCollectionItemRevocationStatus

RevocationReason This property is required. string
The reason the certificate or certificate authority (CA) was revoked.
TimeOfRevocation This property is required. string
The time when the entity was revoked, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
RevocationReason This property is required. string
The reason the certificate or certificate authority (CA) was revoked.
TimeOfRevocation This property is required. string
The time when the entity was revoked, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
revocationReason This property is required. String
The reason the certificate or certificate authority (CA) was revoked.
timeOfRevocation This property is required. String
The time when the entity was revoked, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
revocationReason This property is required. string
The reason the certificate or certificate authority (CA) was revoked.
timeOfRevocation This property is required. string
The time when the entity was revoked, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
revocation_reason This property is required. str
The reason the certificate or certificate authority (CA) was revoked.
time_of_revocation This property is required. str
The time when the entity was revoked, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
revocationReason This property is required. String
The reason the certificate or certificate authority (CA) was revoked.
timeOfRevocation This property is required. String
The time when the entity was revoked, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z

GetCertificateVersionsCertificateVersionCollectionItemSubjectAlternativeName

Type This property is required. string
The subject alternative name type. Currently only DNS domain or host names and IP addresses are supported.
Value This property is required. string
The subject alternative name.
Type This property is required. string
The subject alternative name type. Currently only DNS domain or host names and IP addresses are supported.
Value This property is required. string
The subject alternative name.
type This property is required. String
The subject alternative name type. Currently only DNS domain or host names and IP addresses are supported.
value This property is required. String
The subject alternative name.
type This property is required. string
The subject alternative name type. Currently only DNS domain or host names and IP addresses are supported.
value This property is required. string
The subject alternative name.
type This property is required. str
The subject alternative name type. Currently only DNS domain or host names and IP addresses are supported.
value This property is required. str
The subject alternative name.
type This property is required. String
The subject alternative name type. Currently only DNS domain or host names and IP addresses are supported.
value This property is required. String
The subject alternative name.

GetCertificateVersionsCertificateVersionCollectionItemValidity

TimeOfValidityNotAfter This property is required. string
The date on which the certificate validity period ends, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
TimeOfValidityNotBefore This property is required. string
The date on which the certificate validity period begins, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
TimeOfValidityNotAfter This property is required. string
The date on which the certificate validity period ends, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
TimeOfValidityNotBefore This property is required. string
The date on which the certificate validity period begins, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
timeOfValidityNotAfter This property is required. String
The date on which the certificate validity period ends, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
timeOfValidityNotBefore This property is required. String
The date on which the certificate validity period begins, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
timeOfValidityNotAfter This property is required. string
The date on which the certificate validity period ends, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
timeOfValidityNotBefore This property is required. string
The date on which the certificate validity period begins, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
time_of_validity_not_after This property is required. str
The date on which the certificate validity period ends, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
time_of_validity_not_before This property is required. str
The date on which the certificate validity period begins, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
timeOfValidityNotAfter This property is required. String
The date on which the certificate validity period ends, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
timeOfValidityNotBefore This property is required. String
The date on which the certificate validity period begins, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z

GetCertificateVersionsFilter

Name This property is required. string
Values This property is required. List<string>
Regex bool
Name This property is required. string
Values This property is required. []string
Regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean
name This property is required. string
values This property is required. string[]
regex boolean
name This property is required. str
values This property is required. Sequence[str]
regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi