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

com.pulumi.gcp.clouddeploy.kotlin.ClouddeployFunctions.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.clouddeploy.kotlin

import com.pulumi.gcp.clouddeploy.ClouddeployFunctions.getCustomTargetTypeIamPolicyPlain
import com.pulumi.gcp.clouddeploy.ClouddeployFunctions.getDeliveryPipelineIamPolicyPlain
import com.pulumi.gcp.clouddeploy.ClouddeployFunctions.getTargetIamPolicyPlain
import com.pulumi.gcp.clouddeploy.kotlin.inputs.GetCustomTargetTypeIamPolicyPlainArgs
import com.pulumi.gcp.clouddeploy.kotlin.inputs.GetCustomTargetTypeIamPolicyPlainArgsBuilder
import com.pulumi.gcp.clouddeploy.kotlin.inputs.GetDeliveryPipelineIamPolicyPlainArgs
import com.pulumi.gcp.clouddeploy.kotlin.inputs.GetDeliveryPipelineIamPolicyPlainArgsBuilder
import com.pulumi.gcp.clouddeploy.kotlin.inputs.GetTargetIamPolicyPlainArgs
import com.pulumi.gcp.clouddeploy.kotlin.inputs.GetTargetIamPolicyPlainArgsBuilder
import com.pulumi.gcp.clouddeploy.kotlin.outputs.GetCustomTargetTypeIamPolicyResult
import com.pulumi.gcp.clouddeploy.kotlin.outputs.GetDeliveryPipelineIamPolicyResult
import com.pulumi.gcp.clouddeploy.kotlin.outputs.GetTargetIamPolicyResult
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.gcp.clouddeploy.kotlin.outputs.GetCustomTargetTypeIamPolicyResult.Companion.toKotlin as getCustomTargetTypeIamPolicyResultToKotlin
import com.pulumi.gcp.clouddeploy.kotlin.outputs.GetDeliveryPipelineIamPolicyResult.Companion.toKotlin as getDeliveryPipelineIamPolicyResultToKotlin
import com.pulumi.gcp.clouddeploy.kotlin.outputs.GetTargetIamPolicyResult.Companion.toKotlin as getTargetIamPolicyResultToKotlin

public object ClouddeployFunctions {
    /**
     * Retrieves the current IAM policy data for customtargettype
     * ## example
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as gcp from "@pulumi/gcp";
     * const policy = gcp.clouddeploy.getCustomTargetTypeIamPolicy({
     *     project: custom_target_type.project,
     *     location: custom_target_type.location,
     *     name: custom_target_type.name,
     * });
     * ```
     * ```python
     * import pulumi
     * import pulumi_gcp as gcp
     * policy = gcp.clouddeploy.get_custom_target_type_iam_policy(project=custom_target_type["project"],
     *     location=custom_target_type["location"],
     *     name=custom_target_type["name"])
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Gcp = Pulumi.Gcp;
     * return await Deployment.RunAsync(() =>
     * {
     *     var policy = Gcp.CloudDeploy.GetCustomTargetTypeIamPolicy.Invoke(new()
     *     {
     *         Project = custom_target_type.Project,
     *         Location = custom_target_type.Location,
     *         Name = custom_target_type.Name,
     *     });
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/clouddeploy"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		_, err := clouddeploy.LookupCustomTargetTypeIamPolicy(ctx, &clouddeploy.LookupCustomTargetTypeIamPolicyArgs{
     * 			Project:  pulumi.StringRef(custom_target_type.Project),
     * 			Location: pulumi.StringRef(custom_target_type.Location),
     * 			Name:     custom_target_type.Name,
     * 		}, 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.clouddeploy.ClouddeployFunctions;
     * import com.pulumi.gcp.clouddeploy.inputs.GetCustomTargetTypeIamPolicyArgs;
     * 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 = ClouddeployFunctions.getCustomTargetTypeIamPolicy(GetCustomTargetTypeIamPolicyArgs.builder()
     *             .project(custom_target_type.project())
     *             .location(custom_target_type.location())
     *             .name(custom_target_type.name())
     *             .build());
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   policy:
     *     fn::invoke:
     *       Function: gcp:clouddeploy:getCustomTargetTypeIamPolicy
     *       Arguments:
     *         project: ${["custom-target-type"].project}
     *         location: ${["custom-target-type"].location}
     *         name: ${["custom-target-type"].name}
     * ```
     * 
     * @param argument A collection of arguments for invoking getCustomTargetTypeIamPolicy.
     * @return A collection of values returned by getCustomTargetTypeIamPolicy.
     */
    public suspend fun getCustomTargetTypeIamPolicy(argument: GetCustomTargetTypeIamPolicyPlainArgs): GetCustomTargetTypeIamPolicyResult =
        getCustomTargetTypeIamPolicyResultToKotlin(getCustomTargetTypeIamPolicyPlain(argument.toJava()).await())

    /**
     * @see [getCustomTargetTypeIamPolicy].
     * @param location The location of the source. Used to find the parent resource to bind the IAM policy to
     * @param name 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 getCustomTargetTypeIamPolicy.
     */
    public suspend fun getCustomTargetTypeIamPolicy(
        location: String? = null,
        name: String,
        project: String? = null,
    ): GetCustomTargetTypeIamPolicyResult {
        val argument = GetCustomTargetTypeIamPolicyPlainArgs(
            location = location,
            name = name,
            project = project,
        )
        return getCustomTargetTypeIamPolicyResultToKotlin(getCustomTargetTypeIamPolicyPlain(argument.toJava()).await())
    }

    /**
     * @see [getCustomTargetTypeIamPolicy].
     * @param argument Builder for [com.pulumi.gcp.clouddeploy.kotlin.inputs.GetCustomTargetTypeIamPolicyPlainArgs].
     * @return A collection of values returned by getCustomTargetTypeIamPolicy.
     */
    public suspend fun getCustomTargetTypeIamPolicy(argument: suspend GetCustomTargetTypeIamPolicyPlainArgsBuilder.() -> Unit): GetCustomTargetTypeIamPolicyResult {
        val builder = GetCustomTargetTypeIamPolicyPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getCustomTargetTypeIamPolicyResultToKotlin(getCustomTargetTypeIamPolicyPlain(builtArgument.toJava()).await())
    }

    /**
     * Retrieves the current IAM policy data for deliverypipeline
     * ## example
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as gcp from "@pulumi/gcp";
     * const policy = gcp.clouddeploy.getDeliveryPipelineIamPolicy({
     *     project: _default.project,
     *     location: _default.location,
     *     name: _default.name,
     * });
     * ```
     * ```python
     * import pulumi
     * import pulumi_gcp as gcp
     * policy = gcp.clouddeploy.get_delivery_pipeline_iam_policy(project=default["project"],
     *     location=default["location"],
     *     name=default["name"])
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Gcp = Pulumi.Gcp;
     * return await Deployment.RunAsync(() =>
     * {
     *     var policy = Gcp.CloudDeploy.GetDeliveryPipelineIamPolicy.Invoke(new()
     *     {
     *         Project = @default.Project,
     *         Location = @default.Location,
     *         Name = @default.Name,
     *     });
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/clouddeploy"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		_, err := clouddeploy.LookupDeliveryPipelineIamPolicy(ctx, &clouddeploy.LookupDeliveryPipelineIamPolicyArgs{
     * 			Project:  pulumi.StringRef(_default.Project),
     * 			Location: pulumi.StringRef(_default.Location),
     * 			Name:     _default.Name,
     * 		}, 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.clouddeploy.ClouddeployFunctions;
     * import com.pulumi.gcp.clouddeploy.inputs.GetDeliveryPipelineIamPolicyArgs;
     * 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 = ClouddeployFunctions.getDeliveryPipelineIamPolicy(GetDeliveryPipelineIamPolicyArgs.builder()
     *             .project(default_.project())
     *             .location(default_.location())
     *             .name(default_.name())
     *             .build());
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   policy:
     *     fn::invoke:
     *       Function: gcp:clouddeploy:getDeliveryPipelineIamPolicy
     *       Arguments:
     *         project: ${default.project}
     *         location: ${default.location}
     *         name: ${default.name}
     * ```
     * 
     * @param argument A collection of arguments for invoking getDeliveryPipelineIamPolicy.
     * @return A collection of values returned by getDeliveryPipelineIamPolicy.
     */
    public suspend fun getDeliveryPipelineIamPolicy(argument: GetDeliveryPipelineIamPolicyPlainArgs): GetDeliveryPipelineIamPolicyResult =
        getDeliveryPipelineIamPolicyResultToKotlin(getDeliveryPipelineIamPolicyPlain(argument.toJava()).await())

    /**
     * @see [getDeliveryPipelineIamPolicy].
     * @param location
     * @param name 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 getDeliveryPipelineIamPolicy.
     */
    public suspend fun getDeliveryPipelineIamPolicy(
        location: String? = null,
        name: String,
        project: String? = null,
    ): GetDeliveryPipelineIamPolicyResult {
        val argument = GetDeliveryPipelineIamPolicyPlainArgs(
            location = location,
            name = name,
            project = project,
        )
        return getDeliveryPipelineIamPolicyResultToKotlin(getDeliveryPipelineIamPolicyPlain(argument.toJava()).await())
    }

    /**
     * @see [getDeliveryPipelineIamPolicy].
     * @param argument Builder for [com.pulumi.gcp.clouddeploy.kotlin.inputs.GetDeliveryPipelineIamPolicyPlainArgs].
     * @return A collection of values returned by getDeliveryPipelineIamPolicy.
     */
    public suspend fun getDeliveryPipelineIamPolicy(argument: suspend GetDeliveryPipelineIamPolicyPlainArgsBuilder.() -> Unit): GetDeliveryPipelineIamPolicyResult {
        val builder = GetDeliveryPipelineIamPolicyPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getDeliveryPipelineIamPolicyResultToKotlin(getDeliveryPipelineIamPolicyPlain(builtArgument.toJava()).await())
    }

    /**
     * Retrieves the current IAM policy data for target
     * ## example
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as gcp from "@pulumi/gcp";
     * const policy = gcp.clouddeploy.getTargetIamPolicy({
     *     project: _default.project,
     *     location: _default.location,
     *     name: _default.name,
     * });
     * ```
     * ```python
     * import pulumi
     * import pulumi_gcp as gcp
     * policy = gcp.clouddeploy.get_target_iam_policy(project=default["project"],
     *     location=default["location"],
     *     name=default["name"])
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Gcp = Pulumi.Gcp;
     * return await Deployment.RunAsync(() =>
     * {
     *     var policy = Gcp.CloudDeploy.GetTargetIamPolicy.Invoke(new()
     *     {
     *         Project = @default.Project,
     *         Location = @default.Location,
     *         Name = @default.Name,
     *     });
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/clouddeploy"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		_, err := clouddeploy.LookupTargetIamPolicy(ctx, &clouddeploy.LookupTargetIamPolicyArgs{
     * 			Project:  pulumi.StringRef(_default.Project),
     * 			Location: pulumi.StringRef(_default.Location),
     * 			Name:     _default.Name,
     * 		}, 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.clouddeploy.ClouddeployFunctions;
     * import com.pulumi.gcp.clouddeploy.inputs.GetTargetIamPolicyArgs;
     * 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 = ClouddeployFunctions.getTargetIamPolicy(GetTargetIamPolicyArgs.builder()
     *             .project(default_.project())
     *             .location(default_.location())
     *             .name(default_.name())
     *             .build());
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   policy:
     *     fn::invoke:
     *       Function: gcp:clouddeploy:getTargetIamPolicy
     *       Arguments:
     *         project: ${default.project}
     *         location: ${default.location}
     *         name: ${default.name}
     * ```
     * 
     * @param argument A collection of arguments for invoking getTargetIamPolicy.
     * @return A collection of values returned by getTargetIamPolicy.
     */
    public suspend fun getTargetIamPolicy(argument: GetTargetIamPolicyPlainArgs): GetTargetIamPolicyResult =
        getTargetIamPolicyResultToKotlin(getTargetIamPolicyPlain(argument.toJava()).await())

    /**
     * @see [getTargetIamPolicy].
     * @param location
     * @param name 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 getTargetIamPolicy.
     */
    public suspend fun getTargetIamPolicy(
        location: String? = null,
        name: String,
        project: String? = null,
    ): GetTargetIamPolicyResult {
        val argument = GetTargetIamPolicyPlainArgs(
            location = location,
            name = name,
            project = project,
        )
        return getTargetIamPolicyResultToKotlin(getTargetIamPolicyPlain(argument.toJava()).await())
    }

    /**
     * @see [getTargetIamPolicy].
     * @param argument Builder for [com.pulumi.gcp.clouddeploy.kotlin.inputs.GetTargetIamPolicyPlainArgs].
     * @return A collection of values returned by getTargetIamPolicy.
     */
    public suspend fun getTargetIamPolicy(argument: suspend GetTargetIamPolicyPlainArgsBuilder.() -> Unit): GetTargetIamPolicyResult {
        val builder = GetTargetIamPolicyPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getTargetIamPolicyResultToKotlin(getTargetIamPolicyPlain(builtArgument.toJava()).await())
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy