1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. iam
  5. getGroupPolicy

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.9.0 published on Monday, Nov 18, 2024 by Pulumi

aws-native.iam.getGroupPolicy

Explore with Pulumi AI

aws-native logo

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.9.0 published on Monday, Nov 18, 2024 by Pulumi

    Adds or updates an inline policy document that is embedded in the specified IAM group. A group can also have managed policies attached to it. To attach a managed policy to a group, use AWS::IAM::Group. To create a new managed policy, use AWS::IAM::ManagedPolicy. For information about policies, see Managed policies and inline policies in the IAM User Guide. For information about the maximum number of inline policies that you can embed in a group, see IAM and quotas in the IAM User Guide.

    Using getGroupPolicy

    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 getGroupPolicy(args: GetGroupPolicyArgs, opts?: InvokeOptions): Promise<GetGroupPolicyResult>
    function getGroupPolicyOutput(args: GetGroupPolicyOutputArgs, opts?: InvokeOptions): Output<GetGroupPolicyResult>
    def get_group_policy(group_name: Optional[str] = None,
                         policy_name: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetGroupPolicyResult
    def get_group_policy_output(group_name: Optional[pulumi.Input[str]] = None,
                         policy_name: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetGroupPolicyResult]
    func LookupGroupPolicy(ctx *Context, args *LookupGroupPolicyArgs, opts ...InvokeOption) (*LookupGroupPolicyResult, error)
    func LookupGroupPolicyOutput(ctx *Context, args *LookupGroupPolicyOutputArgs, opts ...InvokeOption) LookupGroupPolicyResultOutput

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

    public static class GetGroupPolicy 
    {
        public static Task<GetGroupPolicyResult> InvokeAsync(GetGroupPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetGroupPolicyResult> Invoke(GetGroupPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetGroupPolicyResult> getGroupPolicy(GetGroupPolicyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws-native:iam:getGroupPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    GroupName string
    The name of the group to associate the policy with. This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-.
    PolicyName string
    The name of the policy document. This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-
    GroupName string
    The name of the group to associate the policy with. This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-.
    PolicyName string
    The name of the policy document. This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-
    groupName String
    The name of the group to associate the policy with. This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-.
    policyName String
    The name of the policy document. This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-
    groupName string
    The name of the group to associate the policy with. This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-.
    policyName string
    The name of the policy document. This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-
    group_name str
    The name of the group to associate the policy with. This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-.
    policy_name str
    The name of the policy document. This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-
    groupName String
    The name of the group to associate the policy with. This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-.
    policyName String
    The name of the policy document. This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-

    getGroupPolicy Result

    The following output properties are available:

    PolicyDocument object

    The policy document. You must provide policies in JSON format in IAM. However, for CFN templates formatted in YAML, you can provide the policy in JSON or YAML format. CFN always converts a YAML policy to JSON format before submitting it to IAM. The regex pattern used to validate this parameter is a string of characters consisting of the following:

    • Any printable ASCII character ranging from the space character (\u0020) through the end of the ASCII character range
    • The printable characters in the Basic Latin and Latin-1 Supplement character set (through \u00FF)
    • The special characters tab (\u0009), line feed (\u000A), and carriage return (\u000D)

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

    PolicyDocument interface{}

    The policy document. You must provide policies in JSON format in IAM. However, for CFN templates formatted in YAML, you can provide the policy in JSON or YAML format. CFN always converts a YAML policy to JSON format before submitting it to IAM. The regex pattern used to validate this parameter is a string of characters consisting of the following:

    • Any printable ASCII character ranging from the space character (\u0020) through the end of the ASCII character range
    • The printable characters in the Basic Latin and Latin-1 Supplement character set (through \u00FF)
    • The special characters tab (\u0009), line feed (\u000A), and carriage return (\u000D)

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

    policyDocument Object

    The policy document. You must provide policies in JSON format in IAM. However, for CFN templates formatted in YAML, you can provide the policy in JSON or YAML format. CFN always converts a YAML policy to JSON format before submitting it to IAM. The regex pattern used to validate this parameter is a string of characters consisting of the following:

    • Any printable ASCII character ranging from the space character (\u0020) through the end of the ASCII character range
    • The printable characters in the Basic Latin and Latin-1 Supplement character set (through \u00FF)
    • The special characters tab (\u0009), line feed (\u000A), and carriage return (\u000D)

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

    policyDocument any

    The policy document. You must provide policies in JSON format in IAM. However, for CFN templates formatted in YAML, you can provide the policy in JSON or YAML format. CFN always converts a YAML policy to JSON format before submitting it to IAM. The regex pattern used to validate this parameter is a string of characters consisting of the following:

    • Any printable ASCII character ranging from the space character (\u0020) through the end of the ASCII character range
    • The printable characters in the Basic Latin and Latin-1 Supplement character set (through \u00FF)
    • The special characters tab (\u0009), line feed (\u000A), and carriage return (\u000D)

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

    policy_document Any

    The policy document. You must provide policies in JSON format in IAM. However, for CFN templates formatted in YAML, you can provide the policy in JSON or YAML format. CFN always converts a YAML policy to JSON format before submitting it to IAM. The regex pattern used to validate this parameter is a string of characters consisting of the following:

    • Any printable ASCII character ranging from the space character (\u0020) through the end of the ASCII character range
    • The printable characters in the Basic Latin and Latin-1 Supplement character set (through \u00FF)
    • The special characters tab (\u0009), line feed (\u000A), and carriage return (\u000D)

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

    policyDocument Any

    The policy document. You must provide policies in JSON format in IAM. However, for CFN templates formatted in YAML, you can provide the policy in JSON or YAML format. CFN always converts a YAML policy to JSON format before submitting it to IAM. The regex pattern used to validate this parameter is a string of characters consisting of the following:

    • Any printable ASCII character ranging from the space character (\u0020) through the end of the ASCII character range
    • The printable characters in the Basic Latin and Latin-1 Supplement character set (through \u00FF)
    • The special characters tab (\u0009), line feed (\u000A), and carriage return (\u000D)

    Search the CloudFormation User Guide for AWS::IAM::GroupPolicy 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

    We recommend new projects start with resources from the AWS provider.

    AWS Cloud Control v1.9.0 published on Monday, Nov 18, 2024 by Pulumi