Anti_DDoS API¶
The Anti DDoS Service Class¶
The anti_ddos high-level interface is available through the anti_ddos
member of a Connection
object. The
anti_ddos
member will only be added if the
otcextensions.sdk.register_otc_extensions(conn)
method is called.
Floating IP Operations¶
- class otcextensions.sdk.anti_ddos.v1._proxy.Proxy(session: session.Session, *, service_type: str | None = None, service_name: str | None = None, interface: str | None = None, region_name: str | None = None, endpoint_override: str | None = None, version: str | None = None, auth: plugin.BaseAuthPlugin | None = None, user_agent: str | None = None, connect_retries: int | None = None, logger: logging.Logger | None = None, allow: dict[str, ty.Any] | None = None, additional_headers: collections.abc.MutableMapping[str, str] | None = None, client_name: str | None = None, client_version: str | None = None, allow_version_hack: bool | None = None, global_request_id: str | None = None, min_version: str | None = None, max_version: str | None = None, default_microversion: str | None = None, status_code_retries: int | None = None, retriable_status_codes: list[int] | None = None, raise_exc: bool | None = None, rate_limit: float | None = None, concurrency: int | None = None, connect_retry_delay: float | None = None, status_code_retry_delay: float | None = None, statsd_client: statsd_client.StatsClient | None = None, statsd_prefix: str | None = None, prometheus_counter: prometheus_client.Counter | None = None, prometheus_histogram: prometheus_client.Histogram | None = None, influxdb_config: dict[str, ty.Any] | None = None, influxdb_client: influxdb_client.InfluxDBClient | None = None)
- floating_ips(**query)
Get the list of anti-ddos Floating IPs
- Parameters:
query (kwargs) – Optional query parameters to be sent to limit the resources being returned.
- Returns:
A generator of FloatingIP object
- Return type:
class:~otcextensions.sdk.anti_ddos.v1.floating_ip.FloatingIP
- protect_floating_ip(floating_ip_id, **kwargs)
Enable anti-ddos on the given Floating IP
- Parameters:
floating_ip_id – The Floating IP id or an instance of
FloatingIP
kwargs (dict) – Keyword arguments which will be used to create a
FloatingIP
- Return type:
- unprotect_floating_ip(floating_ip, ignore_missing=True)
Diable anti-ddos on the given Floating IP
- Parameters:
floating_ip_id – The EIP id or an instance of
FloatingIP
ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the floating IP does not exist.
- Return type:
- get_floating_ip_policies(floating_ip)
Get detail about an Floating IP policy
- Parameters:
floating_ip – The Floating IP id or an instance of
FloatingIP
- Return type:
- update_floating_ip_policies(floating_ip, **attrs)
Update Floating IP policy
- Parameters:
floating_ip – The Floating IP id or an instance of
FloatingIP
attrs (dict) – attributes for update on
FloatingIP
- Return type:
- get_floating_ip_status(floating_ip_id)
Get specific floating ip status by floating ip id.
- Parameters:
floating_ip_id – The floating ip id
- Returns:
The status of floating ip
- Return type:
- floating_ip_events(floating_ip_id, **query)
List specific floating ip events by floating ip id.
- Parameters:
floating_ip_id – The floating ip id
query (dict) – Optional query parameters to be sent to limit the resources being returned.
- Returns:
A generator of FloatingIPLog object
- Return type:
FloatingIPLog
- floating_ip_stat_day(floating_ip_id)
List statistic for last 24 hours by floating ip id.
- Parameters:
floating_ip_id – The floating ip id
- Returns:
A generator of FloatingIPDayStat object
- Return type:
- floating_ip_stat_week(**query)
List weekly defence statisticsabout all floating ips.
- Parameters:
query (dict) – Optional query parameters to be sent to limit the resources being returned: * period_start_date - start day of the 7 day period to query
- Returns:
A generator of FloatingIPWeekStat object
- Return type:
Misc Operations¶
- class otcextensions.sdk.anti_ddos.v1._proxy.Proxy(session: session.Session, *, service_type: str | None = None, service_name: str | None = None, interface: str | None = None, region_name: str | None = None, endpoint_override: str | None = None, version: str | None = None, auth: plugin.BaseAuthPlugin | None = None, user_agent: str | None = None, connect_retries: int | None = None, logger: logging.Logger | None = None, allow: dict[str, ty.Any] | None = None, additional_headers: collections.abc.MutableMapping[str, str] | None = None, client_name: str | None = None, client_version: str | None = None, allow_version_hack: bool | None = None, global_request_id: str | None = None, min_version: str | None = None, max_version: str | None = None, default_microversion: str | None = None, status_code_retries: int | None = None, retriable_status_codes: list[int] | None = None, raise_exc: bool | None = None, rate_limit: float | None = None, concurrency: int | None = None, connect_retry_delay: float | None = None, status_code_retry_delay: float | None = None, statsd_client: statsd_client.StatsClient | None = None, statsd_prefix: str | None = None, prometheus_counter: prometheus_client.Counter | None = None, prometheus_histogram: prometheus_client.Histogram | None = None, influxdb_config: dict[str, ty.Any] | None = None, influxdb_client: influxdb_client.InfluxDBClient | None = None)
- configs(**kwargs)
Get Alarm configuration
- Returns:
one object of class
Config