Google Cloud Classic v8.3.1 published on Wednesday, Sep 25, 2024 by Pulumi
gcp.compute.getRegionSslCertificate
Explore with Pulumi AI
Get info about a Region Google Compute SSL Certificate from its name.
Example Usage
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);
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)
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/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
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var myCert = Gcp.Compute.GetRegionSslCertificate.Invoke(new()
{
Name = "my-cert",
});
return new Dictionary<string, object?>
{
["certificate"] = myCert.Apply(getRegionSslCertificateResult => getRegionSslCertificateResult.Certificate),
["certificateId"] = myCert.Apply(getRegionSslCertificateResult => getRegionSslCertificateResult.CertificateId),
["selfLink"] = myCert.Apply(getRegionSslCertificateResult => getRegionSslCertificateResult.SelfLink),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.ComputeFunctions;
import com.pulumi.gcp.compute.inputs.GetRegionSslCertificateArgs;
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 myCert = ComputeFunctions.getRegionSslCertificate(GetRegionSslCertificateArgs.builder()
.name("my-cert")
.build());
ctx.export("certificate", myCert.applyValue(getRegionSslCertificateResult -> getRegionSslCertificateResult.certificate()));
ctx.export("certificateId", myCert.applyValue(getRegionSslCertificateResult -> getRegionSslCertificateResult.certificateId()));
ctx.export("selfLink", myCert.applyValue(getRegionSslCertificateResult -> getRegionSslCertificateResult.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:
getRegionSslCertificate Result
The following output properties are available:
- Certificate string
- Certificate
Id int - Creation
Timestamp string - Description string
- Expire
Time string - Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Name
Prefix string - Private
Key string - Self
Link string - Project string
- Region string
- Certificate string
- Certificate
Id int - Creation
Timestamp string - Description string
- Expire
Time string - Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Name
Prefix string - Private
Key string - Self
Link string - Project string
- Region string
- certificate String
- certificate
Id Integer - creation
Timestamp String - description String
- expire
Time String - id String
- The provider-assigned unique ID for this managed resource.
- name String
- name
Prefix String - private
Key String - self
Link String - project String
- region String
- certificate string
- certificate
Id number - creation
Timestamp string - description string
- expire
Time string - id string
- The provider-assigned unique ID for this managed resource.
- name string
- name
Prefix string - private
Key string - self
Link string - project string
- region string
- certificate str
- certificate_
id int - creation_
timestamp str - description str
- expire_
time 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
- certificate
Id Number - creation
Timestamp String - description String
- expire
Time String - id String
- The provider-assigned unique ID for this managed resource.
- name String
- name
Prefix String - private
Key String - self
Link String - project String
- region String
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-beta
Terraform Provider.