vmware.vmc.console package¶
Subpackages¶
- vmware.vmc.console.api package
- Submodules
- vmware.vmc.console.api.account_linking_api module
- vmware.vmc.console.api.addons_api module
- vmware.vmc.console.api.clusters_api module
- vmware.vmc.console.api.config_storage_api module
- vmware.vmc.console.api.credentials_api module
- vmware.vmc.console.api.dns_api module
- vmware.vmc.console.api.edges_api module
- vmware.vmc.console.api.esx_api module
- vmware.vmc.console.api.hcx_api module
- vmware.vmc.console.api.locale_api module
- vmware.vmc.console.api.msft_licensing_api module
- vmware.vmc.console.api.network_api module
- vmware.vmc.console.api.orgs_api module
- vmware.vmc.console.api.publicip_api module
- vmware.vmc.console.api.reservations_api module
- vmware.vmc.console.api.sddc_api module
- vmware.vmc.console.api.sddc_networks_api module
- vmware.vmc.console.api.sddc_template_api module
- vmware.vmc.console.api.storage_api module
- vmware.vmc.console.api.subscription_api module
- vmware.vmc.console.api.task_api module
- vmware.vmc.console.api.tbrs_api module
- vmware.vmc.console.api.troubleshooting_api module
- Module contents
- vmware.vmc.console.models package
- Submodules
- vmware.vmc.console.models.abstract_entity module
- vmware.vmc.console.models.account_link_config module
- vmware.vmc.console.models.account_link_sddc_config module
- vmware.vmc.console.models.address_fw_source_destination module
- vmware.vmc.console.models.agent module
- vmware.vmc.console.models.ami_info module
- vmware.vmc.console.models.appliances_summary module
- vmware.vmc.console.models.application module
- vmware.vmc.console.models.available_zone_info module
- vmware.vmc.console.models.aws_agent module
- vmware.vmc.console.models.aws_agent_all_of module
- vmware.vmc.console.models.aws_cloud_provider module
- vmware.vmc.console.models.aws_cloud_provider_all_of module
- vmware.vmc.console.models.aws_compatible_subnets module
- vmware.vmc.console.models.aws_customer_connected_account module
- vmware.vmc.console.models.aws_customer_connected_account_all_of module
- vmware.vmc.console.models.aws_esx_host module
- vmware.vmc.console.models.aws_esx_host_all_of module
- vmware.vmc.console.models.aws_key_pair module
- vmware.vmc.console.models.aws_kms_info module
- vmware.vmc.console.models.aws_sddc_config module
- vmware.vmc.console.models.aws_sddc_config_all_of module
- vmware.vmc.console.models.aws_sddc_connection module
- vmware.vmc.console.models.aws_sddc_connection_all_of module
- vmware.vmc.console.models.aws_sddc_resource_config module
- vmware.vmc.console.models.aws_sddc_resource_config_all_of module
- vmware.vmc.console.models.aws_subnet module
- vmware.vmc.console.models.ca_certificates module
- vmware.vmc.console.models.cbm_statistic module
- vmware.vmc.console.models.cbm_statistics module
- vmware.vmc.console.models.cbm_stats_data module
- vmware.vmc.console.models.cloud_provider module
- vmware.vmc.console.models.cluster module
- vmware.vmc.console.models.cluster_config module
- vmware.vmc.console.models.cluster_reconfigure_params module
- vmware.vmc.console.models.compute_gateway_template module
- vmware.vmc.console.models.compute_gateway_template_all_of module
- vmware.vmc.console.models.config_spec module
- vmware.vmc.console.models.connectivity_agent_validation module
- vmware.vmc.console.models.connectivity_validation_group module
- vmware.vmc.console.models.connectivity_validation_groups module
- vmware.vmc.console.models.connectivity_validation_input module
- vmware.vmc.console.models.connectivity_validation_sub_group module
- vmware.vmc.console.models.crl_certificates module
- vmware.vmc.console.models.customer_eni_info module
- vmware.vmc.console.models.dashboard_data module
- vmware.vmc.console.models.dashboard_stat module
- vmware.vmc.console.models.dashboard_statistics module
- vmware.vmc.console.models.data_page_edge_summary module
- vmware.vmc.console.models.data_page_sddc_network module
- vmware.vmc.console.models.data_permissions module
- vmware.vmc.console.models.dhcp_lease_info module
- vmware.vmc.console.models.dhcp_leases module
- vmware.vmc.console.models.dns_config module
- vmware.vmc.console.models.dns_forwarders module
- vmware.vmc.console.models.dns_listeners module
- vmware.vmc.console.models.dns_listeners_all_of module
- vmware.vmc.console.models.dns_response_stats module
- vmware.vmc.console.models.dns_status_and_stats module
- vmware.vmc.console.models.dns_view module
- vmware.vmc.console.models.dns_view_match module
- vmware.vmc.console.models.dns_views module
- vmware.vmc.console.models.ebs_backed_vsan_config module
- vmware.vmc.console.models.edge_job module
- vmware.vmc.console.models.edge_status module
- vmware.vmc.console.models.edge_summary module
- vmware.vmc.console.models.edge_vm_status module
- vmware.vmc.console.models.edge_vnic_address_group module
- vmware.vmc.console.models.edge_vnic_address_groups module
- vmware.vmc.console.models.eni_info module
- vmware.vmc.console.models.entity_capacity module
- vmware.vmc.console.models.error_response module
- vmware.vmc.console.models.esx_config module
- vmware.vmc.console.models.esx_host module
- vmware.vmc.console.models.esx_host_info module
- vmware.vmc.console.models.extended_attribute module
- vmware.vmc.console.models.feature_capabilities module
- vmware.vmc.console.models.feature_capability module
- vmware.vmc.console.models.feature_status module
- vmware.vmc.console.models.firewall_config module
- vmware.vmc.console.models.firewall_dashboard_stats module
- vmware.vmc.console.models.firewall_default_policy module
- vmware.vmc.console.models.firewall_global_config module
- vmware.vmc.console.models.firewall_rule module
- vmware.vmc.console.models.firewall_rule_scope module
- vmware.vmc.console.models.firewall_rule_stats module
- vmware.vmc.console.models.firewall_rules module
- vmware.vmc.console.models.firewall_service module
- vmware.vmc.console.models.gateway_template module
- vmware.vmc.console.models.glcm_bundle module
- vmware.vmc.console.models.host_instance_types module
- vmware.vmc.console.models.host_lease_info module
- vmware.vmc.console.models.instance_type_config module
- vmware.vmc.console.models.interaction_permissions module
- vmware.vmc.console.models.interfaces_dashboard_stats module
- vmware.vmc.console.models.ip_addresses module
- vmware.vmc.console.models.ipsec module
- vmware.vmc.console.models.ipsec_dashboard_stats module
- vmware.vmc.console.models.ipsec_global_config module
- vmware.vmc.console.models.ipsec_site module
- vmware.vmc.console.models.ipsec_site_ike_status module
- vmware.vmc.console.models.ipsec_site_stats module
- vmware.vmc.console.models.ipsec_sites module
- vmware.vmc.console.models.ipsec_status_and_stats module
- vmware.vmc.console.models.ipsec_tunnel_stats module
- vmware.vmc.console.models.key_value_attributes module
- vmware.vmc.console.models.kms_vpc_endpoint module
- vmware.vmc.console.models.l2_extension module
- vmware.vmc.console.models.l2_vpn module
- vmware.vmc.console.models.l2vpn_stats module
- vmware.vmc.console.models.l2vpn_status_and_stats module
- vmware.vmc.console.models.licence_acl_permissions module
- vmware.vmc.console.models.load_balancer_dashboard_stats module
- vmware.vmc.console.models.logging module
- vmware.vmc.console.models.logical_network module
- vmware.vmc.console.models.logical_router_scope module
- vmware.vmc.console.models.logical_router_scopes module
- vmware.vmc.console.models.mac_address module
- vmware.vmc.console.models.maintenance_window module
- vmware.vmc.console.models.maintenance_window_entry module
- vmware.vmc.console.models.maintenance_window_get module
- vmware.vmc.console.models.maintenance_window_get_all_of module
- vmware.vmc.console.models.management_gateway_template module
- vmware.vmc.console.models.management_gateway_template_all_of module
- vmware.vmc.console.models.map_zones_request module
- vmware.vmc.console.models.meta_dashboard_stats module
- vmware.vmc.console.models.metadata module
- vmware.vmc.console.models.msft_licensing_config module
- vmware.vmc.console.models.nat module
- vmware.vmc.console.models.nat_rule module
- vmware.vmc.console.models.nat_rules module
- vmware.vmc.console.models.network_template module
- vmware.vmc.console.models.new_credentials module
- vmware.vmc.console.models.nsxfirewallrule module
- vmware.vmc.console.models.nsxfirewallservice module
- vmware.vmc.console.models.nsxl2vpn module
- vmware.vmc.console.models.nsxnatrule module
- vmware.vmc.console.models.nsxsite module
- vmware.vmc.console.models.nsxt_addons module
- vmware.vmc.console.models.object_type module
- vmware.vmc.console.models.offer_instances_holder module
- vmware.vmc.console.models.offer_type module
- vmware.vmc.console.models.on_demand_offer_instance module
- vmware.vmc.console.models.org_properties module
- vmware.vmc.console.models.org_seller_info module
- vmware.vmc.console.models.organization module
- vmware.vmc.console.models.organization_all_of module
- vmware.vmc.console.models.paged_edge_list module
- vmware.vmc.console.models.paging_info module
- vmware.vmc.console.models.payment_method_info module
- vmware.vmc.console.models.pop_agent_xeni_connection module
- vmware.vmc.console.models.pop_ami_info module
- vmware.vmc.console.models.pop_ami_info_all_of module
- vmware.vmc.console.models.pop_info module
- vmware.vmc.console.models.pop_service_info module
- vmware.vmc.console.models.provision_spec module
- vmware.vmc.console.models.requests module
- vmware.vmc.console.models.reservation module
- vmware.vmc.console.models.reservation_in_mw module
- vmware.vmc.console.models.reservation_schedule module
- vmware.vmc.console.models.reservation_schedule_all_of module
- vmware.vmc.console.models.reservation_window module
- vmware.vmc.console.models.reservation_window_maintenance_properties module
- vmware.vmc.console.models.result module
- vmware.vmc.console.models.route_table_info module
- vmware.vmc.console.models.scope_info module
- vmware.vmc.console.models.sddc module
- vmware.vmc.console.models.sddc_all_of module
- vmware.vmc.console.models.sddc_allocate_public_ip_spec module
- vmware.vmc.console.models.sddc_config module
- vmware.vmc.console.models.sddc_config_spec module
- vmware.vmc.console.models.sddc_id module
- vmware.vmc.console.models.sddc_link_config module
- vmware.vmc.console.models.sddc_manifest module
- vmware.vmc.console.models.sddc_network module
- vmware.vmc.console.models.sddc_network_address_group module
- vmware.vmc.console.models.sddc_network_address_groups module
- vmware.vmc.console.models.sddc_network_dhcp_config module
- vmware.vmc.console.models.sddc_network_dhcp_ip_pool module
- vmware.vmc.console.models.sddc_patch_request module
- vmware.vmc.console.models.sddc_public_ip module
- vmware.vmc.console.models.sddc_resource_config module
- vmware.vmc.console.models.sddc_size module
- vmware.vmc.console.models.sddc_state_request module
- vmware.vmc.console.models.sddc_template module
- vmware.vmc.console.models.sddc_template_all_of module
- vmware.vmc.console.models.secondary_addresses module
- vmware.vmc.console.models.service_error module
- vmware.vmc.console.models.site module
- vmware.vmc.console.models.sites module
- vmware.vmc.console.models.sslvpn_dashboard_stats module
- vmware.vmc.console.models.sub_interface module
- vmware.vmc.console.models.sub_interfaces module
- vmware.vmc.console.models.subnet module
- vmware.vmc.console.models.subnet_info module
- vmware.vmc.console.models.subnet_info_all_of module
- vmware.vmc.console.models.subnet_route_table_info module
- vmware.vmc.console.models.subnets module
- vmware.vmc.console.models.subscription_details module
- vmware.vmc.console.models.subscription_products module
- vmware.vmc.console.models.subscription_request module
- vmware.vmc.console.models.support_window module
- vmware.vmc.console.models.support_window_id module
- vmware.vmc.console.models.task module
- vmware.vmc.console.models.task_all_of module
- vmware.vmc.console.models.task_progress_phase module
- vmware.vmc.console.models.term_billing_options module
- vmware.vmc.console.models.term_offer_instance module
- vmware.vmc.console.models.traffic_shaping_policy module
- vmware.vmc.console.models.update_credentials module
- vmware.vmc.console.models.vmc_locale module
- vmware.vmc.console.models.vnic module
- vmware.vmc.console.models.vnics module
- vmware.vmc.console.models.vpc_info module
- vmware.vmc.console.models.vpc_info_subnets module
- vmware.vmc.console.models.vpc_info_subnets_all_of module
- vmware.vmc.console.models.vpn module
- vmware.vmc.console.models.vpn_channel_status module
- vmware.vmc.console.models.vpn_tunnel_status module
- vmware.vmc.console.models.vpn_tunnel_traffic_stats module
- vmware.vmc.console.models.vsan_available_capacity module
- vmware.vmc.console.models.vsan_cluster_reconfig_bias module
- vmware.vmc.console.models.vsan_cluster_reconfig_constraints module
- vmware.vmc.console.models.vsan_config_constraints module
- vmware.vmc.console.models.vsan_encryption_config module
- Module contents
Submodules¶
vmware.vmc.console.api_client module¶
VMware Cloud APIs
All VMware Cloud APIs require a valid authentication token; which can be obtained by issuing a POST:
` curl -s -X POST \ -H "Content-Type: application/json" \ https://console.cloud.vmware.com/csp/gateway/am/api/auth/api-tokens/authorize?refresh_token={refresh-token} `
* This CSP API is defined at: https://console.cloud.vmware.com/csp/gateway/am/api/swagger-ui.html#/Authentication/getAccessTokenByApiRefreshTokenUsingPOST * The refresh_token used to get a valid authentication token can be obtained after successful login to following URL via a web browser: https://console.cloud.vmware.com/csp/gateway/portal/#/user/tokens. * Most VMware Cloud APIs require an org identifier. This can be obtained by issuing a GET on /vmc/api/orgs and extracting the id field # noqa: E501
The version of the OpenAPI document: 1.0 Generated by: https://openapi-generator.tech
-
class
vmware.vmc.console.api_client.
ApiClient
(configuration=None, header_name=None, header_value=None, cookie=None, pool_threads=1)¶ Bases:
object
Generic API client for OpenAPI client library builds.
OpenAPI generic API client. This client handles the client- server communication, and is invariant across implementations. Specifics of the methods and models for each application are generated from the OpenAPI templates.
NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually.
- Parameters
configuration – .Configuration object for this client
header_name – a header to pass when making calls to the API.
header_value – a header value to pass when making calls to the API.
cookie – a cookie to include in the header when making calls to the API
pool_threads – The number of threads to use for async requests to the API. More threads means more concurrent API requests.
-
NATIVE_TYPES_MAPPING
= {'bool': <class 'bool'>, 'date': <class 'datetime.date'>, 'datetime': <class 'datetime.datetime'>, 'float': <class 'float'>, 'int': <class 'int'>, 'long': <class 'int'>, 'object': <class 'object'>, 'str': <class 'str'>}¶
-
PRIMITIVE_TYPES
= (<class 'float'>, <class 'bool'>, <class 'bytes'>, <class 'str'>, <class 'int'>)¶
-
call_api
(resource_path, method, path_params=None, query_params=None, header_params=None, body=None, post_params=None, files=None, response_type=None, auth_settings=None, async_req=None, _return_http_data_only=None, collection_formats=None, _preload_content=True, _request_timeout=None, _host=None)¶ Makes the HTTP request (synchronous) and returns deserialized data.
To make an async_req request, set the async_req parameter.
- Parameters
resource_path – Path to method endpoint.
method – Method to call.
path_params – Path parameters in the url.
query_params – Query parameters in the url.
header_params – Header parameters to be placed in the request header.
body – Request body.
dict (files) – Request post form parameters, for application/x-www-form-urlencoded, multipart/form-data.
list (auth_settings) – Auth Settings names for the request.
response – Response data type.
dict – key -> filename, value -> filepath, for multipart/form-data.
bool (async_req) – execute request asynchronously
_return_http_data_only – response data without head status code and headers
collection_formats – dict of collection formats for path, query, header, and post parameters.
_preload_content – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns
If async_req parameter is True, the request will be called asynchronously. The method will return the request thread. If parameter async_req is False or missing, then the method will return the response directly.
-
close
()¶
-
deserialize
(response, response_type)¶ Deserializes response into an object.
- Parameters
response – RESTResponse object to be deserialized.
response_type – class literal for deserialized object, or string of class name.
- Returns
deserialized object.
-
files_parameters
(files=None)¶ Builds form parameters.
- Parameters
files – File parameters.
- Returns
Form parameters with files.
-
parameters_to_tuples
(params, collection_formats)¶ Get parameters as list of tuples, formatting collections.
- Parameters
params – Parameters as dict or list of two-tuples
collection_formats (dict) – Parameter collection formats
- Returns
Parameters as list of tuples, collections formatted
-
property
pool
¶ Create thread pool on first request avoids instantiating unused threadpool for blocking clients.
-
request
(method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, _request_timeout=None)¶ Makes the HTTP request using RESTClient.
-
sanitize_for_serialization
(obj)¶ Builds a JSON POST object.
If obj is None, return None. If obj is str, int, long, float, bool, return directly. If obj is datetime.datetime, datetime.date
convert to string in iso8601 format.
If obj is list, sanitize each element in the list. If obj is dict, return the dict. If obj is OpenAPI model, return the properties dict.
- Parameters
obj – The data to serialize.
- Returns
The serialized form of data.
-
select_header_accept
(accepts)¶ Returns Accept based on an array of accepts provided.
- Parameters
accepts – List of headers.
- Returns
Accept (e.g. application/json).
-
select_header_content_type
(content_types)¶ Returns Content-Type based on an array of content_types provided.
- Parameters
content_types – List of content-types.
- Returns
Content-Type (e.g. application/json).
-
set_default_header
(header_name, header_value)¶
-
update_params_for_auth
(headers, querys, auth_settings)¶ Updates header and query params based on authentication setting.
- Parameters
headers – Header parameters dict to be updated.
querys – Query parameters tuple list to be updated.
auth_settings – Authentication setting identifiers list.
-
property
user_agent
¶ User agent for this API client
vmware.vmc.console.configuration module¶
VMware Cloud APIs
All VMware Cloud APIs require a valid authentication token; which can be obtained by issuing a POST:
` curl -s -X POST \ -H "Content-Type: application/json" \ https://console.cloud.vmware.com/csp/gateway/am/api/auth/api-tokens/authorize?refresh_token={refresh-token} `
* This CSP API is defined at: https://console.cloud.vmware.com/csp/gateway/am/api/swagger-ui.html#/Authentication/getAccessTokenByApiRefreshTokenUsingPOST * The refresh_token used to get a valid authentication token can be obtained after successful login to following URL via a web browser: https://console.cloud.vmware.com/csp/gateway/portal/#/user/tokens. * Most VMware Cloud APIs require an org identifier. This can be obtained by issuing a GET on /vmc/api/orgs and extracting the id field # noqa: E501
The version of the OpenAPI document: 1.0 Generated by: https://openapi-generator.tech
-
class
vmware.vmc.console.configuration.
Configuration
(host='https://vmc.vmware.com/vmc/api', api_key=None, api_key_prefix=None, username=None, password=None, discard_unknown_keys=False)¶ Bases:
object
NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech Do not edit the class manually.
- param host
Base url
- param api_key
Dict to store API key(s). Each entry in the dict specifies an API key. The dict key is the name of the security scheme in the OAS specification. The dict value is the API key secret.
- param api_key_prefix
Dict to store API prefix (e.g. Bearer) The dict key is the name of the security scheme in the OAS specification. The dict value is an API key prefix when generating the auth data.
- param username
Username for HTTP basic authentication
- param password
Password for HTTP basic authentication
- param discard_unknown_keys
Boolean value indicating whether to discard unknown properties. A server may send a response that includes additional properties that are not known by the client in the following scenarios: 1. The OpenAPI document is incomplete, i.e. it does not match the server
implementation.
The client was generated using an older version of the OpenAPI document and the server has been upgraded since then.
If a schema in the OpenAPI document defines the additionalProperties attribute, then all undeclared properties received by the server are injected into the additional properties map. In that case, there are undeclared properties, and nothing to discard.
- Example
API Key Authentication Example. Given the following security scheme in the OpenAPI specification:
- components:
- securitySchemes:
- cookieAuth: # name for the security scheme
type: apiKey in: cookie name: JSESSIONID # cookie name
You can programmatically set the cookie:
- conf = vmware.vmc.console.Configuration(
api_key={‘cookieAuth’: ‘abc123’} api_key_prefix={‘cookieAuth’: ‘JSESSIONID’}
)
- The following cookie will be added to the HTTP request:
Cookie: JSESSIONID abc123
Constructor
-
assert_hostname
¶ Set this to True/False to enable/disable SSL hostname verification.
-
auth_settings
()¶ Gets Auth Settings dict for api client.
- Returns
The Auth Settings information dict.
-
cert_file
¶ client certificate file
-
connection_pool_maxsize
¶ urllib3 connection pool’s maximum number of connections saved per pool. urllib3 uses 1 connection as default value, but this is not the best value when you are making a lot of possibly parallel requests to the same host, which is often the case here. cpu_count * 5 is used as default value to increase performance.
-
property
debug
¶ Debug switch
-
get_api_key_with_prefix
(identifier)¶ Gets API key (with prefix if set).
- Parameters
identifier – The identifier of apiKey.
- Returns
The token for api key authentication.
-
get_basic_auth_token
()¶ Gets HTTP basic authentication header (string).
- Returns
The token for basic HTTP authentication.
-
classmethod
get_default_copy
()¶ Return new instance of configuration.
This method returns newly created, based on default constructor, object of Configuration class or returns a copy of default configuration passed by the set_default method.
- Returns
The configuration object.
-
get_host_from_settings
(index, variables=None)¶ Gets host URL based on the index and variables :param index: array index of the host settings :param variables: hash of variable and the corresponding value :return: URL based on host settings
-
get_host_settings
()¶ Gets an array of host settings
- Returns
An array of host settings
-
host
¶ Default Base url
-
key_file
¶ client key file
-
logger
¶ Logging Settings
-
property
logger_file
¶ Debug file location
-
logger_file_handler
¶ Log file handler
-
property
logger_format
¶ Log format
-
logger_stream_handler
¶ Log stream handler
-
password
¶ Password for HTTP basic authentication
-
proxy
¶ Proxy URL
-
proxy_headers
¶ Proxy headers
-
refresh_api_key_hook
¶ function hook to refresh API key if expired
-
retries
¶ Adding retries to override urllib3 default value 3
-
safe_chars_for_path_param
¶ Safe chars for path_param
-
classmethod
set_default
(default)¶ Set default instance of configuration.
It stores default configuration, which can be returned by get_default_copy method.
- Parameters
default – object of Configuration
-
ssl_ca_cert
¶ Set this to customize the certificate file to verify the peer.
-
temp_folder_path
¶ Temp file folder for downloading files
-
to_debug_report
()¶ Gets the essential information for debugging.
- Returns
The report for debugging.
-
username
¶ Username for HTTP basic authentication
-
verify_ssl
¶ SSL/TLS verification Set this to false to skip verifying SSL certificate when calling API from https server.
vmware.vmc.console.exceptions module¶
VMware Cloud APIs
All VMware Cloud APIs require a valid authentication token; which can be obtained by issuing a POST:
` curl -s -X POST \ -H "Content-Type: application/json" \ https://console.cloud.vmware.com/csp/gateway/am/api/auth/api-tokens/authorize?refresh_token={refresh-token} `
* This CSP API is defined at: https://console.cloud.vmware.com/csp/gateway/am/api/swagger-ui.html#/Authentication/getAccessTokenByApiRefreshTokenUsingPOST * The refresh_token used to get a valid authentication token can be obtained after successful login to following URL via a web browser: https://console.cloud.vmware.com/csp/gateway/portal/#/user/tokens. * Most VMware Cloud APIs require an org identifier. This can be obtained by issuing a GET on /vmc/api/orgs and extracting the id field # noqa: E501
The version of the OpenAPI document: 1.0 Generated by: https://openapi-generator.tech
-
exception
vmware.vmc.console.exceptions.
ApiException
(status=None, reason=None, http_resp=None)¶
-
exception
vmware.vmc.console.exceptions.
ApiKeyError
(msg, path_to_item=None)¶ Bases:
vmware.vmc.console.exceptions.OpenApiException
,KeyError
- Args:
msg (str): the exception message
- Keyword Args:
- path_to_item (None/list) the path to the exception in the
received_data dict
-
exception
vmware.vmc.console.exceptions.
ApiTypeError
(msg, path_to_item=None, valid_classes=None, key_type=None)¶ Bases:
vmware.vmc.console.exceptions.OpenApiException
,TypeError
Raises an exception for TypeErrors
- Args:
msg (str): the exception message
- Keyword Args:
- path_to_item (list): a list of keys an indices to get to the
current_item None if unset
- valid_classes (tuple): the primitive classes that current item
should be an instance of None if unset
- key_type (bool): False if our value is a value in a dict
True if it is a key in a dict False if our item is an item in a list None if unset
-
exception
vmware.vmc.console.exceptions.
ApiValueError
(msg, path_to_item=None)¶ Bases:
vmware.vmc.console.exceptions.OpenApiException
,ValueError
- Args:
msg (str): the exception message
- Keyword Args:
- path_to_item (list) the path to the exception in the
received_data dict. None if unset
-
exception
vmware.vmc.console.exceptions.
OpenApiException
¶ Bases:
Exception
The base exception class for all OpenAPIExceptions
-
vmware.vmc.console.exceptions.
render_path
(path_to_item)¶ Returns a string representation of a path
vmware.vmc.console.rest module¶
VMware Cloud APIs
All VMware Cloud APIs require a valid authentication token; which can be obtained by issuing a POST:
` curl -s -X POST \ -H "Content-Type: application/json" \ https://console.cloud.vmware.com/csp/gateway/am/api/auth/api-tokens/authorize?refresh_token={refresh-token} `
* This CSP API is defined at: https://console.cloud.vmware.com/csp/gateway/am/api/swagger-ui.html#/Authentication/getAccessTokenByApiRefreshTokenUsingPOST * The refresh_token used to get a valid authentication token can be obtained after successful login to following URL via a web browser: https://console.cloud.vmware.com/csp/gateway/portal/#/user/tokens. * Most VMware Cloud APIs require an org identifier. This can be obtained by issuing a GET on /vmc/api/orgs and extracting the id field # noqa: E501
The version of the OpenAPI document: 1.0 Generated by: https://openapi-generator.tech
-
class
vmware.vmc.console.rest.
RESTClientObject
(configuration, pools_size=4, maxsize=None)¶ Bases:
object
-
DELETE
(url, headers=None, query_params=None, body=None, _preload_content=True, _request_timeout=None)¶
-
GET
(url, headers=None, query_params=None, _preload_content=True, _request_timeout=None)¶
-
HEAD
(url, headers=None, query_params=None, _preload_content=True, _request_timeout=None)¶
-
OPTIONS
(url, headers=None, query_params=None, post_params=None, body=None, _preload_content=True, _request_timeout=None)¶
-
PATCH
(url, headers=None, query_params=None, post_params=None, body=None, _preload_content=True, _request_timeout=None)¶
-
POST
(url, headers=None, query_params=None, post_params=None, body=None, _preload_content=True, _request_timeout=None)¶
-
PUT
(url, headers=None, query_params=None, post_params=None, body=None, _preload_content=True, _request_timeout=None)¶
-
request
(method, url, query_params=None, headers=None, body=None, post_params=None, _preload_content=True, _request_timeout=None)¶ Perform requests.
- Parameters
method – http request method
url – http request url
query_params – query parameters in the url
headers – http request headers
body – request json body, for application/json
post_params – request post parameters, application/x-www-form-urlencoded and multipart/form-data
_preload_content – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
-
Module contents¶
VMware Cloud APIs
All VMware Cloud APIs require a valid authentication token; which can be obtained by issuing a POST:
` curl -s -X POST \ -H "Content-Type: application/json" \ https://console.cloud.vmware.com/csp/gateway/am/api/auth/api-tokens/authorize?refresh_token={refresh-token} `
* This CSP API is defined at: https://console.cloud.vmware.com/csp/gateway/am/api/swagger-ui.html#/Authentication/getAccessTokenByApiRefreshTokenUsingPOST * The refresh_token used to get a valid authentication token can be obtained after successful login to following URL via a web browser: https://console.cloud.vmware.com/csp/gateway/portal/#/user/tokens. * Most VMware Cloud APIs require an org identifier. This can be obtained by issuing a GET on /vmc/api/orgs and extracting the id field # noqa: E501
The version of the OpenAPI document: 1.0 Generated by: https://openapi-generator.tech