otcextensions.sdk.dcs.v1.instance¶
The DCS Instance Class¶
The Instance
class inherits from
Resource
.
- class otcextensions.sdk.dcs.v1.instance.Instance(_synchronized=False, connection=None, **attrs)¶
The base resource
- Parameters:
_synchronized (bool) – This is not intended to be used directly. See
new()
andexisting()
.connection (openstack.connection.Connection) – Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of
self._connection
in Resource code should protect itself with a check for None.
- resources_key: ty.Optional[str] = 'instances'¶
Plural form of key for resource.
- base_path: str = '/instances'¶
The base part of the URI for this resource.
- allow_create = True¶
Allow create operation for this resource.
- allow_list = True¶
Allow list operation for this resource.
- allow_delete = True¶
Allow delete operation for this resource.
- allow_fetch = True¶
Allow get operation for this resource.
- allow_commit = True¶
Allow update operation for this resource.
- available_zones¶
AZ where a cache node resides. The value of this parameter in the response contains an AZ ID.
- backup_policy¶
Backup policy.
- capacity¶
Cache capacity in GB Type: int
- charging_mode¶
Billing mode. 0 indicates that users only pay for what they use.
- created_at¶
Time at which the DCS instance is created. For example, 2017-03-31T12:24:46.297Z.
- description¶
Instance description
- domain_name¶
Domain name.
- engine¶
Instance engine
- engine_version¶
Cache engine version.
- error_code¶
Error code returned when the DCS instance fails to be created or is in abnormal status.
- id¶
Instance Id
- internal_version¶
Internal DCS version.
- ip¶
Cache node’s IP address in tenant’s VPC.
- lock_time¶
Account lockout duration.
- lock_time_left¶
Remaining time before the account is unlocked.
- maintain_begin¶
Time at which the maintenance time window starts. Format: HH:mm:ss.
- maintain_end¶
Time at which the maintenance time window ends. Format: HH:mm:ss.
- max_memory¶
Overall memory size. Unit: MB.
- message¶
Return message of the operation on the instance
- name: ty.Union[Body, URI]¶
Instance name
- order_id¶
Order ID. An order ID is generated only in the monthly or yearly billing mode. In other billing modes, no value is returned for this parameter.
- password¶
Password.
- port¶
Port of the cache node.
- product_id¶
Product ID used to differentiate DCS instance types. * OTC_DCS_SINGLE: indicates a single-node DCS instance. * OTC_DCS_MS: indicates a master/standby DCS instance. * OTC_DCS_CL: indicates a DCS instance in cluster mode.
- result¶
Result of the operation on the instance
- retry_times_left¶
Count of the change password retries Type: str
- status¶
Cache instance status. Instance Statuses.
- resource_spec_code¶
Resource specifications. * dcs.single_node: indicates a DCS instance in single-node mode. * dcs.master_standby: indicates a DCS instance in master/standby mode. * dcs.cluster: indicates a DCS instance in cluster mode.
- used_memory¶
Size of the used memory. Unit: MB.
- classmethod find(session, name_or_id, ignore_missing=True, **params)¶
Find a resource by its name or id.
- Parameters:
session (
Adapter
) – The session to use for making this request.name_or_id – This resource’s identifier, if needed by the request. The default is
None
.ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.params (dict) – Any additional parameters to be passed into underlying methods, such as to
existing()
in order to pass on URI parameters.
- Returns:
The
Resource
object matching the given name or id or None if nothing matches.- Raises:
openstack.exceptions.DuplicateResource
if more than one resource is found for this request.- Raises:
openstack.exceptions.ResourceNotFound
if nothing is found and ignore_missing isFalse
.
- change_pwd(session, current_password, new_password)¶
Schange instance password
- extend(session, capacity)¶
Extend instance capacity
- stop(session)¶
Stop instance
- start(session)¶
Start instance
- restart(session)¶
Retart instance