Amazon IAM Iam Group Policy API

The Iam Group Policy API from Amazon IAM — 6 operation(s) for iam group policy.

GitHub OpenAPI
Business capability
Identity & Access Management BC-620.20

Operations 6

POST /?Action=AttachGroupPolicy Attach Group Policy #
POST /?Action=DeleteGroupPolicy Delete Group Policy #
POST /?Action=DetachGroupPolicy Detach Group Policy #
POST /?Action=GetGroupPolicy Get Group Policy #
POST /?Action=ListGroupPolicies List Group Policies #
POST /?Action=PutGroupPolicy Put Group Policy #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/amazon-iam:amazon-iam-group-policy-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

amazon-iam-group-policy-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: AWS Identity and Access Management Group Policy API
  version: '2010-05-08'
  description: Generated from AWS's published Smithy model for AWS Identity and Access Management. 6 operation(s).
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/contact-us/
  license:
    name: Apache 2.0
    identifier: Apache-2.0
    url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://iam.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /?Action=AttachGroupPolicy:
    post:
      operationId: AttachGroupPolicy
      summary: Attach Group Policy
      description: Attaches the specified managed policy to the specified IAM group. You use this operation to attach a managed
        policy to a group. To embed an inline policy in a group, use PutGroupPolicy . As a best practice, you can validate
        your IAM policies. To learn more, see Validating IAM policies in the IAM User Guide. For more information about policies,
        see Managed policies and inline policies in the IAM User Guide.
      responses:
        '200':
          description: Success
          content:
            text/xml:
              schema:
                type: string
        '400':
          description: InvalidInputException; PolicyNotAttachableException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/InvalidInputException'
        '409':
          description: LimitExceededException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/LimitExceededException'
        '404':
          description: NoSuchEntityException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/NoSuchEntityException'
        '500':
          description: ServiceFailureException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/ServiceFailureException'
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
              - type: object
                required:
                - Action
                - Version
                properties:
                  Action:
                    type: string
                    const: AttachGroupPolicy
                  Version:
                    type: string
                    const: '2010-05-08'
              - $ref: '#/components/schemas/AttachGroupPolicyRequest'
            example:
              GroupName: Finance
              PolicyArn: arn:aws:iam::aws:policy/ReadOnlyAccess
      tags:
      - Group Policy
  /?Action=DeleteGroupPolicy:
    post:
      operationId: DeleteGroupPolicy
      summary: Delete Group Policy
      description: Deletes the specified inline policy that is embedded in the specified IAM group. A group can also have
        managed policies attached to it. To detach a managed policy from a group, use DetachGroupPolicy. For more information
        about policies, refer to Managed policies and inline policies in the IAM User Guide.
      responses:
        '200':
          description: Success
          content:
            text/xml:
              schema:
                type: string
        '409':
          description: LimitExceededException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/LimitExceededException'
        '404':
          description: NoSuchEntityException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/NoSuchEntityException'
        '500':
          description: ServiceFailureException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/ServiceFailureException'
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
              - type: object
                required:
                - Action
                - Version
                properties:
                  Action:
                    type: string
                    const: DeleteGroupPolicy
                  Version:
                    type: string
                    const: '2010-05-08'
              - $ref: '#/components/schemas/DeleteGroupPolicyRequest'
            example:
              GroupName: Admins
              PolicyName: ExamplePolicy
      tags:
      - Group Policy
  /?Action=DetachGroupPolicy:
    post:
      operationId: DetachGroupPolicy
      summary: Detach Group Policy
      description: Removes the specified managed policy from the specified IAM group. A group can also have inline policies
        embedded with it. To delete an inline policy, use DeleteGroupPolicy. For information about policies, see Managed policies
        and inline policies in the IAM User Guide.
      responses:
        '200':
          description: Success
          content:
            text/xml:
              schema:
                type: string
        '400':
          description: InvalidInputException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/InvalidInputException'
        '409':
          description: LimitExceededException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/LimitExceededException'
        '404':
          description: NoSuchEntityException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/NoSuchEntityException'
        '500':
          description: ServiceFailureException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/ServiceFailureException'
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
              - type: object
                required:
                - Action
                - Version
                properties:
                  Action:
                    type: string
                    const: DetachGroupPolicy
                  Version:
                    type: string
                    const: '2010-05-08'
              - $ref: '#/components/schemas/DetachGroupPolicyRequest'
      tags:
      - Group Policy
  /?Action=GetGroupPolicy:
    post:
      operationId: GetGroupPolicy
      summary: Get Group Policy
      description: Retrieves the specified inline policy document that is embedded in the specified IAM group. Policies returned
        by this operation are URL-encoded compliant with RFC 3986. You can use a URL decoding method to convert the policy
        back to plain JSON text. For example, if you use Java, you can use the decode method of the java.net.URLDecoder utility
        class in the Java SDK. Other languages and SDKs provide similar functionality, and some SDKs do this decoding automatically.
        An IAM group can also have managed policies attached to it. To retrieve a managed policy document that is attached
        to a group, use GetPolicy to determine the policy's default version, then use GetPolicyVersion to retrieve the policy
        document. For more information about policies, see Managed policies and inline policies in the IAM User Guide.
      responses:
        '200':
          description: Success
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/GetGroupPolicyResponse'
        '404':
          description: NoSuchEntityException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/NoSuchEntityException'
        '500':
          description: ServiceFailureException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/ServiceFailureException'
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
              - type: object
                required:
                - Action
                - Version
                properties:
                  Action:
                    type: string
                    const: GetGroupPolicy
                  Version:
                    type: string
                    const: '2010-05-08'
              - $ref: '#/components/schemas/GetGroupPolicyRequest'
      tags:
      - Group Policy
  /?Action=ListGroupPolicies:
    post:
      operationId: ListGroupPolicies
      summary: List Group Policies
      description: Lists the names of the inline policies that are embedded in the specified IAM group. An IAM group can also
        have managed policies attached to it. To list the managed policies that are attached to a group, use ListAttachedGroupPolicies.
        For more information about policies, see Managed policies and inline policies in the IAM User Guide. You can paginate
        the results using the MaxItems and Marker parameters. If there are no inline policies embedded with the specified
        group, the operation returns an empty list.
      responses:
        '200':
          description: Success
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/ListGroupPoliciesResponse'
              example:
                PolicyNames:
                - AdminRoot
                - KeyPolicy
        '404':
          description: NoSuchEntityException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/NoSuchEntityException'
        '500':
          description: ServiceFailureException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/ServiceFailureException'
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
              - type: object
                required:
                - Action
                - Version
                properties:
                  Action:
                    type: string
                    const: ListGroupPolicies
                  Version:
                    type: string
                    const: '2010-05-08'
              - $ref: '#/components/schemas/ListGroupPoliciesRequest'
            example:
              GroupName: Admins
      tags:
      - Group Policy
  /?Action=PutGroupPolicy:
    post:
      operationId: PutGroupPolicy
      summary: Put Group Policy
      description: Adds or updates an inline policy document that is embedded in the specified IAM group. A user can also
        have managed policies attached to it. To attach a managed policy to a group, use AttachGroupPolicy . To create a new
        managed policy, use CreatePolicy . 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 STS quotas in the IAM User Guide. Because policy documents can be large, you should use POST rather than GET when
        calling PutGroupPolicy. For general information about using the Query API with IAM, see Making query requests in the
        IAM User Guide.
      responses:
        '200':
          description: Success
          content:
            text/xml:
              schema:
                type: string
        '409':
          description: LimitExceededException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/LimitExceededException'
        '400':
          description: MalformedPolicyDocumentException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/MalformedPolicyDocumentException'
        '404':
          description: NoSuchEntityException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/NoSuchEntityException'
        '500':
          description: ServiceFailureException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/ServiceFailureException'
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
              - type: object
                required:
                - Action
                - Version
                properties:
                  Action:
                    type: string
                    const: PutGroupPolicy
                  Version:
                    type: string
                    const: '2010-05-08'
              - $ref: '#/components/schemas/PutGroupPolicyRequest'
            example:
              GroupName: PowerUsers
              PolicyName: IAMReadAccess
              PolicyDocument: '{"Version":"2012-10-17","Statement":{"Effect":"Allow","Action":["iam:Get*","iam:List*","iam:Generate*"],"Resource":"*"}}'
      tags:
      - Group Policy
components:
  securitySchemes:
    sigv4:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical
        request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
      x-aws-sigv4:
        signingName: iam
  schemas:
    AttachGroupPolicyRequest:
      type: object
      properties:
        GroupName:
          type: string
          description: 'The name (friendly name, not ARN) of the group to attach the policy to. 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: _+=,.@-'
        PolicyArn:
          type: string
          description: The Amazon Resource Name (ARN) of the IAM policy you want to attach. For more information about ARNs,
            see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.
      required:
      - GroupName
      - PolicyArn
    DeleteGroupPolicyRequest:
      type: object
      properties:
        GroupName:
          type: string
          description: 'The name (friendly name, not ARN) identifying the group that the policy is embedded in. 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:
          type: string
          description: 'The name identifying the policy document to delete. 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: _+=,.@-'
      required:
      - GroupName
      - PolicyName
    DetachGroupPolicyRequest:
      type: object
      properties:
        GroupName:
          type: string
          description: 'The name (friendly name, not ARN) of the IAM group to detach the policy from. 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: _+=,.@-'
        PolicyArn:
          type: string
          description: The Amazon Resource Name (ARN) of the IAM policy you want to detach. For more information about ARNs,
            see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.
      required:
      - GroupName
      - PolicyArn
    GetGroupPolicyRequest:
      type: object
      properties:
        GroupName:
          type: string
          description: 'The name of the group the policy is associated 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:
          type: string
          description: 'The name of the policy document to get. 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: _+=,.@-'
      required:
      - GroupName
      - PolicyName
    GetGroupPolicyResponse:
      type: object
      properties:
        GroupName:
          type: string
          description: The group the policy is associated with.
        PolicyName:
          type: string
          description: The name of the policy.
        PolicyDocument:
          type: string
          description: The policy document. IAM stores policies in JSON format. However, resources that were created using
            CloudFormation templates can be formatted in YAML. CloudFormation always converts a YAML policy to JSON format
            before submitting it to IAM.
      required:
      - GroupName
      - PolicyName
      - PolicyDocument
    InvalidInputException:
      type: object
      properties:
        message:
          type: string
    LimitExceededException:
      type: object
      properties:
        message:
          type: string
    ListGroupPoliciesRequest:
      type: object
      properties:
        GroupName:
          type: string
          description: 'The name of the group to list policies for. 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: _+=,.@-'
        Marker:
          type: string
          description: Use this parameter only when paginating results and only after you receive a response indicating that
            the results are truncated. Set it to the value of the Marker element in the response that you received to indicate
            where the next call should start.
        MaxItems:
          type: integer
          description: Use this only when paginating results to indicate the maximum number of items you want in the response.
            If additional items exist beyond the maximum you specify, the IsTruncated response element is true. If you do
            not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even
            when there are more results available. In that case, the IsTruncated response element returns true, and Marker
            contains a value to include in the subsequent call that tells the service where to continue from.
      required:
      - GroupName
    ListGroupPoliciesResponse:
      type: object
      properties:
        PolicyNames:
          type: array
          items:
            type: string
          description: 'A list of policy names. 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:
            _+=,.@-'
        IsTruncated:
          type: boolean
          description: A flag that indicates whether there are more items to return. If your results were truncated, you can
            make a subsequent pagination request using the Marker request parameter to retrieve more items. Note that IAM
            might return fewer than the MaxItems number of results even when there are more results available. We recommend
            that you check IsTruncated after every call to ensure that you receive all your results.
        Marker:
          type: string
          description: When IsTruncated is true, this element is present and contains the value to use for the Marker parameter
            in a subsequent pagination request.
      required:
      - PolicyNames
    MalformedPolicyDocumentException:
      type: object
      properties:
        message:
          type: string
    NoSuchEntityException:
      type: object
      properties:
        message:
          type: string
    PutGroupPolicyRequest:
      type: object
      properties:
        GroupName:
          type: string
          description: '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:
          type: string
          description: '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: _+=,.@-'
        PolicyDocument:
          type: string
          description: 'The policy document. You must provide policies in JSON format in IAM. However, for CloudFormation
            templates formatted in YAML, you can provide the policy in JSON or YAML format. CloudFormation 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 c'
      required:
      - GroupName
      - PolicyName
      - PolicyDocument
    ServiceFailureException:
      type: object
      properties:
        message:
          type: string
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/iam/service/2010-05-08/iam-2010-05-08.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)