Google Cloud (GCP) Classic

Pulumi Official
Package maintained by Pulumi
v6.24.0 published on Tuesday, May 17, 2022 by Pulumi

getRegionSslCertificate

Get info about a Region Google Compute SSL Certificate from its name.

Example Usage

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
    public MyStack()
    {
        var myCert = Output.Create(Gcp.Compute.GetRegionSslCertificate.InvokeAsync(new Gcp.Compute.GetRegionSslCertificateArgs
        {
            Name = "my-cert",
        }));
        this.Certificate = myCert.Apply(myCert => myCert.Certificate);
        this.CertificateId = myCert.Apply(myCert => myCert.CertificateId);
        this.SelfLink = myCert.Apply(myCert => myCert.SelfLink);
    }

    [Output("certificate")]
    public Output<string> Certificate { get; set; }
    [Output("certificateId")]
    public Output<string> CertificateId { get; set; }
    [Output("selfLink")]
    public Output<string> SelfLink { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/compute"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		myCert, err := compute.LookupRegionSslCertificate(ctx, &compute.LookupRegionSslCertificateArgs{
			Name: "my-cert",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("certificate", myCert.Certificate)
		ctx.Export("certificateId", myCert.CertificateId)
		ctx.Export("selfLink", myCert.SelfLink)
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var myCert = Output.of(ComputeFunctions.getRegionSslCertificate(GetRegionSslCertificateArgs.builder()
            .name("my-cert")
            .build()));

        ctx.export("certificate", myCert.apply(getRegionSslCertificateResult -> getRegionSslCertificateResult.getCertificate()));
        ctx.export("certificateId", myCert.apply(getRegionSslCertificateResult -> getRegionSslCertificateResult.getCertificateId()));
        ctx.export("selfLink", myCert.apply(getRegionSslCertificateResult -> getRegionSslCertificateResult.getSelfLink()));
        }
}
import pulumi
import pulumi_gcp as gcp

my_cert = gcp.compute.get_region_ssl_certificate(name="my-cert")
pulumi.export("certificate", my_cert.certificate)
pulumi.export("certificateId", my_cert.certificate_id)
pulumi.export("selfLink", my_cert.self_link)
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const myCert = gcp.compute.getRegionSslCertificate({
    name: "my-cert",
});
export const certificate = myCert.then(myCert => myCert.certificate);
export const certificateId = myCert.then(myCert => myCert.certificateId);
export const selfLink = myCert.then(myCert => myCert.selfLink);
variables:
  myCert:
    Fn::Invoke:
      Function: gcp:compute:getRegionSslCertificate
      Arguments:
        name: my-cert
outputs:
  certificate: ${myCert.certificate}
  certificateId: ${myCert.certificateId}
  selfLink: ${myCert.selfLink}

Using getRegionSslCertificate

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 getRegionSslCertificate(args: GetRegionSslCertificateArgs, opts?: InvokeOptions): Promise<GetRegionSslCertificateResult>
function getRegionSslCertificateOutput(args: GetRegionSslCertificateOutputArgs, opts?: InvokeOptions): Output<GetRegionSslCertificateResult>
def get_region_ssl_certificate(name: Optional[str] = None,
                               project: Optional[str] = None,
                               region: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetRegionSslCertificateResult
def get_region_ssl_certificate_output(name: Optional[pulumi.Input[str]] = None,
                               project: Optional[pulumi.Input[str]] = None,
                               region: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetRegionSslCertificateResult]
func LookupRegionSslCertificate(ctx *Context, args *LookupRegionSslCertificateArgs, opts ...InvokeOption) (*LookupRegionSslCertificateResult, error)
func LookupRegionSslCertificateOutput(ctx *Context, args *LookupRegionSslCertificateOutputArgs, opts ...InvokeOption) LookupRegionSslCertificateResultOutput

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

public static class GetRegionSslCertificate 
{
    public static Task<GetRegionSslCertificateResult> InvokeAsync(GetRegionSslCertificateArgs args, InvokeOptions? opts = null)
    public static Output<GetRegionSslCertificateResult> Invoke(GetRegionSslCertificateInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRegionSslCertificateResult> getRegionSslCertificate(GetRegionSslCertificateArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: gcp:compute/getRegionSslCertificate:getRegionSslCertificate
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Name string

The name of the certificate.

Project string

The project in which the resource belongs. If it is not provided, the provider project is used.

Region string

The region in which the resource belongs. If it is not provided, the provider region is used.

Name string

The name of the certificate.

Project string

The project in which the resource belongs. If it is not provided, the provider project is used.

Region string

The region in which the resource belongs. If it is not provided, the provider region is used.

name String

The name of the certificate.

project String

The project in which the resource belongs. If it is not provided, the provider project is used.

region String

The region in which the resource belongs. If it is not provided, the provider region is used.

name string

The name of the certificate.

project string

The project in which the resource belongs. If it is not provided, the provider project is used.

region string

The region in which the resource belongs. If it is not provided, the provider region is used.

name str

The name of the certificate.

project str

The project in which the resource belongs. If it is not provided, the provider project is used.

region str

The region in which the resource belongs. If it is not provided, the provider region is used.

name String

The name of the certificate.

project String

The project in which the resource belongs. If it is not provided, the provider project is used.

region String

The region in which the resource belongs. If it is not provided, the provider region is used.

getRegionSslCertificate Result

The following output properties are available:

Certificate string
CertificateId int
CreationTimestamp string
Description string
Id string

The provider-assigned unique ID for this managed resource.

Name string
NamePrefix string
PrivateKey string
SelfLink string
Project string
Region string
Certificate string
CertificateId int
CreationTimestamp string
Description string
Id string

The provider-assigned unique ID for this managed resource.

Name string
NamePrefix string
PrivateKey string
SelfLink string
Project string
Region string
certificate String
certificateId Integer
creationTimestamp String
description String
id String

The provider-assigned unique ID for this managed resource.

name String
namePrefix String
privateKey String
selfLink String
project String
region String
certificate string
certificateId number
creationTimestamp string
description string
id string

The provider-assigned unique ID for this managed resource.

name string
namePrefix string
privateKey string
selfLink string
project string
region string
certificate str
certificate_id int
creation_timestamp str
description str
id str

The provider-assigned unique ID for this managed resource.

name str
name_prefix str
private_key str
self_link str
project str
region str
certificate String
certificateId Number
creationTimestamp String
description String
id String

The provider-assigned unique ID for this managed resource.

name String
namePrefix String
privateKey String
selfLink String
project String
region String

Package Details

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

This Pulumi package is based on the google-beta Terraform Provider.