Google Cloud Classic v8.3.1 published on Wednesday, Sep 25, 2024 by Pulumi
gcp.kms.getKeyRingIamPolicy
Explore with Pulumi AI
Retrieves the current IAM policy data for a Google Cloud KMS key ring.
example
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const testKeyRingIamPolicy = gcp.kms.getKeyRingIamPolicy({
keyRingId: "{project_id}/{location_name}/{key_ring_name}",
});
import pulumi
import pulumi_gcp as gcp
test_key_ring_iam_policy = gcp.kms.get_key_ring_iam_policy(key_ring_id="{project_id}/{location_name}/{key_ring_name}")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/kms"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := kms.GetKeyRingIamPolicy(ctx, &kms.GetKeyRingIamPolicyArgs{
KeyRingId: "{project_id}/{location_name}/{key_ring_name}",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var testKeyRingIamPolicy = Gcp.Kms.GetKeyRingIamPolicy.Invoke(new()
{
KeyRingId = "{project_id}/{location_name}/{key_ring_name}",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.kms.KmsFunctions;
import com.pulumi.gcp.kms.inputs.GetKeyRingIamPolicyArgs;
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 testKeyRingIamPolicy = KmsFunctions.getKeyRingIamPolicy(GetKeyRingIamPolicyArgs.builder()
.keyRingId("{project_id}/{location_name}/{key_ring_name}")
.build());
}
}
variables:
testKeyRingIamPolicy:
fn::invoke:
Function: gcp:kms:getKeyRingIamPolicy
Arguments:
keyRingId: '{project_id}/{location_name}/{key_ring_name}'
Using getKeyRingIamPolicy
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 getKeyRingIamPolicy(args: GetKeyRingIamPolicyArgs, opts?: InvokeOptions): Promise<GetKeyRingIamPolicyResult>
function getKeyRingIamPolicyOutput(args: GetKeyRingIamPolicyOutputArgs, opts?: InvokeOptions): Output<GetKeyRingIamPolicyResult>
def get_key_ring_iam_policy(key_ring_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetKeyRingIamPolicyResult
def get_key_ring_iam_policy_output(key_ring_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetKeyRingIamPolicyResult]
func GetKeyRingIamPolicy(ctx *Context, args *GetKeyRingIamPolicyArgs, opts ...InvokeOption) (*GetKeyRingIamPolicyResult, error)
func GetKeyRingIamPolicyOutput(ctx *Context, args *GetKeyRingIamPolicyOutputArgs, opts ...InvokeOption) GetKeyRingIamPolicyResultOutput
> Note: This function is named GetKeyRingIamPolicy
in the Go SDK.
public static class GetKeyRingIamPolicy
{
public static Task<GetKeyRingIamPolicyResult> InvokeAsync(GetKeyRingIamPolicyArgs args, InvokeOptions? opts = null)
public static Output<GetKeyRingIamPolicyResult> Invoke(GetKeyRingIamPolicyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetKeyRingIamPolicyResult> getKeyRingIamPolicy(GetKeyRingIamPolicyArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: gcp:kms/getKeyRingIamPolicy:getKeyRingIamPolicy
arguments:
# arguments dictionary
The following arguments are supported:
- Key
Ring stringId - The key ring ID, in the form
{project_id}/{location_name}/{key_ring_name}
or{location_name}/{key_ring_name}
. In the second form, the provider's project setting will be used as a fallback.
- Key
Ring stringId - The key ring ID, in the form
{project_id}/{location_name}/{key_ring_name}
or{location_name}/{key_ring_name}
. In the second form, the provider's project setting will be used as a fallback.
- key
Ring StringId - The key ring ID, in the form
{project_id}/{location_name}/{key_ring_name}
or{location_name}/{key_ring_name}
. In the second form, the provider's project setting will be used as a fallback.
- key
Ring stringId - The key ring ID, in the form
{project_id}/{location_name}/{key_ring_name}
or{location_name}/{key_ring_name}
. In the second form, the provider's project setting will be used as a fallback.
- key_
ring_ strid - The key ring ID, in the form
{project_id}/{location_name}/{key_ring_name}
or{location_name}/{key_ring_name}
. In the second form, the provider's project setting will be used as a fallback.
- key
Ring StringId - The key ring ID, in the form
{project_id}/{location_name}/{key_ring_name}
or{location_name}/{key_ring_name}
. In the second form, the provider's project setting will be used as a fallback.
getKeyRingIamPolicy Result
The following output properties are available:
- Etag string
- (Computed) The etag of the IAM policy.
- Id string
- The provider-assigned unique ID for this managed resource.
- Key
Ring stringId - Policy
Data string - (Computed) The policy data
- Etag string
- (Computed) The etag of the IAM policy.
- Id string
- The provider-assigned unique ID for this managed resource.
- Key
Ring stringId - Policy
Data string - (Computed) The policy data
- etag String
- (Computed) The etag of the IAM policy.
- id String
- The provider-assigned unique ID for this managed resource.
- key
Ring StringId - policy
Data String - (Computed) The policy data
- etag string
- (Computed) The etag of the IAM policy.
- id string
- The provider-assigned unique ID for this managed resource.
- key
Ring stringId - policy
Data string - (Computed) The policy data
- etag str
- (Computed) The etag of the IAM policy.
- id str
- The provider-assigned unique ID for this managed resource.
- key_
ring_ strid - policy_
data str - (Computed) The policy data
- etag String
- (Computed) The etag of the IAM policy.
- id String
- The provider-assigned unique ID for this managed resource.
- key
Ring StringId - policy
Data String - (Computed) The policy data
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.