Skip to main content

ip_sets

Creates, updates, deletes or gets an ip_set resource or lists ip_sets in a region

Overview

Nameip_sets
TypeResource
DescriptionResource Type definition for AWS::GuardDuty::IPSet
Idawscc.guardduty.ip_sets

Fields

NameDatatypeDescription
idstring
formatstring
activateboolean
detector_idstring
namestring
locationstring
expected_bucket_ownerstring
tagsarray
regionstringAWS region.

For more information, see AWS::GuardDuty::IPSet.

Methods

NameResourceAccessible byRequired Params
create_resourceip_setsINSERTFormat, Location, region
delete_resourceip_setsDELETEIdentifier, region
update_resourceip_setsUPDATEIdentifier, PatchDocument, region
list_resourcesip_sets_list_onlySELECTregion
get_resourceip_setsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual ip_set.

SELECT
region,
id,
format,
activate,
detector_id,
name,
location,
expected_bucket_owner,
tags
FROM awscc.guardduty.ip_sets
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}|{{ detector_id }}';

INSERT example

Use the following StackQL query and manifest file to create a new ip_set resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.guardduty.ip_sets (
Format,
Location,
region
)
SELECT
'{{ format }}',
'{{ location }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a ip_set resource, using stack-deploy.

/*+ update */
UPDATE awscc.guardduty.ip_sets
SET PatchDocument = string('{{ {
"Activate": activate,
"Name": name,
"Location": location,
"ExpectedBucketOwner": expected_bucket_owner,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}|{{ detector_id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.guardduty.ip_sets
WHERE
Identifier = '{{ id }}|{{ detector_id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the ip_sets resource, the following permissions are required:

guardduty:CreateIPSet,
guardduty:GetIPSet,
guardduty:TagResource,
iam:PutRolePolicy