AWS SecurityHub

2019/06/24 - AWS SecurityHub - 8 new1 updated api methods

Changes  Update securityhub client to latest version

UpdateActionTarget (new) Link ¶

Updates the name and description of a custom action target in Security Hub.

See also: AWS API Documentation

Request Syntax

client.update_action_target(
    ActionTargetArn='string',
    Name='string',
    Description='string'
)
type ActionTargetArn:

string

param ActionTargetArn:

[REQUIRED]

The ARN of the custom action target to update.

type Name:

string

param Name:

The updated name of the custom action target.

type Description:

string

param Description:

The updated description for the custom action target.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

DescribeHub (new) Link ¶

Returns details about the Hub resource in your account, including the HubArn and the time when you enabled Security Hub.

See also: AWS API Documentation

Request Syntax

client.describe_hub(
    HubArn='string'
)
type HubArn:

string

param HubArn:

The ARN of the Hub resource to retrieve.

rtype:

dict

returns:

Response Syntax

{
    'HubArn': 'string',
    'SubscribedAt': 'string'
}

Response Structure

  • (dict) --

    • HubArn (string) --

      The ARN of the Hub resource retrieved.

    • SubscribedAt (string) --

      The date and time when Security Hub was enabled in the account.

TagResource (new) Link ¶

Adds one or more tags to a resource.

See also: AWS API Documentation

Request Syntax

client.tag_resource(
    ResourceArn='string',
    Tags={
        'string': 'string'
    }
)
type ResourceArn:

string

param ResourceArn:

[REQUIRED]

The ARN of the resource to apply the tags to.

type Tags:

dict

param Tags:

[REQUIRED]

The tags to add to the resource.

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

CreateActionTarget (new) Link ¶

Creates a custom action target in Security Hub. You can use custom actions on findings and insights in Security Hub to trigger target actions in Amazon CloudWatch Events.

See also: AWS API Documentation

Request Syntax

client.create_action_target(
    Name='string',
    Description='string',
    Id='string'
)
type Name:

string

param Name:

[REQUIRED]

The name of the custom action target.

type Description:

string

param Description:

[REQUIRED]

The description for the custom action target.

type Id:

string

param Id:

[REQUIRED]

The ID for the custom action target.

rtype:

dict

returns:

Response Syntax

{
    'ActionTargetArn': 'string'
}

Response Structure

  • (dict) --

    • ActionTargetArn (string) --

      The ARN for the custom action target.

ListTagsForResource (new) Link ¶

Returns a list of tags associated with a resource.

See also: AWS API Documentation

Request Syntax

client.list_tags_for_resource(
    ResourceArn='string'
)
type ResourceArn:

string

param ResourceArn:

[REQUIRED]

The ARN of the resource to retrieve tags for.

rtype:

dict

returns:

Response Syntax

{
    'Tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • Tags (dict) --

      The tags associated with a resource.

      • (string) --

        • (string) --

DeleteActionTarget (new) Link ¶

Deletes a custom action target from Security Hub. Deleting a custom action target doesn't affect any findings or insights that were already sent to Amazon CloudWatch Events using the custom action.

See also: AWS API Documentation

Request Syntax

client.delete_action_target(
    ActionTargetArn='string'
)
type ActionTargetArn:

string

param ActionTargetArn:

[REQUIRED]

The ARN of the custom action target to delete.

rtype:

dict

returns:

Response Syntax

{
    'ActionTargetArn': 'string'
}

Response Structure

  • (dict) --

    • ActionTargetArn (string) --

      The ARN of the custom action target that was deleted.

UntagResource (new) Link ¶

Removes one or more tags from a resource.

See also: AWS API Documentation

Request Syntax

client.untag_resource(
    ResourceArn='string',
    TagKeys=[
        'string',
    ]
)
type ResourceArn:

string

param ResourceArn:

[REQUIRED]

The ARN of the resource to remove the tags from.

type TagKeys:

list

param TagKeys:

[REQUIRED]

The tag keys associated with the tags to remove from the resource.

  • (string) --

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

DescribeActionTargets (new) Link ¶

Returns a list of the custom action targets in Security Hub in your account.

See also: AWS API Documentation

Request Syntax

client.describe_action_targets(
    ActionTargetArns=[
        'string',
    ],
    NextToken='string',
    MaxResults=123
)
type ActionTargetArns:

list

param ActionTargetArns:

A list of custom action target ARNs for the custom action targets to retrieve.

  • (string) --

type NextToken:

string

param NextToken:

The token that is required for pagination.

type MaxResults:

integer

param MaxResults:

The maximum number of results to return.

rtype:

dict

returns:

Response Syntax

{
    'ActionTargets': [
        {
            'ActionTargetArn': 'string',
            'Name': 'string',
            'Description': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ActionTargets (list) --

      A list of ActionTarget objects. Each object includes the ActionTargetArn, Description, and Name of a custom action target available in Security Hub.

      • (dict) --

        An ActionTarget object.

        • ActionTargetArn (string) --

          The ARN for the target action.

        • Name (string) --

          The name of the action target.

        • Description (string) --

          The description of the target action.

    • NextToken (string) --

      The token that is required for pagination.

EnableSecurityHub (updated) Link ¶
Changes (request)
{'Tags': {'string': 'string'}}

Enables Security Hub for your account in the current Region or the Region you specify in the request. When you enable Security Hub, you grant to Security Hub the permissions necessary to gather findings from AWS Config, Amazon GuardDuty, Amazon Inspector, and Amazon Macie. To learn more, see Setting Up AWS Security Hub.

See also: AWS API Documentation

Request Syntax

client.enable_security_hub(
    Tags={
        'string': 'string'
    }
)
type Tags:

dict

param Tags:

The tags to add to the Hub resource when you enable Security Hub.

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --