com.pulumi.gcp.accesscontextmanager.kotlin.AccesscontextmanagerFunctions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.accesscontextmanager.kotlin
import com.pulumi.gcp.accesscontextmanager.AccesscontextmanagerFunctions.getAccessPolicyIamPolicyPlain
import com.pulumi.gcp.accesscontextmanager.kotlin.inputs.GetAccessPolicyIamPolicyPlainArgs
import com.pulumi.gcp.accesscontextmanager.kotlin.inputs.GetAccessPolicyIamPolicyPlainArgsBuilder
import com.pulumi.gcp.accesscontextmanager.kotlin.outputs.GetAccessPolicyIamPolicyResult
import com.pulumi.gcp.accesscontextmanager.kotlin.outputs.GetAccessPolicyIamPolicyResult.Companion.toKotlin
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
public object AccesscontextmanagerFunctions {
/**
* Retrieves the current IAM policy data for accesspolicy
* ## example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const policy = gcp.accesscontextmanager.getAccessPolicyIamPolicy({
* name: access_policy.name,
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* policy = gcp.accesscontextmanager.get_access_policy_iam_policy(name=access_policy["name"])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var policy = Gcp.AccessContextManager.GetAccessPolicyIamPolicy.Invoke(new()
* {
* Name = access_policy.Name,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/accesscontextmanager"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := accesscontextmanager.LookupAccessPolicyIamPolicy(ctx, &accesscontextmanager.LookupAccessPolicyIamPolicyArgs{
* Name: access_policy.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.accesscontextmanager.AccesscontextmanagerFunctions;
* import com.pulumi.gcp.accesscontextmanager.inputs.GetAccessPolicyIamPolicyArgs;
* 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 = AccesscontextmanagerFunctions.getAccessPolicyIamPolicy(GetAccessPolicyIamPolicyArgs.builder()
* .name(access_policy.name())
* .build());
* }
* }
* ```
* ```yaml
* variables:
* policy:
* fn::invoke:
* Function: gcp:accesscontextmanager:getAccessPolicyIamPolicy
* Arguments:
* name: ${["access-policy"].name}
* ```
*
* @param argument A collection of arguments for invoking getAccessPolicyIamPolicy.
* @return A collection of values returned by getAccessPolicyIamPolicy.
*/
public suspend fun getAccessPolicyIamPolicy(argument: GetAccessPolicyIamPolicyPlainArgs): GetAccessPolicyIamPolicyResult =
toKotlin(getAccessPolicyIamPolicyPlain(argument.toJava()).await())
/**
* @see [getAccessPolicyIamPolicy].
* @param name Used to find the parent resource to bind the IAM policy to
* @return A collection of values returned by getAccessPolicyIamPolicy.
*/
public suspend fun getAccessPolicyIamPolicy(name: String): GetAccessPolicyIamPolicyResult {
val argument = GetAccessPolicyIamPolicyPlainArgs(
name = name,
)
return toKotlin(getAccessPolicyIamPolicyPlain(argument.toJava()).await())
}
/**
* @see [getAccessPolicyIamPolicy].
* @param argument Builder for [com.pulumi.gcp.accesscontextmanager.kotlin.inputs.GetAccessPolicyIamPolicyPlainArgs].
* @return A collection of values returned by getAccessPolicyIamPolicy.
*/
public suspend fun getAccessPolicyIamPolicy(argument: suspend GetAccessPolicyIamPolicyPlainArgsBuilder.() -> Unit): GetAccessPolicyIamPolicyResult {
val builder = GetAccessPolicyIamPolicyPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return toKotlin(getAccessPolicyIamPolicyPlain(builtArgument.toJava()).await())
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy