akamai logo
Akamai v4.1.0, Jan 25 23

akamai.getCpsCsr

When setting up a third-party enrollment, use the akamai.getCpsCsr data source to retrieve the Certificate Signing Request (CSR) for that enrollment. When you create an enrollment in CPS, you also generate a PEM-formatted CSR. CPS encodes the CSR with a private key using either the RSA or the ECDSA algorithm. The CSR contains all the information the certificate authority (CA) needs to issue your certificate.

If you’re using dual-stacked certificates, you’ll see data for both ECDSA and RSA keys.

Basic usage

This example shows how to return CSR information for enrollment ID 12345:

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

const example = akamai.getCpsCsr({
    enrollmentId: 12345,
});
import pulumi
import pulumi_akamai as akamai

example = akamai.get_cps_csr(enrollment_id=12345)
using System.Collections.Generic;
using Pulumi;
using Akamai = Pulumi.Akamai;

return await Deployment.RunAsync(() => 
{
    var example = Akamai.GetCpsCsr.Invoke(new()
    {
        EnrollmentId = 12345,
    });

});
package main

import (
	"github.com/pulumi/pulumi-akamai/sdk/v4/go/akamai"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := akamai.GetCpsCsr(ctx, &akamai.GetCpsCsrArgs{
			EnrollmentId: 12345,
		}, 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.akamai.AkamaiFunctions;
import com.pulumi.akamai.inputs.GetCpsCsrArgs;
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 example = AkamaiFunctions.getCpsCsr(GetCpsCsrArgs.builder()
            .enrollmentId(12345)
            .build());

    }
}
variables:
  example:
    fn::invoke:
      Function: akamai:getCpsCsr
      Arguments:
        enrollmentId: 12345

Attributes reference

This data source returns these attributes:

  • csr_rsa - Returns CSR information for a certificate that uses the RSA algorithm.
  • csr_ecdsa - Returns CSR information for a certificate that uses the ECDSA algorithm.

Using getCpsCsr

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 getCpsCsr(args: GetCpsCsrArgs, opts?: InvokeOptions): Promise<GetCpsCsrResult>
function getCpsCsrOutput(args: GetCpsCsrOutputArgs, opts?: InvokeOptions): Output<GetCpsCsrResult>
def get_cps_csr(enrollment_id: Optional[int] = None,
                opts: Optional[InvokeOptions] = None) -> GetCpsCsrResult
def get_cps_csr_output(enrollment_id: Optional[pulumi.Input[int]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetCpsCsrResult]
func GetCpsCsr(ctx *Context, args *GetCpsCsrArgs, opts ...InvokeOption) (*GetCpsCsrResult, error)
func GetCpsCsrOutput(ctx *Context, args *GetCpsCsrOutputArgs, opts ...InvokeOption) GetCpsCsrResultOutput

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

public static class GetCpsCsr 
{
    public static Task<GetCpsCsrResult> InvokeAsync(GetCpsCsrArgs args, InvokeOptions? opts = null)
    public static Output<GetCpsCsrResult> Invoke(GetCpsCsrInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCpsCsrResult> getCpsCsr(GetCpsCsrArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: akamai:index/getCpsCsr:getCpsCsr
  arguments:
    # arguments dictionary

The following arguments are supported:

EnrollmentId int

Unique identifier of the enrollment.

EnrollmentId int

Unique identifier of the enrollment.

enrollmentId Integer

Unique identifier of the enrollment.

enrollmentId number

Unique identifier of the enrollment.

enrollment_id int

Unique identifier of the enrollment.

enrollmentId Number

Unique identifier of the enrollment.

getCpsCsr Result

The following output properties are available:

CsrEcdsa string
CsrRsa string
EnrollmentId int
Id string

The provider-assigned unique ID for this managed resource.

CsrEcdsa string
CsrRsa string
EnrollmentId int
Id string

The provider-assigned unique ID for this managed resource.

csrEcdsa String
csrRsa String
enrollmentId Integer
id String

The provider-assigned unique ID for this managed resource.

csrEcdsa string
csrRsa string
enrollmentId number
id string

The provider-assigned unique ID for this managed resource.

csr_ecdsa str
csr_rsa str
enrollment_id int
id str

The provider-assigned unique ID for this managed resource.

csrEcdsa String
csrRsa String
enrollmentId Number
id String

The provider-assigned unique ID for this managed resource.

Package Details

Repository
Akamai pulumi/pulumi-akamai
License
Apache-2.0
Notes

This Pulumi package is based on the akamai Terraform Provider.