2019/06/24 - AWS SecurityHub - 8 new 1 updated api methods
Changes This release includes a new Tags parameter for the EnableSecurityHub operation, and the following new operations: DescribeHub, CreateActionTarget, DeleteActionTarget, DescribeActionTargets, UpdateActionTarget, TagResource, UntagResource, and ListTagsforResource. It removes the operation ListProductSubscribers, and makes Title and Description required attributes of AwsSecurityFinding.
Removes one or more tags from a resource.
See also: AWS API Documentation
Request Syntax
client.untag_resource( ResourceArn='string', TagKeys=[ 'string', ] )
string
[REQUIRED]
The ARN of the resource to remove the tags from.
list
[REQUIRED]
The tag keys associated with the tags to remove from the resource.
(string) --
dict
Response Syntax
{}
Response Structure
(dict) --
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' )
string
[REQUIRED]
The name of the custom action target.
string
[REQUIRED]
The description for the custom action target.
string
[REQUIRED]
The ID for the custom action target.
dict
Response Syntax
{ 'ActionTargetArn': 'string' }
Response Structure
(dict) --
ActionTargetArn (string) --
The ARN for the custom action target.
Returns a list of tags associated with a resource.
See also: AWS API Documentation
Request Syntax
client.list_tags_for_resource( ResourceArn='string' )
string
[REQUIRED]
The ARN of the resource to retrieve tags for.
dict
Response Syntax
{ 'Tags': { 'string': 'string' } }
Response Structure
(dict) --
Tags (dict) --
The tags associated with a resource.
(string) --
(string) --
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' )
string
[REQUIRED]
The ARN of the custom action target to update.
string
The updated name of the custom action target.
string
The updated description for the custom action target.
dict
Response Syntax
{}
Response Structure
(dict) --
Adds one or more tags to a resource.
See also: AWS API Documentation
Request Syntax
client.tag_resource( ResourceArn='string', Tags={ 'string': 'string' } )
string
[REQUIRED]
The ARN of the resource to apply the tags to.
dict
[REQUIRED]
The tags to add to the resource.
(string) --
(string) --
dict
Response Syntax
{}
Response Structure
(dict) --
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' )
string
[REQUIRED]
The ARN of the custom action target to delete.
dict
Response Syntax
{ 'ActionTargetArn': 'string' }
Response Structure
(dict) --
ActionTargetArn (string) --
The ARN of the custom action target that was deleted.
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 )
list
A list of custom action target ARNs for the custom action targets to retrieve.
(string) --
string
The token that is required for pagination.
integer
The maximum number of results to return.
dict
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.
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' )
string
The ARN of the Hub resource to retrieve.
dict
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.
{'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' } )
dict
The tags to add to the Hub resource when you enable Security Hub.
(string) --
(string) --
dict
Response Syntax
{}
Response Structure
(dict) --