1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. certificateauthority
  5. getAuthority
Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi

gcp.certificateauthority.getAuthority

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi

    Get info about a Google CAS Certificate Authority.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = Gcp.CertificateAuthority.GetAuthority.Invoke(new()
        {
            Location = "us-west1",
            Pool = "pool-name",
            CertificateAuthorityId = "ca-id",
        });
    
        return new Dictionary<string, object?>
        {
            ["csr"] = @default.Apply(@default => @default.Apply(getAuthorityResult => getAuthorityResult.PemCsr)),
        };
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/certificateauthority"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_default, err := certificateauthority.LookupAuthority(ctx, &certificateauthority.LookupAuthorityArgs{
    			Location:               pulumi.StringRef("us-west1"),
    			Pool:                   pulumi.StringRef("pool-name"),
    			CertificateAuthorityId: pulumi.StringRef("ca-id"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("csr", _default.PemCsr)
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.certificateauthority.CertificateauthorityFunctions;
    import com.pulumi.gcp.certificateauthority.inputs.GetAuthorityArgs;
    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 default = CertificateauthorityFunctions.getAuthority(GetAuthorityArgs.builder()
                .location("us-west1")
                .pool("pool-name")
                .certificateAuthorityId("ca-id")
                .build());
    
            ctx.export("csr", default_.pemCsr());
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    default = gcp.certificateauthority.get_authority(location="us-west1",
        pool="pool-name",
        certificate_authority_id="ca-id")
    pulumi.export("csr", default.pem_csr)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const default = gcp.certificateauthority.getAuthority({
        location: "us-west1",
        pool: "pool-name",
        certificateAuthorityId: "ca-id",
    });
    export const csr = _default.then(_default => _default.pemCsr);
    
    variables:
      default:
        fn::invoke:
          Function: gcp:certificateauthority:getAuthority
          Arguments:
            location: us-west1
            pool: pool-name
            certificateAuthorityId: ca-id
    outputs:
      csr: ${default.pemCsr}
    

    Using getAuthority

    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 getAuthority(args: GetAuthorityArgs, opts?: InvokeOptions): Promise<GetAuthorityResult>
    function getAuthorityOutput(args: GetAuthorityOutputArgs, opts?: InvokeOptions): Output<GetAuthorityResult>
    def get_authority(certificate_authority_id: Optional[str] = None,
                      location: Optional[str] = None,
                      pool: Optional[str] = None,
                      project: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetAuthorityResult
    def get_authority_output(certificate_authority_id: Optional[pulumi.Input[str]] = None,
                      location: Optional[pulumi.Input[str]] = None,
                      pool: Optional[pulumi.Input[str]] = None,
                      project: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetAuthorityResult]
    func LookupAuthority(ctx *Context, args *LookupAuthorityArgs, opts ...InvokeOption) (*LookupAuthorityResult, error)
    func LookupAuthorityOutput(ctx *Context, args *LookupAuthorityOutputArgs, opts ...InvokeOption) LookupAuthorityResultOutput

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

    public static class GetAuthority 
    {
        public static Task<GetAuthorityResult> InvokeAsync(GetAuthorityArgs args, InvokeOptions? opts = null)
        public static Output<GetAuthorityResult> Invoke(GetAuthorityInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAuthorityResult> getAuthority(GetAuthorityArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: gcp:certificateauthority/getAuthority:getAuthority
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CertificateAuthorityId string

    ID of the certificate authority.


    Location string

    The location the certificate authority exists in.

    Pool string

    The name of the pool the certificate authority belongs to.

    Project string

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

    CertificateAuthorityId string

    ID of the certificate authority.


    Location string

    The location the certificate authority exists in.

    Pool string

    The name of the pool the certificate authority belongs to.

    Project string

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

    certificateAuthorityId String

    ID of the certificate authority.


    location String

    The location the certificate authority exists in.

    pool String

    The name of the pool the certificate authority belongs to.

    project String

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

    certificateAuthorityId string

    ID of the certificate authority.


    location string

    The location the certificate authority exists in.

    pool string

    The name of the pool the certificate authority belongs to.

    project string

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

    certificate_authority_id str

    ID of the certificate authority.


    location str

    The location the certificate authority exists in.

    pool str

    The name of the pool the certificate authority belongs to.

    project str

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

    certificateAuthorityId String

    ID of the certificate authority.


    location String

    The location the certificate authority exists in.

    pool String

    The name of the pool the certificate authority belongs to.

    project String

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

    getAuthority Result

    The following output properties are available:

    AccessUrls List<GetAuthorityAccessUrl>
    Configs List<GetAuthorityConfig>
    CreateTime string
    DeletionProtection bool
    DesiredState string
    EffectiveLabels Dictionary<string, string>
    GcsBucket string
    Id string

    The provider-assigned unique ID for this managed resource.

    IgnoreActiveCertificatesOnDeletion bool
    KeySpecs List<GetAuthorityKeySpec>
    Labels Dictionary<string, string>
    Lifetime string
    Name string
    PemCaCertificate string
    PemCaCertificates List<string>
    PemCsr string

    The PEM-encoded signed certificate signing request (CSR). This is only set on subordinate certificate authorities that are awaiting user activation.

    PulumiLabels Dictionary<string, string>
    SkipGracePeriod bool
    State string
    SubordinateConfigs List<GetAuthoritySubordinateConfig>
    Type string
    UpdateTime string
    CertificateAuthorityId string
    Location string
    Pool string
    Project string
    AccessUrls []GetAuthorityAccessUrl
    Configs []GetAuthorityConfig
    CreateTime string
    DeletionProtection bool
    DesiredState string
    EffectiveLabels map[string]string
    GcsBucket string
    Id string

    The provider-assigned unique ID for this managed resource.

    IgnoreActiveCertificatesOnDeletion bool
    KeySpecs []GetAuthorityKeySpec
    Labels map[string]string
    Lifetime string
    Name string
    PemCaCertificate string
    PemCaCertificates []string
    PemCsr string

    The PEM-encoded signed certificate signing request (CSR). This is only set on subordinate certificate authorities that are awaiting user activation.

    PulumiLabels map[string]string
    SkipGracePeriod bool
    State string
    SubordinateConfigs []GetAuthoritySubordinateConfig
    Type string
    UpdateTime string
    CertificateAuthorityId string
    Location string
    Pool string
    Project string
    accessUrls List<GetAuthorityAccessUrl>
    configs List<GetAuthorityConfig>
    createTime String
    deletionProtection Boolean
    desiredState String
    effectiveLabels Map<String,String>
    gcsBucket String
    id String

    The provider-assigned unique ID for this managed resource.

    ignoreActiveCertificatesOnDeletion Boolean
    keySpecs List<GetAuthorityKeySpec>
    labels Map<String,String>
    lifetime String
    name String
    pemCaCertificate String
    pemCaCertificates List<String>
    pemCsr String

    The PEM-encoded signed certificate signing request (CSR). This is only set on subordinate certificate authorities that are awaiting user activation.

    pulumiLabels Map<String,String>
    skipGracePeriod Boolean
    state String
    subordinateConfigs List<GetAuthoritySubordinateConfig>
    type String
    updateTime String
    certificateAuthorityId String
    location String
    pool String
    project String
    accessUrls GetAuthorityAccessUrl[]
    configs GetAuthorityConfig[]
    createTime string
    deletionProtection boolean
    desiredState string
    effectiveLabels {[key: string]: string}
    gcsBucket string
    id string

    The provider-assigned unique ID for this managed resource.

    ignoreActiveCertificatesOnDeletion boolean
    keySpecs GetAuthorityKeySpec[]
    labels {[key: string]: string}
    lifetime string
    name string
    pemCaCertificate string
    pemCaCertificates string[]
    pemCsr string

    The PEM-encoded signed certificate signing request (CSR). This is only set on subordinate certificate authorities that are awaiting user activation.

    pulumiLabels {[key: string]: string}
    skipGracePeriod boolean
    state string
    subordinateConfigs GetAuthoritySubordinateConfig[]
    type string
    updateTime string
    certificateAuthorityId string
    location string
    pool string
    project string
    access_urls Sequence[GetAuthorityAccessUrl]
    configs Sequence[GetAuthorityConfig]
    create_time str
    deletion_protection bool
    desired_state str
    effective_labels Mapping[str, str]
    gcs_bucket str
    id str

    The provider-assigned unique ID for this managed resource.

    ignore_active_certificates_on_deletion bool
    key_specs Sequence[GetAuthorityKeySpec]
    labels Mapping[str, str]
    lifetime str
    name str
    pem_ca_certificate str
    pem_ca_certificates Sequence[str]
    pem_csr str

    The PEM-encoded signed certificate signing request (CSR). This is only set on subordinate certificate authorities that are awaiting user activation.

    pulumi_labels Mapping[str, str]
    skip_grace_period bool
    state str
    subordinate_configs Sequence[GetAuthoritySubordinateConfig]
    type str
    update_time str
    certificate_authority_id str
    location str
    pool str
    project str
    accessUrls List<Property Map>
    configs List<Property Map>
    createTime String
    deletionProtection Boolean
    desiredState String
    effectiveLabels Map<String>
    gcsBucket String
    id String

    The provider-assigned unique ID for this managed resource.

    ignoreActiveCertificatesOnDeletion Boolean
    keySpecs List<Property Map>
    labels Map<String>
    lifetime String
    name String
    pemCaCertificate String
    pemCaCertificates List<String>
    pemCsr String

    The PEM-encoded signed certificate signing request (CSR). This is only set on subordinate certificate authorities that are awaiting user activation.

    pulumiLabels Map<String>
    skipGracePeriod Boolean
    state String
    subordinateConfigs List<Property Map>
    type String
    updateTime String
    certificateAuthorityId String
    location String
    pool String
    project String

    Supporting Types

    GetAuthorityAccessUrl

    GetAuthorityConfig

    GetAuthorityConfigSubjectConfig

    GetAuthorityConfigSubjectConfigSubject

    GetAuthorityConfigSubjectConfigSubjectAltName

    DnsNames List<string>
    EmailAddresses List<string>
    IpAddresses List<string>
    Uris List<string>
    DnsNames []string
    EmailAddresses []string
    IpAddresses []string
    Uris []string
    dnsNames List<String>
    emailAddresses List<String>
    ipAddresses List<String>
    uris List<String>
    dnsNames string[]
    emailAddresses string[]
    ipAddresses string[]
    uris string[]
    dns_names Sequence[str]
    email_addresses Sequence[str]
    ip_addresses Sequence[str]
    uris Sequence[str]
    dnsNames List<String>
    emailAddresses List<String>
    ipAddresses List<String>
    uris List<String>

    GetAuthorityConfigX509Config

    GetAuthorityConfigX509ConfigAdditionalExtension

    GetAuthorityConfigX509ConfigAdditionalExtensionObjectId

    ObjectIdPaths List<int>
    objectIdPaths List<Integer>
    objectIdPaths number[]
    object_id_paths Sequence[int]
    objectIdPaths List<Number>

    GetAuthorityConfigX509ConfigCaOption

    GetAuthorityConfigX509ConfigKeyUsage

    GetAuthorityConfigX509ConfigKeyUsageBaseKeyUsage

    GetAuthorityConfigX509ConfigKeyUsageExtendedKeyUsage

    clientAuth Boolean
    codeSigning Boolean
    emailProtection Boolean
    ocspSigning Boolean
    serverAuth Boolean
    timeStamping Boolean
    clientAuth boolean
    codeSigning boolean
    emailProtection boolean
    ocspSigning boolean
    serverAuth boolean
    timeStamping boolean
    clientAuth Boolean
    codeSigning Boolean
    emailProtection Boolean
    ocspSigning Boolean
    serverAuth Boolean
    timeStamping Boolean

    GetAuthorityConfigX509ConfigKeyUsageUnknownExtendedKeyUsage

    ObjectIdPaths List<int>
    objectIdPaths List<Integer>
    objectIdPaths number[]
    object_id_paths Sequence[int]
    objectIdPaths List<Number>

    GetAuthorityConfigX509ConfigNameConstraint

    Critical bool
    ExcludedDnsNames List<string>
    ExcludedEmailAddresses List<string>
    ExcludedIpRanges List<string>
    ExcludedUris List<string>
    PermittedDnsNames List<string>
    PermittedEmailAddresses List<string>
    PermittedIpRanges List<string>
    PermittedUris List<string>
    critical Boolean
    excludedDnsNames List<String>
    excludedEmailAddresses List<String>
    excludedIpRanges List<String>
    excludedUris List<String>
    permittedDnsNames List<String>
    permittedEmailAddresses List<String>
    permittedIpRanges List<String>
    permittedUris List<String>
    critical bool
    excluded_dns_names Sequence[str]
    excluded_email_addresses Sequence[str]
    excluded_ip_ranges Sequence[str]
    excluded_uris Sequence[str]
    permitted_dns_names Sequence[str]
    permitted_email_addresses Sequence[str]
    permitted_ip_ranges Sequence[str]
    permitted_uris Sequence[str]
    critical Boolean
    excludedDnsNames List<String>
    excludedEmailAddresses List<String>
    excludedIpRanges List<String>
    excludedUris List<String>
    permittedDnsNames List<String>
    permittedEmailAddresses List<String>
    permittedIpRanges List<String>
    permittedUris List<String>

    GetAuthorityConfigX509ConfigPolicyId

    ObjectIdPaths List<int>
    objectIdPaths List<Integer>
    objectIdPaths number[]
    object_id_paths Sequence[int]
    objectIdPaths List<Number>

    GetAuthorityKeySpec

    GetAuthoritySubordinateConfig

    GetAuthoritySubordinateConfigPemIssuerChain

    PemCertificates List<string>
    pemCertificates List<String>
    pem_certificates Sequence[str]
    pemCertificates List<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.

    gcp logo
    Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi