Oracle Cloud Infrastructure

v0.5.0 published on Monday, Sep 12, 2022 by Pulumi

getCertificates

This data source provides the list of Certificates in Oracle Cloud Infrastructure API Gateway service.

Returns a list of certificates.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testCertificates = Oci.ApiGateway.GetCertificates.Invoke(new()
    {
        CompartmentId = @var.Compartment_id,
        DisplayName = @var.Certificate_display_name,
        State = @var.Certificate_state,
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ApiGateway.GetCertificates(ctx, &apigateway.GetCertificatesArgs{
			CompartmentId: _var.Compartment_id,
			DisplayName:   pulumi.StringRef(_var.Certificate_display_name),
			State:         pulumi.StringRef(_var.Certificate_state),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.ApiGateway.ApiGatewayFunctions;
import com.pulumi.oci.ApiGateway.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 testCertificates = ApiGatewayFunctions.getCertificates(GetCertificatesArgs.builder()
            .compartmentId(var_.compartment_id())
            .displayName(var_.certificate_display_name())
            .state(var_.certificate_state())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_certificates = oci.ApiGateway.get_certificates(compartment_id=var["compartment_id"],
    display_name=var["certificate_display_name"],
    state=var["certificate_state"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testCertificates = pulumi.output(oci.ApiGateway.getCertificates({
    //Required
    compartmentId: var_compartment_id,
    //Optional
    displayName: var_certificate_display_name,
    state: var_certificate_state,
}));
variables:
  testCertificates:
    Fn::Invoke:
      Function: oci:ApiGateway:getCertificates
      Arguments:
        compartmentId: ${var.compartment_id}
        displayName: ${var.certificate_display_name}
        state: ${var.certificate_state}

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(compartment_id: Optional[str] = None,
                     display_name: Optional[str] = None,
                     filters: Optional[Sequence[_apigateway.GetCertificatesFilter]] = None,
                     state: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetCertificatesResult
def get_certificates_output(compartment_id: Optional[pulumi.Input[str]] = None,
                     display_name: Optional[pulumi.Input[str]] = None,
                     filters: Optional[pulumi.Input[Sequence[pulumi.Input[_apigateway.GetCertificatesFilterArgs]]]] = None,
                     state: 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: oci:ApiGateway/getCertificates:getCertificates
  arguments:
    # arguments dictionary

The following arguments are supported:

CompartmentId string

The ocid of the compartment in which to list resources.

DisplayName string

A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource

Filters List<GetCertificatesFilter>
State string

A filter to return only resources that match the given lifecycle state. Example: ACTIVE or DELETED

CompartmentId string

The ocid of the compartment in which to list resources.

DisplayName string

A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource

Filters []GetCertificatesFilter
State string

A filter to return only resources that match the given lifecycle state. Example: ACTIVE or DELETED

compartmentId String

The ocid of the compartment in which to list resources.

displayName String

A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource

filters List<GetCertificatesFilter>
state String

A filter to return only resources that match the given lifecycle state. Example: ACTIVE or DELETED

compartmentId string

The ocid of the compartment in which to list resources.

displayName string

A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource

filters GetCertificatesFilter[]
state string

A filter to return only resources that match the given lifecycle state. Example: ACTIVE or DELETED

compartment_id str

The ocid of the compartment in which to list resources.

display_name str

A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource

filters GetCertificatesFilter]
state str

A filter to return only resources that match the given lifecycle state. Example: ACTIVE or DELETED

compartmentId String

The ocid of the compartment in which to list resources.

displayName String

A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource

filters List<Property Map>
state String

A filter to return only resources that match the given lifecycle state. Example: ACTIVE or DELETED

getCertificates Result

The following output properties are available:

CertificateCollections List<GetCertificatesCertificateCollection>

The list of certificate_collection.

CompartmentId string

The OCID of the compartment in which the resource is created.

Id string

The provider-assigned unique ID for this managed resource.

DisplayName string

A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource

Filters List<GetCertificatesFilter>
State string

The current state of the certificate.

CertificateCollections []GetCertificatesCertificateCollection

The list of certificate_collection.

CompartmentId string

The OCID of the compartment in which the resource is created.

Id string

The provider-assigned unique ID for this managed resource.

DisplayName string

A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource

Filters []GetCertificatesFilter
State string

The current state of the certificate.

certificateCollections List<GetCertificatesCertificateCollection>

The list of certificate_collection.

compartmentId String

The OCID of the compartment in which the resource is created.

id String

The provider-assigned unique ID for this managed resource.

displayName String

A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource

filters List<GetCertificatesFilter>
state String

The current state of the certificate.

certificateCollections GetCertificatesCertificateCollection[]

The list of certificate_collection.

compartmentId string

The OCID of the compartment in which the resource is created.

id string

The provider-assigned unique ID for this managed resource.

displayName string

A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource

filters GetCertificatesFilter[]
state string

The current state of the certificate.

certificate_collections GetCertificatesCertificateCollection]

The list of certificate_collection.

compartment_id str

The OCID of the compartment in which the resource is created.

id str

The provider-assigned unique ID for this managed resource.

display_name str

A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource

filters GetCertificatesFilter]
state str

The current state of the certificate.

certificateCollections List<Property Map>

The list of certificate_collection.

compartmentId String

The OCID of the compartment in which the resource is created.

id String

The provider-assigned unique ID for this managed resource.

displayName String

A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource

filters List<Property Map>
state String

The current state of the certificate.

Supporting Types

GetCertificatesCertificateCollection

GetCertificatesCertificateCollectionItem

Certificate string

The data of the leaf certificate in pem format.

CompartmentId string

The ocid of the compartment in which to list resources.

DefinedTags Dictionary<string, object>

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

DisplayName string

A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource

FreeformTags Dictionary<string, object>

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

Id string

The OCID of the resource.

IntermediateCertificates string

The intermediate certificate data associated with the certificate in pem format.

LifecycleDetails string

A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.

PrivateKey string
State string

A filter to return only resources that match the given lifecycle state. Example: ACTIVE or DELETED

SubjectNames List<string>

The entity to be secured by the certificate and additional host names.

TimeCreated string

The time this resource was created. An RFC3339 formatted datetime string.

TimeNotValidAfter string

The date and time the certificate will expire.

TimeUpdated string

The time this resource was last updated. An RFC3339 formatted datetime string.

Certificate string

The data of the leaf certificate in pem format.

CompartmentId string

The ocid of the compartment in which to list resources.

DefinedTags map[string]interface{}

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

DisplayName string

A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource

FreeformTags map[string]interface{}

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

Id string

The OCID of the resource.

IntermediateCertificates string

The intermediate certificate data associated with the certificate in pem format.

LifecycleDetails string

A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.

PrivateKey string
State string

A filter to return only resources that match the given lifecycle state. Example: ACTIVE or DELETED

SubjectNames []string

The entity to be secured by the certificate and additional host names.

TimeCreated string

The time this resource was created. An RFC3339 formatted datetime string.

TimeNotValidAfter string

The date and time the certificate will expire.

TimeUpdated string

The time this resource was last updated. An RFC3339 formatted datetime string.

certificate String

The data of the leaf certificate in pem format.

compartmentId String

The ocid of the compartment in which to list resources.

definedTags Map<String,Object>

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

displayName String

A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource

freeformTags Map<String,Object>

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

id String

The OCID of the resource.

intermediateCertificates String

The intermediate certificate data associated with the certificate in pem format.

lifecycleDetails String

A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.

privateKey String
state String

A filter to return only resources that match the given lifecycle state. Example: ACTIVE or DELETED

subjectNames List<String>

The entity to be secured by the certificate and additional host names.

timeCreated String

The time this resource was created. An RFC3339 formatted datetime string.

timeNotValidAfter String

The date and time the certificate will expire.

timeUpdated String

The time this resource was last updated. An RFC3339 formatted datetime string.

certificate string

The data of the leaf certificate in pem format.

compartmentId string

The ocid of the compartment in which to list resources.

definedTags {[key: string]: any}

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

displayName string

A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource

freeformTags {[key: string]: any}

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

id string

The OCID of the resource.

intermediateCertificates string

The intermediate certificate data associated with the certificate in pem format.

lifecycleDetails string

A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.

privateKey string
state string

A filter to return only resources that match the given lifecycle state. Example: ACTIVE or DELETED

subjectNames string[]

The entity to be secured by the certificate and additional host names.

timeCreated string

The time this resource was created. An RFC3339 formatted datetime string.

timeNotValidAfter string

The date and time the certificate will expire.

timeUpdated string

The time this resource was last updated. An RFC3339 formatted datetime string.

certificate str

The data of the leaf certificate in pem format.

compartment_id str

The ocid of the compartment in which to list resources.

defined_tags Mapping[str, Any]

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

display_name str

A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource

freeform_tags Mapping[str, Any]

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

id str

The OCID of the resource.

intermediate_certificates str

The intermediate certificate data associated with the certificate in pem format.

lifecycle_details str

A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.

private_key str
state str

A filter to return only resources that match the given lifecycle state. Example: ACTIVE or DELETED

subject_names Sequence[str]

The entity to be secured by the certificate and additional host names.

time_created str

The time this resource was created. An RFC3339 formatted datetime string.

time_not_valid_after str

The date and time the certificate will expire.

time_updated str

The time this resource was last updated. An RFC3339 formatted datetime string.

certificate String

The data of the leaf certificate in pem format.

compartmentId String

The ocid of the compartment in which to list resources.

definedTags Map<Any>

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

displayName String

A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource

freeformTags Map<Any>

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

id String

The OCID of the resource.

intermediateCertificates String

The intermediate certificate data associated with the certificate in pem format.

lifecycleDetails String

A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.

privateKey String
state String

A filter to return only resources that match the given lifecycle state. Example: ACTIVE or DELETED

subjectNames List<String>

The entity to be secured by the certificate and additional host names.

timeCreated String

The time this resource was created. An RFC3339 formatted datetime string.

timeNotValidAfter String

The date and time the certificate will expire.

timeUpdated String

The time this resource was last updated. An RFC3339 formatted datetime string.

GetCertificatesFilter

Name string
Values List<string>
Regex bool
Name string
Values []string
Regex bool
name String
values List<String>
regex Boolean
name string
values string[]
regex boolean
name str
values Sequence[str]
regex bool
name String
values List<String>
regex Boolean

Package Details

Repository
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.