1. Packages
  2. AWS Native
  3. API Docs
  4. cloudtrail
  5. getResourcePolicy

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.106.0 published on Monday, May 20, 2024 by Pulumi

aws-native.cloudtrail.getResourcePolicy

Explore with Pulumi AI

aws-native logo

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.106.0 published on Monday, May 20, 2024 by Pulumi

    Resource Type definition for AWS::CloudTrail::ResourcePolicy

    Using getResourcePolicy

    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 getResourcePolicy(args: GetResourcePolicyArgs, opts?: InvokeOptions): Promise<GetResourcePolicyResult>
    function getResourcePolicyOutput(args: GetResourcePolicyOutputArgs, opts?: InvokeOptions): Output<GetResourcePolicyResult>
    def get_resource_policy(resource_arn: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetResourcePolicyResult
    def get_resource_policy_output(resource_arn: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetResourcePolicyResult]
    func LookupResourcePolicy(ctx *Context, args *LookupResourcePolicyArgs, opts ...InvokeOption) (*LookupResourcePolicyResult, error)
    func LookupResourcePolicyOutput(ctx *Context, args *LookupResourcePolicyOutputArgs, opts ...InvokeOption) LookupResourcePolicyResultOutput

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

    public static class GetResourcePolicy 
    {
        public static Task<GetResourcePolicyResult> InvokeAsync(GetResourcePolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetResourcePolicyResult> Invoke(GetResourcePolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetResourcePolicyResult> getResourcePolicy(GetResourcePolicyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws-native:cloudtrail:getResourcePolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ResourceArn string
    The ARN of the AWS CloudTrail resource to which the policy applies.
    ResourceArn string
    The ARN of the AWS CloudTrail resource to which the policy applies.
    resourceArn String
    The ARN of the AWS CloudTrail resource to which the policy applies.
    resourceArn string
    The ARN of the AWS CloudTrail resource to which the policy applies.
    resource_arn str
    The ARN of the AWS CloudTrail resource to which the policy applies.
    resourceArn String
    The ARN of the AWS CloudTrail resource to which the policy applies.

    getResourcePolicy Result

    The following output properties are available:

    ResourcePolicyValue object

    A policy document containing permissions to add to the specified resource. In IAM, you must provide policy documents in JSON format. However, in CloudFormation you can provide the policy in JSON or YAML format because CloudFormation converts YAML to JSON before submitting it to IAM.

    Search the CloudFormation User Guide for AWS::CloudTrail::ResourcePolicy for more information about the expected schema for this property.

    ResourcePolicy interface{}

    A policy document containing permissions to add to the specified resource. In IAM, you must provide policy documents in JSON format. However, in CloudFormation you can provide the policy in JSON or YAML format because CloudFormation converts YAML to JSON before submitting it to IAM.

    Search the CloudFormation User Guide for AWS::CloudTrail::ResourcePolicy for more information about the expected schema for this property.

    resourcePolicy Object

    A policy document containing permissions to add to the specified resource. In IAM, you must provide policy documents in JSON format. However, in CloudFormation you can provide the policy in JSON or YAML format because CloudFormation converts YAML to JSON before submitting it to IAM.

    Search the CloudFormation User Guide for AWS::CloudTrail::ResourcePolicy for more information about the expected schema for this property.

    resourcePolicy any

    A policy document containing permissions to add to the specified resource. In IAM, you must provide policy documents in JSON format. However, in CloudFormation you can provide the policy in JSON or YAML format because CloudFormation converts YAML to JSON before submitting it to IAM.

    Search the CloudFormation User Guide for AWS::CloudTrail::ResourcePolicy for more information about the expected schema for this property.

    resource_policy Any

    A policy document containing permissions to add to the specified resource. In IAM, you must provide policy documents in JSON format. However, in CloudFormation you can provide the policy in JSON or YAML format because CloudFormation converts YAML to JSON before submitting it to IAM.

    Search the CloudFormation User Guide for AWS::CloudTrail::ResourcePolicy for more information about the expected schema for this property.

    resourcePolicy Any

    A policy document containing permissions to add to the specified resource. In IAM, you must provide policy documents in JSON format. However, in CloudFormation you can provide the policy in JSON or YAML format because CloudFormation converts YAML to JSON before submitting it to IAM.

    Search the CloudFormation User Guide for AWS::CloudTrail::ResourcePolicy for more information about the expected schema for this property.

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    AWS Native is in preview. AWS Classic is fully supported.

    AWS Native v0.106.0 published on Monday, May 20, 2024 by Pulumi