We recommend new projects start with resources from the AWS provider.
aws-native.iam.getGroupPolicy
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
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:
- Group
Name 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: _+=,.@-.
- Policy
Name 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 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: _+=,.@-.
- Policy
Name 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 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: _+=,.@-.
- policy
Name 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 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: _+=,.@-.
- policy
Name 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: _+=,.@-
- group
Name 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: _+=,.@-.
- policy
Name 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:
- Policy
Document 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.- Any printable ASCII character ranging from the space character (
- Policy
Document 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.- Any printable ASCII character ranging from the space character (
- policy
Document 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.- Any printable ASCII character ranging from the space character (
- 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.- Any printable ASCII character ranging from the space character (
- 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.- Any printable ASCII character ranging from the space character (
- 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.- Any printable ASCII character ranging from the space character (
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.