Skip to content

create_ip_set

Operation

create_ip_set

create_ip_set(request: CreateIPSetInput | CreateIPSetInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateIPSetInputDict]) -> CreateIPSetOutput

Creates a new IPSet, which is called a trusted IP list in the console user interface. An IPSet is a list of IP addresses that are trusted for secure communication with Amazon Web Services infrastructure and applications. GuardDuty doesn't generate findings for IP addresses that are included in IPSets. Only users from the administrator account can use this operation.

Parameters:

Name Type Description Default
request CreateIPSetInput | CreateIPSetInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[CreateIPSetInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
CreateIPSetOutput

An instance of CreateIPSetOutput.

create_ip_set async

create_ip_set(request: CreateIPSetInput | CreateIPSetInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateIPSetInputDict]) -> CreateIPSetOutput

Creates a new IPSet, which is called a trusted IP list in the console user interface. An IPSet is a list of IP addresses that are trusted for secure communication with Amazon Web Services infrastructure and applications. GuardDuty doesn't generate findings for IP addresses that are included in IPSets. Only users from the administrator account can use this operation.

Parameters:

Name Type Description Default
request CreateIPSetInput | CreateIPSetInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[CreateIPSetInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
CreateIPSetOutput

An instance of CreateIPSetOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

CreateIPSetInputDict

Bases: TypedDict

Dictionary form of CreateIPSetInput.

Attributes

activate instance-attribute
activate: Required[bool]

A Boolean value that indicates whether GuardDuty is to start using the uploaded IPSet.

client_token instance-attribute
client_token: str | None

The idempotency token for the create request.

This field is autopopulated if not provided.

detector_id instance-attribute
detector_id: Required[str]

The unique ID of the detector of the GuardDuty account for which you want to create an IPSet.

To find the detectorId in the current Region, see the Settings page in the GuardDuty console, or run the ListDetectors API.

expected_bucket_owner instance-attribute
expected_bucket_owner: str | None

The Amazon Web Services account ID that owns the Amazon S3 bucket specified in the location parameter.

format instance-attribute
format: Required[str]

The format of the file that contains the IPSet.

location instance-attribute
location: Required[str]

The URI of the file that contains the IPSet.

name instance-attribute
name: Required[str]

The user-friendly name to identify the IPSet.

Allowed characters are alphanumeric, whitespace, dash (-), and underscores (_).

tags instance-attribute
tags: Mapping[str, str] | None

The tags to be added to a new IP set resource.

CreateIPSetInput dataclass

Bases: _SerdeShape

Dataclass for CreateIPSetInput structure.

Attributes

activate class-attribute instance-attribute
activate: bool | None = ...

A Boolean value that indicates whether GuardDuty is to start using the uploaded IPSet.

client_token class-attribute instance-attribute
client_token: str | None = ...

The idempotency token for the create request.

This field is autopopulated if not provided.

detector_id class-attribute instance-attribute
detector_id: str | None = ...

The unique ID of the detector of the GuardDuty account for which you want to create an IPSet.

To find the detectorId in the current Region, see the Settings page in the GuardDuty console, or run the ListDetectors API.

expected_bucket_owner class-attribute instance-attribute
expected_bucket_owner: str | None = ...

The Amazon Web Services account ID that owns the Amazon S3 bucket specified in the location parameter.

format class-attribute instance-attribute
format: str | None = ...

The format of the file that contains the IPSet.

location class-attribute instance-attribute
location: str | None = ...

The URI of the file that contains the IPSet.

name class-attribute instance-attribute
name: str | None = ...

The user-friendly name to identify the IPSet.

Allowed characters are alphanumeric, whitespace, dash (-), and underscores (_).

tags class-attribute instance-attribute
tags: dict[str, str] | None = ...

The tags to be added to a new IP set resource.

Output

CreateIPSetOutput dataclass

Bases: _SerdeShape

Dataclass for CreateIPSetOutput structure.

Attributes

ip_set_id class-attribute instance-attribute
ip_set_id: str | None = ...

The ID of the IPSet resource.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.