All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.gcp.certificateauthority.kotlin.CertificateauthorityFunctions.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.certificateauthority.kotlin

import com.pulumi.gcp.certificateauthority.CertificateauthorityFunctions.getAuthorityPlain
import com.pulumi.gcp.certificateauthority.CertificateauthorityFunctions.getCaPoolIamPolicyPlain
import com.pulumi.gcp.certificateauthority.CertificateauthorityFunctions.getCertificateTemplateIamPolicyPlain
import com.pulumi.gcp.certificateauthority.kotlin.inputs.GetAuthorityPlainArgs
import com.pulumi.gcp.certificateauthority.kotlin.inputs.GetAuthorityPlainArgsBuilder
import com.pulumi.gcp.certificateauthority.kotlin.inputs.GetCaPoolIamPolicyPlainArgs
import com.pulumi.gcp.certificateauthority.kotlin.inputs.GetCaPoolIamPolicyPlainArgsBuilder
import com.pulumi.gcp.certificateauthority.kotlin.inputs.GetCertificateTemplateIamPolicyPlainArgs
import com.pulumi.gcp.certificateauthority.kotlin.inputs.GetCertificateTemplateIamPolicyPlainArgsBuilder
import com.pulumi.gcp.certificateauthority.kotlin.outputs.GetAuthorityResult
import com.pulumi.gcp.certificateauthority.kotlin.outputs.GetCaPoolIamPolicyResult
import com.pulumi.gcp.certificateauthority.kotlin.outputs.GetCertificateTemplateIamPolicyResult
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.gcp.certificateauthority.kotlin.outputs.GetAuthorityResult.Companion.toKotlin as getAuthorityResultToKotlin
import com.pulumi.gcp.certificateauthority.kotlin.outputs.GetCaPoolIamPolicyResult.Companion.toKotlin as getCaPoolIamPolicyResultToKotlin
import com.pulumi.gcp.certificateauthority.kotlin.outputs.GetCertificateTemplateIamPolicyResult.Companion.toKotlin as getCertificateTemplateIamPolicyResultToKotlin

public object CertificateauthorityFunctions {
    /**
     * Get info about a Google CAS Certificate Authority.
     * ## Example Usage
     * ```tf
     * data "google_privateca_certificate_authority" "default" {
     *   location = "us-west1"
     *   pool = "pool-name"
     *   certificate_authority_id = "ca-id"
     * }
     * output "csr" {
     *   value = data.google_privateca_certificate_authority.default.pem_csr
     * }
     * ```
     * @param argument A collection of arguments for invoking getAuthority.
     * @return A collection of values returned by getAuthority.
     */
    public suspend fun getAuthority(argument: GetAuthorityPlainArgs): GetAuthorityResult =
        getAuthorityResultToKotlin(getAuthorityPlain(argument.toJava()).await())

    /**
     * @see [getAuthority].
     * @param certificateAuthorityId ID of the certificate authority.
     * - - -
     * @param location The location the certificate authority exists in.
     * @param pool The name of the pool the certificate authority belongs to.
     * @param project The ID of the project in which the resource belongs. If it
     * is not provided, the provider project is used.
     * @return A collection of values returned by getAuthority.
     */
    public suspend fun getAuthority(
        certificateAuthorityId: String? = null,
        location: String? = null,
        pool: String? = null,
        project: String? = null,
    ): GetAuthorityResult {
        val argument = GetAuthorityPlainArgs(
            certificateAuthorityId = certificateAuthorityId,
            location = location,
            pool = pool,
            project = project,
        )
        return getAuthorityResultToKotlin(getAuthorityPlain(argument.toJava()).await())
    }

    /**
     * @see [getAuthority].
     * @param argument Builder for [com.pulumi.gcp.certificateauthority.kotlin.inputs.GetAuthorityPlainArgs].
     * @return A collection of values returned by getAuthority.
     */
    public suspend fun getAuthority(argument: suspend GetAuthorityPlainArgsBuilder.() -> Unit): GetAuthorityResult {
        val builder = GetAuthorityPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getAuthorityResultToKotlin(getAuthorityPlain(builtArgument.toJava()).await())
    }

    /**
     * Retrieves the current IAM policy data for capool
     * ## example
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as gcp from "@pulumi/gcp";
     * const policy = gcp.certificateauthority.getCaPoolIamPolicy({
     *     caPool: _default.id,
     * });
     * ```
     * ```python
     * import pulumi
     * import pulumi_gcp as gcp
     * policy = gcp.certificateauthority.get_ca_pool_iam_policy(ca_pool=default["id"])
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Gcp = Pulumi.Gcp;
     * return await Deployment.RunAsync(() =>
     * {
     *     var policy = Gcp.CertificateAuthority.GetCaPoolIamPolicy.Invoke(new()
     *     {
     *         CaPool = @default.Id,
     *     });
     * });
     * ```
     * ```go
     * 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 {
     * 		_, err := certificateauthority.LookupCaPoolIamPolicy(ctx, &certificateauthority.LookupCaPoolIamPolicyArgs{
     * 			CaPool: _default.Id,
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		return nil
     * 	})
     * }
     * ```
     * ```java
     * 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.GetCaPoolIamPolicyArgs;
     * 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 policy = CertificateauthorityFunctions.getCaPoolIamPolicy(GetCaPoolIamPolicyArgs.builder()
     *             .caPool(default_.id())
     *             .build());
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   policy:
     *     fn::invoke:
     *       Function: gcp:certificateauthority:getCaPoolIamPolicy
     *       Arguments:
     *         caPool: ${default.id}
     * ```
     * 
     * @param argument A collection of arguments for invoking getCaPoolIamPolicy.
     * @return A collection of values returned by getCaPoolIamPolicy.
     */
    public suspend fun getCaPoolIamPolicy(argument: GetCaPoolIamPolicyPlainArgs): GetCaPoolIamPolicyResult =
        getCaPoolIamPolicyResultToKotlin(getCaPoolIamPolicyPlain(argument.toJava()).await())

    /**
     * @see [getCaPoolIamPolicy].
     * @param caPool Used to find the parent resource to bind the IAM policy to
     * @param location Location of the CaPool. A full list of valid locations can be found by
     * running `gcloud privateca locations list`.
     * Used to find the parent resource to bind the IAM policy to
     * @param project The ID of the project in which the resource belongs.
     * If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
     * @return A collection of values returned by getCaPoolIamPolicy.
     */
    public suspend fun getCaPoolIamPolicy(
        caPool: String,
        location: String? = null,
        project: String? = null,
    ): GetCaPoolIamPolicyResult {
        val argument = GetCaPoolIamPolicyPlainArgs(
            caPool = caPool,
            location = location,
            project = project,
        )
        return getCaPoolIamPolicyResultToKotlin(getCaPoolIamPolicyPlain(argument.toJava()).await())
    }

    /**
     * @see [getCaPoolIamPolicy].
     * @param argument Builder for [com.pulumi.gcp.certificateauthority.kotlin.inputs.GetCaPoolIamPolicyPlainArgs].
     * @return A collection of values returned by getCaPoolIamPolicy.
     */
    public suspend fun getCaPoolIamPolicy(argument: suspend GetCaPoolIamPolicyPlainArgsBuilder.() -> Unit): GetCaPoolIamPolicyResult {
        val builder = GetCaPoolIamPolicyPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getCaPoolIamPolicyResultToKotlin(getCaPoolIamPolicyPlain(builtArgument.toJava()).await())
    }

    /**
     * Retrieves the current IAM policy data for certificatetemplate
     * ## example
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as gcp from "@pulumi/gcp";
     * const policy = gcp.certificateauthority.getCertificateTemplateIamPolicy({
     *     certificateTemplate: _default.id,
     * });
     * ```
     * ```python
     * import pulumi
     * import pulumi_gcp as gcp
     * policy = gcp.certificateauthority.get_certificate_template_iam_policy(certificate_template=default["id"])
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Gcp = Pulumi.Gcp;
     * return await Deployment.RunAsync(() =>
     * {
     *     var policy = Gcp.CertificateAuthority.GetCertificateTemplateIamPolicy.Invoke(new()
     *     {
     *         CertificateTemplate = @default.Id,
     *     });
     * });
     * ```
     * ```go
     * 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 {
     * 		_, err := certificateauthority.LookupCertificateTemplateIamPolicy(ctx, &certificateauthority.LookupCertificateTemplateIamPolicyArgs{
     * 			CertificateTemplate: _default.Id,
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		return nil
     * 	})
     * }
     * ```
     * ```java
     * 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.GetCertificateTemplateIamPolicyArgs;
     * 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 policy = CertificateauthorityFunctions.getCertificateTemplateIamPolicy(GetCertificateTemplateIamPolicyArgs.builder()
     *             .certificateTemplate(default_.id())
     *             .build());
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   policy:
     *     fn::invoke:
     *       Function: gcp:certificateauthority:getCertificateTemplateIamPolicy
     *       Arguments:
     *         certificateTemplate: ${default.id}
     * ```
     * 
     * @param argument A collection of arguments for invoking getCertificateTemplateIamPolicy.
     * @return A collection of values returned by getCertificateTemplateIamPolicy.
     */
    public suspend fun getCertificateTemplateIamPolicy(argument: GetCertificateTemplateIamPolicyPlainArgs): GetCertificateTemplateIamPolicyResult =
        getCertificateTemplateIamPolicyResultToKotlin(getCertificateTemplateIamPolicyPlain(argument.toJava()).await())

    /**
     * @see [getCertificateTemplateIamPolicy].
     * @param certificateTemplate Used to find the parent resource to bind the IAM policy to
     * @param location
     * @param project The ID of the project in which the resource belongs.
     * If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
     * @return A collection of values returned by getCertificateTemplateIamPolicy.
     */
    public suspend fun getCertificateTemplateIamPolicy(
        certificateTemplate: String,
        location: String? = null,
        project: String? = null,
    ): GetCertificateTemplateIamPolicyResult {
        val argument = GetCertificateTemplateIamPolicyPlainArgs(
            certificateTemplate = certificateTemplate,
            location = location,
            project = project,
        )
        return getCertificateTemplateIamPolicyResultToKotlin(getCertificateTemplateIamPolicyPlain(argument.toJava()).await())
    }

    /**
     * @see [getCertificateTemplateIamPolicy].
     * @param argument Builder for [com.pulumi.gcp.certificateauthority.kotlin.inputs.GetCertificateTemplateIamPolicyPlainArgs].
     * @return A collection of values returned by getCertificateTemplateIamPolicy.
     */
    public suspend fun getCertificateTemplateIamPolicy(argument: suspend GetCertificateTemplateIamPolicyPlainArgsBuilder.() -> Unit): GetCertificateTemplateIamPolicyResult {
        val builder = GetCertificateTemplateIamPolicyPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getCertificateTemplateIamPolicyResultToKotlin(getCertificateTemplateIamPolicyPlain(builtArgument.toJava()).await())
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy