TMS API¶
The Tag Management Service Class¶
Tag Management Service (TMS) high-level interface is
available through the tms
member of a
Connection
object. The tms
member
will only be added if the otcextensions.sdk.register_otc_extensions(conn)
method is called.
Predefined Tag Operations¶
- class otcextensions.sdk.tms.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)
- predefined_tags(**query)
Retrieve a generator of PredefinedTags
- Parameters:
query (dict) – Optional query parameters to be sent to limit the resources being returned. * key: Tag key * value: Tag value * limit: Number of query records * marker: Paging location identifier * order_field: Field for sorting * order_method: Sorting will be asc or desc
- Returns:
A generator of backup
PredefinedTag
instances
- create_predefined_tag(**attrs)
Create a new predefined tag with attrs
- Parameters:
attrs (dict) – Keyword arguments which will be used to create a
PredefinedTag
- delete_predefined_tag(**attrs)
Delete a new predefined tag with attrs
- Parameters:
attrs (dict) – Keyword arguments which will be used to delete a
PredefinedTag
- update_predefined_tag(**attrs)
Update a predefined tag
- Parameters:
attrs (dict) – The attributes to update on the predefined tag
- Returns:
The updated tag.
- Return type:
Resource Tag Operations¶
- class otcextensions.sdk.tms.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)
- resource_tags(resource_id, resource_type, project_id=None)
Retrieve a generator of ResourceTags ‘project_id’, ‘resource_id’, ‘resource_type’
- Parameters:
project_id – Optional ID of the project
resource_type – Mandatory type of the resource
resource_id – Mandatory id of the resource
- Returns:
A generator of backup
ResourceTag
instances
- create_resource_tag(**attrs)
Create a new resource tag with attrs
- Parameters:
attrs (dict) – Keyword arguments which will be used to create a
PredefinedTag
- delete_resource_tag(**attrs)
Delete a new resource tag with attrs
- Parameters:
attrs (dict) – Keyword arguments which will be used to delete a
PredefinedTag