ApiGateway¶
Gateway Operations¶
- class otcextensions.sdk.apig.v2._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)
- gateways(**attrs)
Query gateways
- Returns:
A generator of gateway object of a
Gateway
- create_gateway(**attrs)
Create gateway
- Returns:
A gateway object
- Return type:
Gateway
- wait_for_gateway(gateway, status='Running', failures=None, interval=2, wait=960)
Wait for specific gateway status :param gateway: key id or an instance of
Gateway
- Parameters:
status – Specific status of the gateway.
failures – Specific failure status of the gateway.
interval – Seconds between checking the gateway.
wait – Seconds between checking the gateway.
- %returns: instance of
- get_gateway(gateway)
Get details of specific gateway :param gateway: key id or an instance of
Gateway
- Returns:
instance of
Gateway
- update_gateway(gateway, **attrs)
Update an existing API Gateway.
- delete_gateway(gateway, **attrs)
Delete specific gateway :param gateway: key id or an instance of
Gateway
- Returns:
‘None’
- get_gateway_progress(gateway)
Get specific gateway progress :param gateway: key id or an instance of
Gateway
- %returns: instance of
- get_constraints(gateway)
Get gateway constraints
- Parameters:
gateway – key id or an instance of
Gateway
- %returns: instance of
- enable_public_access(gateway, **attrs)
Enable public access for a specific API Gateway.
- update_public_access(gateway, **attrs)
Update public access settings for a specific API Gateway.
- disable_public_access(gateway)
Disable public access for a specific API Gateway.
- modify_gateway_spec(gateway, **attrs)
Modify the specifications of a specific API Gateway.
- bind_eip(gateway, **attrs)
Bind an Elastic IP (EIP) to a specific API Gateway.
- unbind_eip(gateway)
Unbind an Elastic IP (EIP) from a specific API Gateway.
- enable_ingress(gateway, **attrs)
Enable public inbound access for a specific API Gateway.
This method binds a public IP to an API Gateway to allow public inbound traffic from the internet.
- update_ingress(gateway, **attrs)
Update public inbound access bandwidth of a specific API Gateway.
This method modifies the inbound bandwidth settings for an API Gateway that has public access enabled.
AZ Operations¶
- class otcextensions.sdk.apig.v2._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)
- azs(**attrs)
Retrieve availability zones (AZs) for API Gateway service.
- Parameters:
attrs – Optional filters for querying availability zones.
- Returns:
A list of availability zones.
- Return type:
list of
AZ
Environment Operations¶
- class otcextensions.sdk.apig.v2._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)
- create_environment(gateway, **attrs)
Create a new environment for a specific API Gateway.
This method creates an environment within the given API Gateway by associating it with the specified attributes.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
attrs – Additional attributes for the environment creation.
- Returns:
An instance of
ApiEnvironment
- update_environment(gateway, environment, **attrs)
Update an existing environment for a specific API Gateway.
This method updates the specified environment within the API Gateway by applying the provided attributes.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
environment – The ID of the environment or an instance of
ApiEnvironment
attrs – Additional attributes to update the environment.
- Returns:
Updated instance of
ApiEnvironment
- delete_environment(gateway, environment, **attrs)
Delete an existing environment from a specific API Gateway.
This method removes the specified environment from the API Gateway.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
environment – The ID of the environment or an instance of
ApiEnvironment
attrs – Additional attributes for the delete operation.
- Returns:
None
- environments(gateway, **attrs)
List all environments for a specific API Gateway.
This method retrieves a list of environments associated with the given API Gateway.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
attrs – Additional filters for listing environments.
- Returns:
A list of instances of
ApiEnvironment
Api Group Operations¶
- class otcextensions.sdk.apig.v2._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)
- create_api_group(gateway, **attrs)
Create a new API group for a specific API Gateway.
This method creates an API group associated with the given API Gateway.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
attrs – Additional attributes for creating the API group.
- Returns:
An instance of
ApiGroup
- update_api_group(gateway, api_group, **attrs)
Update an existing API group for a specific API Gateway.
This method updates the attributes of an API group associated with the given API Gateway.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
api_group – The ID of the API group or an instance of
ApiGroup
attrs – Additional attributes for updating the API group.
- Returns:
The updated instance of
ApiGroup
- delete_api_group(gateway, api_group, **attrs)
Delete an API group from a specific API Gateway.
This method deletes the specified API group associated with the given API Gateway.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
api_group – The ID of the API group or an instance of
ApiGroup
attrs – Additional parameters for deleting the API group.
- Returns:
None
- get_api_group(gateway, api_group)
Retrieve details of a specific API group.
This method retrieves the details of an API group associated with the given API Gateway.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
api_group – The ID of the API group or an instance of
ApiGroup
- Returns:
An instance of
ApiGroup
Environment Variables Operations¶
- class otcextensions.sdk.apig.v2._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)
- create_environment_variable(gateway, **attrs)
Create a new environment variable for a specific API Gateway.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
attrs – Additional attributes for the environment variable creation.
- Returns:
An instance of ApiEnvironmentVar
- update_environment_variable(gateway, var, **attrs)
Update an existing environment variable for a specific API Gateway.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
var – The ID of the environment var or an instance of ApiEnvironmentVar
attrs – Additional attributes to update the environment.
- Returns:
Updated instance of ApiEnvironmentVar
- delete_environment_variable(gateway, var, ignore_missing=False)
Delete an existing environment variable from a specific API Gateway.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
var – The ID of the environment or an instance of ApiEnvironmentVar
- Returns:
None
- environment_variables(gateway, **attrs)
List all environment vars for a specific API Gateway.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
attrs – Additional filters for listing environment vars.
- Returns:
A list of instances of ApiEnvironmentVar
- get_environment_variable(gateway, var)
Retrieve details of a specific environment variable.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
var – The ID of the variable or an instance of ApiEnvironmentVar
- Returns:
An instance of ApiEnvironmentVar
Throttling Policies Operations¶
- class otcextensions.sdk.apig.v2._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)
- create_throttling_policy(gateway, **attrs)
Create a new throttling policy for a specific API Gateway.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
attrs – Additional attributes for the throttling policy creation.
- Returns:
An instance of ThrottlingPolicy
- update_throttling_policy(gateway, policy, **attrs)
Update an existing throttling policy for a specific API Gateway.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
tp – The ID of the throttling policy or an instance of ThrottlingPolicy
attrs – Additional attributes to update the throttling policy.
- Returns:
Updated instance of ThrottlingPolicy
- delete_throttling_policy(gateway, policy, ignore_missing=False)
Delete an existing throttling policy from a specific API Gateway.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
policy – The ID of the throttling policy or an instance of ThrottlingPolicy
- Returns:
None
- throttling_policies(gateway, **attrs)
List all throttling policies for a specific API Gateway.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
attrs – Additional filters for listing throttling policies.
- Returns:
A list of instances of ThrottlingPolicy
- get_throttling_policy(gateway, policy)
Retrieve details of a specific throttling policy.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
policy – The ID of the throttling policy or an instance of ThrottlingPolicy
- Returns:
An instance of ThrottlingPolicy
- bind_throttling_policy(gateway, **attrs)
Bind a throttling policy to a specific API.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
attrs – Additional attributes for the ThrottlingPolicy bind.
- Returns:
An instance of ThrottlingPolicyBind
- unbind_throttling_policy(gateway, bind, ignore_missing=False)
Unbind a bound Signature from a specific API.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
bind – The ID of the SignatureBind or an instance of ThrottlingPolicyBind
- Returns:
None
- unbind_throttling_policies(gateway, throttle_bindings: list)
Unbind a bound Signature from a specific API.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
throttle_bindings – The IDs of the request throttling policy binding records to be canceled.
- Returns:
None
- bound_throttling_policy_apis(gateway, **query)
- List all APIs to which a specified request
throttling policy has been bound.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
query – Additional filters for listing ThrottlingPolicyBind.
- Returns:
A list of instances of ThrottlingPolicyBind
- not_bound_throttling_policy_apis(gateway, **query)
- List all APIs to which a request throttling
policy has not been bound.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
query – Additional filters for listing NotBoundApi.
- Returns:
A list of instances of NotBoundApi
- bound_throttling_policies(gateway, **query)
List all throttling policies that have been bound to an API.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
query – Additional filters for listing BoundApi.
- Returns:
A list of instances of BoundThrottles
Api Operations¶
- class otcextensions.sdk.apig.v2._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)
- create_api(gateway, **attrs)
Create a new API for a specific API Gateway.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
attrs – Additional attributes for the Api creation.
- Returns:
An instance of Api
- update_api(gateway, api, **attrs)
Update an existing API for a specific API Gateway.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
api – The ID of the Api or an instance of Api
attrs – Additional attributes to update the Api.
- Returns:
Updated instance of Api
- delete_api(gateway, api, ignore_missing=False)
Delete an existing API from a specific API Gateway.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
api – The ID of the Api or an instance of Api
- Returns:
None
- apis(gateway, **attrs)
List all APIs for a specific API Gateway.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
attrs – Additional filters for listing Api.
- Returns:
A list of instances of Api
- get_api(gateway, api)
Retrieve details of a specific API.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
api – The ID of the Api or an instance of Api
- Returns:
An instance of Api
- publish_api(gateway, env, api, **attrs)
Publish an API.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
api – The ID of the Api or an instance of Api
env – The ID of the Environment or an instance of it
attrs – Additional attributes
- Returns:
An instance of PublishApi
- offline_api(gateway, env, api, **attrs)
Take API offline.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
api – The ID of the Api or an instance of Api
env – The ID of the Environment or an instance of it
attrs – Additional attributes
- Returns:
An instance of PublishApi
- check_api(gateway, **attrs)
Verify the API definition.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
attrs – Additional attributes
- Returns:
An instance of CheckApi
- debug_api(gateway, api, **attrs)
Debug an API in a specified environment.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
api – The ID of the Api or an instance of Api
attrs – Additional attributes
- Returns:
An instance of DebugApi
- publish_apis(gateway, env, **attrs)
Publish an APIs.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
env – The ID of the Environment or an instance of it
attrs – Additional attributes
- Returns:
An instance of PublishApis
- offline_apis(gateway, env, **attrs)
Takes offline an APIs.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
env – The ID of the Environment or an instance of it
attrs – Additional attributes
- Returns:
An instance of PublishApis
- api_versions(gateway, api)
Retrieve the historical versions of an API.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
api – The ID of the Api or an instance of Api
- Returns:
An instance of PublishApis
- switch_version(gateway, api, version_id)
Switch the version of an API.
- Parameters:
version_id – API version ID.
gateway – The ID of the gateway or an instance of
Gateway
api – The ID of the Api or an instance of Api
- Returns:
An instance of PublishApis
- api_runtime_definitions(gateway, api, **query)
Retrieve the runtime definition of an API.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
api – The ID of the Api or an instance of Api
- Returns:
An instance of RuntimeDefinitionApi
- api_version_details(gateway, version_id)
Retrieve the details of specified API version.
- Parameters:
version_id – API version.
gateway – The ID of the gateway or an instance of
Gateway
- Returns:
An instance of RuntimeDefinitionApi
- take_api_version_offline(gateway, version_id, ignore_missing=False)
Remove an effective version of an API.
- Parameters:
version_id – API version.
gateway – The ID of the gateway or an instance of
Gateway
- Returns:
None
Credentials Operations¶
- class otcextensions.sdk.apig.v2._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)
- create_app(gateway, **attrs)
Create a new identity for accessing a specific API Gateway.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
attrs – Additional attributes for the App creation.
- Returns:
An instance of App
- get_app(gateway, app)
Retrieve details of a specific App.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
app – The ID of the App or an instance of App
- Returns:
An instance of App
- update_app(gateway, app, **attrs)
Update an existing App for a specific API Gateway.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
app – The ID of the App or an instance of App
attrs – Additional attributes to update the App.
- Returns:
Updated instance of App
- delete_app(gateway, app, ignore_missing=False)
Delete an existing identity from a specific API Gateway.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
app – The ID of the App or an instance of App
- Returns:
None
- apps(gateway, **attrs)
Retrieve the list of Apps for a specific API Gateway.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
- Returns:
An instance of App
- verify_app(gateway, app)
Verify if the App exists
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
app – The ID of the App or an instance of App
- Returns:
An instance of App
- reset_app_secret(gateway, app, **attrs)
Reset the App secret
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
app – The ID of the App or an instance of App
attrs – Additional attributes to update the App secret.
- Returns:
An instance of App
- get_app_code(gateway, app, app_code)
Retrieve details of a specific application code.
This method retrieves the details of an application code associated with the given API Gateway and application.
- create_app_code(gateway, app, **attrs)
Create a new application code for a specific application.
This method creates an application code associated with the given API Gateway and application.
- generate_app_code(gateway, app, **attrs)
Generate a new application code for a specific application.
This method generates a new application code associated with the given API Gateway and application.
- app_codes(gateway, app, **attrs)
List all application codes for a specific application.
This method retrieves a list of application codes associated with the given API Gateway and application.
- delete_app_code(gateway, app, app_code, ignore_missing=False)
Delete a specific application code.
This method deletes an application code associated with the given API Gateway and application.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
app – The ID of the application or an instance of
App
app_code – The ID of the application code or an instance of
AppCode
ignore_missing – When set to True, no exception will be raised if the application code does not exist. Default is False.
- Returns:
None
- quotas(gateway, app, **attrs)
Retrieve quotas associated with a credential.
This method retrieves the quota details associated with the given API Gateway instance and application.
Signature Key Operations¶
- class otcextensions.sdk.apig.v2._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)
- create_signature(gateway, **attrs)
Create a new Signature for a specific API Gateway.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
attrs – Additional attributes for the Signature creation.
- Returns:
An instance of Signature
- update_signature(gateway, sign, **attrs)
Update an existing Signature for a specific API Gateway.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
sign – The ID of the Signature or an instance of Signature
attrs – Additional attributes to update the Signature.
- Returns:
Updated instance of Signature
- delete_signature(gateway, sign, ignore_missing=False)
Delete an existing Signature from a specific API Gateway.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
sign – The ID of the Signature or an instance of Signature
- Returns:
None
- signatures(gateway, **attrs)
List all Signatures for a specific API Gateway.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
attrs – Additional filters for listing Signature.
- Returns:
A list of instances of Signature
- bind_signature(gateway, **attrs)
Bind a Signature for a specific API.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
attrs – Additional attributes for the Signature bind.
- Returns:
An instance of SignatureBind
- unbind_signature(gateway, bind, ignore_missing=False)
Unbind a bound Signature from a specific API.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
bind – The ID of the SignatureBind or an instance of SignatureBind
- Returns:
None
- bound_signatures(gateway, **query)
List all Signatures bound a specific API.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
query – Additional filters for listing SignatureBind.
- Returns:
A list of instances of SignatureBind
- not_bound_apis(gateway, **query)
List all APIs to which a signature key has not been bound.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
query – Additional filters for listing NotBoundApi.
- Returns:
A list of instances of NotBoundApi
- bound_apis(gateway, **query)
List all APIs to which a signature key has been bound.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
query – Additional filters for listing BoundApi.
- Returns:
A list of instances of BoundApi
Excluded Request Throttling Configuration¶
- class otcextensions.sdk.apig.v2._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)
- create_throttling_excluded_policy(gateway, policy, **attrs)
Creating an Excluded Request Throttling Configuration.
- Parameters:
policy – The ID of the throttling policy or an instance of
ThrottlingPolicy
gateway – The ID of the gateway or an instance of
Gateway
attrs – Additional attributes for the excluded throttling policy creation.
- Returns:
An instance of ThrottlingExcludedPolicy
- update_throttling_excluded_policy(gateway, policy, exclude, **attrs)
Update an Excluded Request Throttling Configuration.
- Parameters:
exclude – The ID of the excluded throttling policy or an instance of
ThrottlingExcludedPolicy
policy – The ID of the throttling policy or an instance of
ThrottlingPolicy
gateway – The ID of the gateway or an instance of
Gateway
attrs – Additional attributes to update the excluded throttling policy.
- Returns:
Updated instance of ThrottlingExcludedPolicy
- delete_throttling_excluded_policy(gateway, policy, exclude, ignore_missing=False)
Deleting an Excluded Request Throttling Configuration.
- Parameters:
exclude – The ID of the excluded throttling policy or an instance of
ThrottlingExcludedPolicy
policy – The ID of the throttling policy or an instance of
ThrottlingPolicy
gateway – The ID of the gateway or an instance of
Gateway
- Returns:
None
- throttling_excluded_policies(gateway, policy, **query)
List all Excluded Request Throttling Configurations.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
policy – The ID of the throttling policy or an instance of
ThrottlingPolicy
query – Additional filters for listing excluded throttling policies.
- Returns:
A list of instances of ThrottlingExcludedPolicy
Gateway Features Operations¶
- class otcextensions.sdk.apig.v2._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)
- configure_gateway_feature(gateway, **attrs)
Configuring a feature for a Gateway.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
attrs – Additional attributes for the GatewayFeatures.
- Returns:
An instance of GatewayFeatures
- gateway_features(gateway, **query)
List all Gateway Features.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
query – Additional filters for listing GatewayFeatures.
- Returns:
A list of instances of GatewayFeatures
- supported_gateway_features(gateway, **query)
List all the supported features of a Gateway.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
query – Additional filters for listing GatewayFeatures.
- Returns:
A list of instances of features names
Resource Query Operations¶
- class otcextensions.sdk.apig.v2._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)
- get_api_quantities(gateway)
- Get the number of APIs that have been published in the RELEASE
environment and the number of APIs that have not been published in this environment.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
- Returns:
An instance of ApiQuantities
- get_api_group_quantities(gateway)
Get the number of API groups.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
- Returns:
An instance of ApiGroupQuantities
- get_app_quantities(gateway)
- Get the number of apps that have been authorized to access APIs
and the number of apps that have not been authorized to access any APIs.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
- Returns:
An instance of AppQuantities
Domain Name Operations¶
- class otcextensions.sdk.apig.v2._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)
- bind_domain_name(gateway, group, **attrs)
Bind domain name to group.
- unbind_domain_name(gateway, group, domain, ignore_missing=False)
Unbind domain name from group.
- Parameters:
domain – The ID of the gateway or an instance of
DomainName
gateway – The ID of the gateway or an instance of
Gateway
group – The ID of the group or an instance of
ApiGroup
- Returns:
None
- update_domain_name_bound(gateway, group, domain, **attrs)
Update a bound of domain name to group.
- Parameters:
domain – The ID of the gateway or an instance of
DomainName
gateway – The ID of the gateway or an instance of
Gateway
group – The ID of the group or an instance of
ApiGroup
attrs – Additional attributes to update the DomainName bind.
- Returns:
Updated instance of DomainName
- create_certificate_for_domain_name(gateway, group, domain, **attrs)
Add certificate to domain name.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
group – The ID of the group or an instance of
ApiGroup
domain – The ID of the gateway or an instance of
DomainName
attrs – Additional attributes for the DomainName.
- Returns:
An instance of Certificate
- unbind_certificate_from_domain_name(gateway, group, domain, certificate, ignore_missing=False)
Unbind certificate from domain name.
- Parameters:
certificate – The ID of the gateway or an instance of
Certificate
domain – The ID of the gateway or an instance of
DomainName
gateway – The ID of the gateway or an instance of
Gateway
group – The ID of the group or an instance of
ApiGroup
group – The ID of the certificate
- Returns:
None
- enable_debug_domain_name(gateway, group, domain, enable)
Disable or Enable the debugging domain name bound to an API group.
- Parameters:
gateway – The ID of the gateway or an instance of
Gateway
group – The ID of the group or an instance of
ApiGroup
domain – The ID of the gateway or an instance of
DomainName
enable – Specifies whether the debugging domain name is accessible. Options: true and false.
- Returns:
An instance of DomainDebug
- get_bound_certificate(gateway, group, domain, certificate)
Get the details of the certificate bound to a domain name.
- Parameters:
certificate – The ID of the gateway or an instance of
Certificate
gateway – The ID of the gateway or an instance of
Gateway
group – The ID of the group or an instance of
ApiGroup
domain – The ID of the gateway or an instance of
DomainName
- Returns:
An instance of Certificate
Certificate Operations¶
- class otcextensions.sdk.apig.v2._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)
- delete_certificate(certificate, ignore_missing=False)
Delete an SSL certificate.
- Parameters:
certificate – The ID of the gateway or an instance of
Certificate
- Returns:
None
Access Control Policy Operations¶
- class otcextensions.sdk.apig.v2._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)
- create_acl_policy(gateway, **attrs)
Create an access control policy.
- update_acl_policy(gateway, acl_policy, **attrs)
Update an existing access control policy.
This method updates an existing ACL (access control list) policy in the specified API Gateway instance.
- delete_acl_policy(gateway, acl_policy, ignore_missing=True, **attrs)
Delete an access control policy.
This method deletes an existing access control (ACL) policy from the specified API Gateway instance.
- Parameters:
- Returns:
None
- delete_acl_policies(gateway, **attrs)
Delete multiple access control policies in batch.
This method deletes multiple ACL (access control list) policies at once within the specified API Gateway instance.
- Parameters:
gateway – The ID of the API Gateway instance or an instance of
Gateway
attrs – Attributes for batch deletion
- Returns:
A response indicating the result of the batch deletion.
- acl_policies(gateway, **attrs)
List all access control policies in an API Gateway instance.
This method retrieves a list of all ACL (access control list) policies defined in the specified API Gateway instance.
- get_acl_policy(gateway, acl_policy, **attrs)
Retrieve details of a specific access control policy.
This method retrieves detailed information about an existing ACL policy within the specified API Gateway instance.
Access Control Policy Binding Operations¶
- class otcextensions.sdk.apig.v2._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)
- list_apis_for_acl(gateway, **attrs)
List all APIs bound to a specific access control policy.
This method retrieves a list of APIs that are associated with the specified ACL policy in the given API Gateway instance.
- list_api_not_bound_to_acl(gateway, **attrs)
List all APIs not bound to a specific access control policy.
This method retrieves a list of APIs that are not associated with the specified ACL policy in the given API Gateway instance.
- Parameters:
gateway – The ID of the API Gateway instance or an instance of
Gateway
attrs – Additional filters
- Returns:
A list of instances of
UnbindApiForAcl
- list_acl_for_api(gateway, **attrs)
List all access control policies bound to a specific API.
This method retrieves a list of ACL policies that are associated with the specified API in the given API Gateway instance.
- bind_acl_to_api(gateway, **attrs)
Bind an access control policy to one or more APIs.
This method binds an existing ACL policy to one or more APIs within the specified API Gateway instance.
- Parameters:
gateway – The ID of the API Gateway instance or an instance of
Gateway
attrs – Attributes for the binding
- Returns:
An instance of
AclApiBinding
- unbind_acl(gateway, acl, ignore_missing=True)
Unbind an access control policy from an API.
This method removes the binding between an ACL (access control list) policy and an API within the specified API Gateway instance.
- Parameters:
gateway – The ID of the API Gateway instance or an instance of
Gateway
acl – The ID of the ACL binding or an instance of
AclApiBinding
ignore_missing – If True, no exception is raised if the binding does not exist
- Returns:
None
- unbind_acls(gateway, **attrs)
Unbind multiple access control policies from APIs in batch.
This method removes bindings between one or more ACL policies and APIs within the specified API Gateway instance
- Parameters:
gateway – The ID of the API Gateway instance or an instance of
Gateway
attrs – Attributes for the unbinding operation
- Returns:
An instance of
AclBindingFailure
API Import and Export Operations¶
- class otcextensions.sdk.apig.v2._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)
- import_api(gateway, **attrs)
Import an API definition into API Gateway
This method imports an API from an OpenAPI/Swagger definition or other supported format into the specified API Gateway instance.
- Parameters:
gateway – The ID or an instance of
Gateway
attrs – Dictionary of parameters required for import.
- Returns:
An instance of
ImportApi
- export_api(gateway, full_path, **attrs)
Export an API definition from API Gateway
This method exports an API definition (e.g. in Swagger/OpenAPI format) from the specified API Gateway instance to a file.
- Parameters:
gateway – The ID or an instance of
Gateway
full_path – Path where the exported file will be stored
attrs – Optional parameters for export.
- Returns:
An instance of
ExportApi
VPC Channel Operations¶
- class otcextensions.sdk.apig.v2._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)
- create_vpc_channel(gateway, **attrs)
Create a VPC channel under the specified API Gateway instance
This method creates a new VPC channel, which defines how the gateway communicates with backend services.
- Parameters:
gateway – The ID or an instance of
Gateway
attrs – Dictionary of parameters for VPC channel creation.
- Returns:
An instance of
VpcChannel
- update_vpc_channel(gateway, vpc_channel, **attrs)
Update an existing VPC channel
This method updates the properties of a VPC channel under the specified API Gateway instance.
- Parameters:
gateway – The ID or an instance of
Gateway
vpc_channel – The ID or an instance of
VpcChannel
attrs – Dictionary of attributes to update on the VPC channel
- Returns:
An updated instance of
VpcChannel
- delete_vpc_channel(gateway, vpc_channel, ignore_missing=False)
Delete a VPC channel
This method deletes the specified VPC channel from the given API Gateway instance.
- Parameters:
gateway – The ID or an instance of
Gateway
vpc_channel – The ID or an instance of
VpcChannel
ignore_missing – When set to True, no exception will be raised if the application code does not exist. Default is False.
- Returns:
None
- get_vpc_channel(gateway, vpc_channel)
Retrieve details of a VPC channel
This method fetches the details of the specified VPC channel under the given API Gateway instance.
- Parameters:
gateway – The ID or an instance of
Gateway
vpc_channel – The ID or an instance of
VpcChannel
- Returns:
An instance of
VpcChannel
- vpc_channels(gateway, **attrs)
List all VPC channels under a gateway
This method retrieves all VPC channels configured for the specified API Gateway instance.
- Parameters:
gateway – The ID or an instance of
Gateway
attrs – Optional query parameters for filtering the list
- Returns:
A generator of
VpcChannel
- modify_vpc_channel_healthcheck(gateway, vpc_channel, **attrs)
Update the health check configuration of a VPC channel
This method modifies the health check settings (e.g. path, interval, timeout, thresholds) for the specified VPC channel.
- Parameters:
gateway – The ID or an instance of
Gateway
vpc_channel – The ID or an instance of
VpcChannel
attrs – Dictionary of health check configuration parameters.
- Returns:
An updated instance of
VpcChannel
- add_or_update_backend_server_group(gateway, vpc_channel, **attrs)
Add or update a backend server group for a VPC channel
This method creates or updates a backend server group within the specified VPC channel of an API Gateway instance.
- Parameters:
gateway – The ID or an instance of
Gateway
vpc_channel – The ID or an instance of
VpcChannel
attrs – Dictionary of parameters for creation or update.
- Returns:
An instance of
BackendServerGroup
- backend_server_groups(gateway, vpc_channel, **attrs)
List backend server groups under a VPC channel
This method retrieves all backend server groups configured within the specified VPC channel of an API Gateway instance.
- Parameters:
gateway – The ID or an instance of
Gateway
vpc_channel – The ID or an instance of
VpcChannel
attrs – Optional query parameters for filtering the list
- Returns:
A generator of
BackendServerGroup
instances
- get_backend_server_group(gateway, vpc_channel, backend_group)
Retrieve details of a backend server group
This method fetches details of the specified backend server group under a given VPC channel of an API Gateway instance.
- Parameters:
gateway – The ID or an instance of
Gateway
vpc_channel – The ID or an instance of
VpcChannel
backend_group – The ID or an instance of
BackendServerGroup
- Returns:
An instance of
BackendServerGroup
- update_backend_server_group(gateway, vpc_channel, backend_group, **attrs)
Update a backend server group
This method updates the specified backend server group under a given VPC channel of an API Gateway instance.
- Parameters:
gateway – The ID or an instance of
Gateway
vpc_channel – The ID or an instance of
VpcChannel
backend_group – The ID or an instance of
BackendServerGroup
attrs – Dictionary of attributes to update on the backend group.
- Returns:
An updated instance of
BackendServerGroup
- delete_backend_server_group(gateway, vpc_channel, backend_group, ignore_missing=False)
Delete a backend server group
This method deletes the specified backend server group from a VPC channel under an API Gateway instance.
- Parameters:
gateway – The ID or an instance of
Gateway
vpc_channel – The ID or an instance of
VpcChannel
backend_group – The ID or an instance of
BackendServerGroup
ignore_missing – When set to True, no exception will be raised if the application code does not exist. Default is False.
- Returns:
None
- add_or_update_backend_servers(gateway, vpc_channel, **attrs)
Add or update backend server instances
This method adds or updates backend server instances directly under a VPC channel of the specified API Gateway instance.
- Parameters:
gateway – The ID or an instance of
Gateway
vpc_channel – The ID or an instance of
VpcChannel
attrs – Dictionary containing list of members to add or update.
- Returns:
A list of
BackendServer
instances
- list_backend_servers(gateway, vpc_channel, **attrs)
List backend server instances
This method retrieves all backend server instances configured under a specified VPC channel in an API Gateway instance.
- Parameters:
gateway – The ID or an instance of
Gateway
vpc_channel – The ID or an instance of
VpcChannel
attrs – Optional query parameters for filtering
- Returns:
A generator of
BackendServer
instances
- update_backend_server(gateway, vpc_channel, **attrs)
Update backend server instance(s)
This method updates one or more backend server instances under a specified VPC channel.
- Parameters:
gateway – The ID or an instance of
Gateway
vpc_channel – The ID or an instance of
VpcChannel
attrs – Dictionary with the list of members to update.
- Returns:
A list of
BackendServer
instances
- remove_backend_server(gateway, vpc_channel, backend_server, ignore_missing=False)
Delete a backend server instance
This method deletes a specific backend server from a VPC channel under the specified API Gateway instance.
- Parameters:
gateway – The ID or an instance of
Gateway
vpc_channel – The ID or an instance of
VpcChannel
backend_server – The ID or an instance of
BackendServer
ignore_missing – When set to True, no exception will be raised if the application code does not exist. Default is False.
- Returns:
None
- enable_backend_server(gateway, vpc_channel, backend_server, **attrs)
Enable a backend server instance
This method enables a specific backend server instance by sending a batch-enable request with the server’s ID.
- Parameters:
gateway – The ID or an instance of
Gateway
vpc_channel – The ID or an instance of
VpcChannel
backend_server – The ID or an instance of
BackendServer
attrs – Optional parameters for the enable operation.
- Returns:
None
- disable_backend_server(gateway, vpc_channel, backend_server, **attrs)
Disable a backend server instance
This method disables a specific backend server instance by sending a batch-disable request with the server’s ID.
- Parameters:
gateway – The ID or an instance of
Gateway
vpc_channel – The ID or an instance of
VpcChannel
backend_server – The ID or an instance of
BackendServer
attrs – Optional parameters for the disable operation.
- Returns:
None
Monitoring Information Query¶
- class otcextensions.sdk.apig.v2._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)
- list_api_calls_for_period(gateway, **attrs)
List API call statistics for a specified period
This method retrieves API call statistics for the specified API Gateway instance over a defined time period.
- Parameters:
gateway – The ID of the API Gateway instance or an instance of
Gateway
attrs – Additional parameters for filtering the results, such as start and end time, API ID, etc.
- Returns:
A list of instances of
ApiCallResult
- list_api_calls_for_group(gateway, **attrs)
List API call statistics for a specific group
This method retrieves API call statistics for a specific group within the specified API Gateway instance.
- Parameters:
gateway – The ID of the API Gateway instance or an instance of
Gateway
attrs – Additional parameters for filtering the results, such as group ID, start and end time, etc.
- Returns:
A list of instances of
ApiCallResult
- list_metric_data(gateway, **attrs)
List metric data for the API Gateway instance
This method retrieves metric data for the specified API Gateway instance, allowing you to monitor performance and usage statistics.
- Parameters:
gateway – The ID of the API Gateway instance or an instance of
Gateway
attrs – Additional parameters for filtering the results, such as metric name, time range, etc.
- Returns:
A list of instances of
MetricData
Group Response Operations¶
- class otcextensions.sdk.apig.v2._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)
- create_group_response(gateway, group, **attrs)
Create a custom response for an API group
This method creates a custom response that can be returned by the API Gateway when certain conditions are met (e.g., errors).
- Parameters:
gateway – The ID of the API Gateway instance or an instance of
Gateway
group – The ID of the API group or an instance of
Group
attrs – Attributes for the custom response
- Returns:
An instance of
GroupResponse
- get_group_response(gateway, group, response)
Retrieve a specific group response
This method fetches details of a specific custom response for an API group within the specified API Gateway instance.
- Parameters:
gateway – The ID of the API Gateway instance or an instance of
Gateway
group – The ID of the API group or an instance of
Group
response – The ID of the group response or an instance of
GroupResponse
- Returns:
An instance of
GroupResponse
- group_responses(gateway, group, **attrs)
List all custom responses for an API group This method retrieves all custom responses defined for a specific API group within the specified API Gateway instance.
- Parameters:
gateway – The ID of the API Gateway instance or an instance of
Gateway
group – The ID of the API group or an instance of
Group
attrs – Additional parameters for filtering the list, such as limit, offset, or specific response attributes
- Returns:
A generator of
GroupResponse
- update_group_response(gateway, group, response, **attrs)
Update a custom response for an API group This method updates an existing custom response for a specific API group within the specified API Gateway instance.
- Parameters:
gateway – The ID of the API Gateway instance or an instance of
Gateway
group – The ID of the API group or an instance of
Group
response – The ID of the group response or an instance of
GroupResponse
attrs – Attributes to update in the group response
- Returns:
The updated instance of
GroupResponse
- delete_group_response(gateway, group, response, ignore_missing=False)
Delete a custom response for an API group This method deletes a specific custom response for an API group within the specified API Gateway instance.
- Parameters:
gateway – The ID of the API Gateway instance or an instance of
Gateway
group – The ID of the API group or an instance of
Group
response – The ID of the group response or an instance of
GroupResponse
ignore_missing – If True, no exception is raised if the response does not exist. Default is False.
- Returns:
None
- get_error_response(gateway, group, response, response_type)
Retrieve a specific error response for an API group This method fetches details of a specific error response for an API group within the specified API Gateway instance.
- Parameters:
gateway – The ID of the API Gateway instance or an instance of
Gateway
group – The ID of the API group or an instance of
Group
response – The ID of the group response or an instance of
GroupResponse
response_type – The type of the error response (e.g., ‘default’, ‘unauthorized’, ‘not_found’, etc.)
- Returns:
An instance of
ErrorResponse
- update_error_response(gateway, group, response, response_type, **attrs)
Update a custom error response for an API group This method updates an existing custom error response for a specific API group within the specified API Gateway instance.
- Parameters:
gateway – The ID of the API Gateway instance or an instance of
Gateway
group – The ID of the API group or an instance of
Group
response – The ID of the group response or an instance of
GroupResponse
response_type – The type of the error response (e.g., ‘default’, ‘unauthorized’, ‘not_found’, etc.)
attrs – Attributes to update in the error response
- Returns:
The updated instance of
ErrorResponse
- delete_error_response(gateway, group, response, response_type)
Delete a custom error response for an API group This method deletes a specific custom error response for an API group within the specified API Gateway instance.
- Parameters:
gateway – The ID of the API Gateway instance or an instance of
Gateway
group – The ID of the API group or an instance of
Group
response – The ID of the group response or an instance of
GroupResponse
response_type – The type of the error response (e.g., ‘default’, ‘unauthorized’, ‘not_found’, etc.)
- Returns:
None
Tag Operations¶
- class otcextensions.sdk.apig.v2._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)
SSL Certificate Operations¶
- class otcextensions.sdk.apig.v2._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)
- create_ssl_certificate(**attrs)
Create a new SSL certificate This method creates a new SSL certificate for the specified API Gateway instance.
- Parameters:
attrs – Attributes for the SSL certificate, such as name, cert_content, private_key, type, etc.
- Returns:
An instance of
SslCertificate
- get_ssl_certificate(ssl_certificate)
Retrieve details of an SSL certificate
This method fetches the details of a specific SSL certificate associated with the given API Gateway instance.
- Parameters:
ssl_certificate – The ID or an instance of
SslCertificate
- Returns:
An instance of
SslCertificate
- ssl_certificates(**attrs)
List all SSL certificates
This method retrieves all SSL certificates associated with the API Gateway instance.
- Parameters:
attrs – Optional query parameters for filtering the list, such as limit, offset, common_name, etc.
- Returns:
A generator of
SslCertificate
- update_ssl_certificate(ssl_certificate, **attrs)
Update an existing SSL certificate
This method updates the specified SSL certificate with new attributes.
- Parameters:
ssl_certificate – The ID or an instance of
SslCertificate
attrs – Attributes to update in the SSL certificate
- Returns:
The updated instance of
SslCertificate
- delete_ssl_certificate(ssl_certificate, ignore_missing=False)
Delete an SSL certificate
This method deletes the specified SSL certificate from the API Gateway instance.
- Parameters:
ssl_certificate – The ID or an instance of
SslCertificate
ignore_missing – If True, no exception is raised if the certificate does not exist. Default is False.
- Returns:
None
- bind_domain_to_certificate(gateway, group, domain, **attrs)
Bind an SSL certificate to a domain
This method binds the specified SSL certificate to a domain within an API Gateway instance.
- Parameters:
gateway – The ID or an instance of
Gateway
group – The ID or an instance of
Group
domain – The ID or an instance of
Domain
- Returns:
None
- unbind_domain_from_certificate(gateway, group, domain, **attrs)
Unbind an SSL certificate from a domain
This method unbinds the specified SSL certificate from a domain within an API Gateway instance.
- Parameters:
gateway – The ID or an instance of
Gateway
group – The ID or an instance of
Group
domain – The ID or an instance of
Domain
- Returns:
None
- domains_for_certificate(ssl_certificate, **attrs)
List all domains bound to an SSL certificate
This method retrieves all domains that are currently bound to the specified SSL certificate within an API Gateway instance.
- Parameters:
ssl_certificate – The ID or an instance of
SslCertificate
attrs – Optional query parameters for filtering the list
- Returns:
A generator of
SslDomain
instances
- bind_ssl_certificates_for_domain(ssl_certificate, **attrs)
List all SSL certificates bound to a domain This method retrieves all SSL certificates that are currently bound to the specified domain within an API Gateway instance.
- Parameters:
ssl_certificate – The ID or an instance of
SslCertificate
attrs – Optional query parameters for filtering the list
- Returns:
None
- unbind_ssl_certificates_for_domain(ssl_certificate, **attrs)
Unbind an SSL certificate from a domain This method unbinds the specified SSL certificate from a domain within an API Gateway instance.
- Parameters:
ssl_certificate – The ID or an instance of
SslCertificate
attrs – Optional parameters for the unbind operation
- Returns:
None
Configuration Operations¶
- class otcextensions.sdk.apig.v2._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(**attrs)
List all configuration items
This method retrieves all configuration items for the API Gateway instance.
- Parameters:
attrs – Optional query parameters for filtering the list, such as limit, offset, or specific config attributes
- Returns:
A generator of
Config
instances
- configs_for_gateway(gateway_id, **attrs)
Get configuration items for a specific gateway.
- Parameters:
gateway_id – The ID of the gateway.
attrs – Additional parameters to be passed to the underlying Session.get method.
- Returns:
A generator of configuration items.