SecurityAgent / Client / update_integrated_resources

update_integrated_resources

SecurityAgent.Client.update_integrated_resources(**kwargs)

Updates the integrated resources for an agent space, including their capabilities.

See also: AWS API Documentation

Request Syntax

response = client.update_integrated_resources(
    agentSpaceId='string',
    integrationId='string',
    items=[
        {
            'resource': {
                'githubRepository': {
                    'name': 'string',
                    'owner': 'string'
                },
                'gitlabRepository': {
                    'name': 'string',
                    'namespace': 'string'
                },
                'bitbucketRepository': {
                    'name': 'string',
                    'workspace': 'string'
                },
                'confluenceDocument': {
                    'name': 'string',
                    'spaceKey': 'string',
                    'pageId': 'string',
                    'title': 'string',
                    'spaceTitle': 'string'
                }
            },
            'capabilities': {
                'github': {
                    'leaveComments': True|False,
                    'remediateCode': True|False
                },
                'gitlab': {
                    'leaveComments': True|False,
                    'remediateCode': True|False
                },
                'bitbucket': {
                    'leaveComments': True|False,
                    'remediateCode': True|False
                },
                'confluence': {
                    'fetchDocument': True|False,
                    'createDocument': True|False,
                    'updateDocument': True|False
                }
            }
        },
    ]
)
Parameters:
  • agentSpaceId (string) –

    [REQUIRED]

    The unique identifier of the agent space.

  • integrationId (string) –

    [REQUIRED]

    The unique identifier of the integration.

  • items (list) –

    [REQUIRED]

    The list of integrated resource items to update.

    • (dict) –

      Represents an input item for updating integrated resources, including the resource and its capabilities.

      • resource (dict) – [REQUIRED]

        The integrated resource to update.

        Note

        This is a Tagged Union structure. Only one of the following top level keys can be set: githubRepository, gitlabRepository, bitbucketRepository, confluenceDocument.

        • githubRepository (dict) –

          The GitHub repository resource information.

          • name (string) – [REQUIRED]

            The name of the GitHub repository.

          • owner (string) – [REQUIRED]

            The owner of the GitHub repository.

        • gitlabRepository (dict) –

          A GitLab repository integrated as a resource.

          • name (string) – [REQUIRED]

            Name of the resource e.g. repository name, etc.

          • namespace (string) – [REQUIRED]

            The namespace (group or user path) that owns the project.

        • bitbucketRepository (dict) –

          A Bitbucket repository integrated as a resource.

          • name (string) – [REQUIRED]

            Name of the resource e.g. repository name, etc.

          • workspace (string) – [REQUIRED]

            The workspace slug that owns the repository.

        • confluenceDocument (dict) –

          A Confluence document (page) integrated as a resource.

          • name (string) – [REQUIRED]

            Name of the resource e.g. repository name, etc.

          • spaceKey (string) – [REQUIRED]

            The Confluence space key containing the document.

          • pageId (string) – [REQUIRED]

            The Confluence page identifier.

          • title (string) –

            The display title of the Confluence page.

          • spaceTitle (string) –

            The display title of the Confluence space.

      • capabilities (dict) –

        The capabilities to enable for the integrated resource.

        Note

        This is a Tagged Union structure. Only one of the following top level keys can be set: github, gitlab, bitbucket, confluence.

        • github (dict) –

          The GitHub-specific resource capabilities.

          • leaveComments (boolean) –

            Indicates whether the integration can leave comments on pull requests.

          • remediateCode (boolean) –

            Indicates whether the integration can create code remediation pull requests.

        • gitlab (dict) –

          Capabilities for an integrated GitLab repository.

          • leaveComments (boolean) –

            Whether to post code review comments on merge request discussions.

          • remediateCode (boolean) –

            Whether to create merge requests with automated fixes.

        • bitbucket (dict) –

          Capabilities for an integrated Bitbucket repository.

          • leaveComments (boolean) –

            Whether to post code review comments on pull requests.

          • remediateCode (boolean) –

            Whether to create pull requests with automated fixes.

        • confluence (dict) –

          Capabilities for an integrated Confluence space.

          • fetchDocument (boolean) –

            Whether to fetch documents from this space.

          • createDocument (boolean) –

            Whether to create documents in this space.

          • updateDocument (boolean) –

            Whether to update documents in this space.

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

Exceptions

  • SecurityAgent.Client.exceptions.ValidationException

  • SecurityAgent.Client.exceptions.ResourceNotFoundException

  • SecurityAgent.Client.exceptions.InternalServerException

  • SecurityAgent.Client.exceptions.ConflictException

  • SecurityAgent.Client.exceptions.ThrottlingException

  • SecurityAgent.Client.exceptions.AccessDeniedException