def list_thumbnail_task(self): client_factory = ClientFactory('mps') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.mps.apis.ListThumbnailTaskRequest import ListThumbnailTaskRequest params_dict = collect_user_args(self.app) req = ListThumbnailTaskRequest(params_dict) resp = client.send(req) Printer.print_result(resp) except ImportError: print '{"error":"This api is not supported, please use the newer version"}' except Exception as e: print e.message
def describe_container(self): client_factory = ClientFactory('nc') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.nc.apis.DescribeContainerRequest import DescribeContainerRequest params_dict = collect_user_args(self.app) req = DescribeContainerRequest(params_dict) resp = client.send(req) Printer.print_result(resp) except ImportError: print '{"error":"This api is not supported, please use the newer version"}' except Exception as e: print e.message
def set_clean_threshold(self): client_factory = ClientFactory('baseanti') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.baseanti.apis.SetCleanThresholdRequest import SetCleanThresholdRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = SetCleanThresholdRequest(params_dict, headers) resp = client.send(req) Printer.print_result(resp) except ImportError: print('{"error":"This api is not supported, please use the newer version"}') except Exception as e: print(e)
def describe_ip_resource_info(self): client_factory = ClientFactory('baseanti') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.baseanti.apis.DescribeIpResourceInfoRequest import DescribeIpResourceInfoRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = DescribeIpResourceInfoRequest(params_dict, headers) resp = client.send(req) Printer.print_result(resp) except ImportError: print('{"error":"This api is not supported, please use the newer version"}') except Exception as e: print(e)
def delete_mount_target(self): client_factory = ClientFactory('zfs') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.zfs.apis.DeleteMountTargetRequest import DeleteMountTargetRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = DeleteMountTargetRequest(params_dict, headers) resp = client.send(req) Printer.print_result(resp) except ImportError: print('{"error":"This api is not supported, please use the newer version"}') except Exception as e: print(e)
def query_instance(self): client_factory = ClientFactory('renewal') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.renewal.apis.QueryInstanceRequest import QueryInstanceRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = QueryInstanceRequest(params_dict, headers) resp = client.send(req) Printer.print_result(resp) except ImportError: print('{"error":"This api is not supported, please use the newer version"}') except Exception as e: print(e)
def modify_rds_white_list(self): client_factory = ClientFactory('yunding') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.yunding.apis.ModifyRdsWhiteListRequest import ModifyRdsWhiteListRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = ModifyRdsWhiteListRequest(params_dict, headers) resp = client.send(req) Printer.print_result(resp) except ImportError: print('{"error":"This api is not supported, please use the newer version"}') except Exception as e: print(e)
def calculate_total_price(self): client_factory = ClientFactory('billing') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.billing.apis.CalculateTotalPriceRequest import CalculateTotalPriceRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = CalculateTotalPriceRequest(params_dict, headers) resp = client.send(req) Printer.print_result(resp) except ImportError: print('{"error":"This api is not supported, please use the newer version"}') except Exception as e: print(e)
def describe_yd_rds_instances(self): client_factory = ClientFactory('yunding') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.yunding.apis.DescribeYdRdsInstancesRequest import DescribeYdRdsInstancesRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = DescribeYdRdsInstancesRequest(params_dict, headers) resp = client.send(req) Printer.print_result(resp) except ImportError: print('{"error":"This api is not supported, please use the newer version"}') except Exception as e: print(e)
def create_containers(self): client_factory = ClientFactory('nc') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.nc.apis.CreateContainersRequest import CreateContainersRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = CreateContainersRequest(params_dict, headers) resp = client.send(req) Printer.print_result(resp) except ImportError: print('{"error":"This api is not supported, please use the newer version"}') except Exception as e: print(e)
def test_site_monitor(self): client_factory = ClientFactory('detection') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.detection.apis.TestSiteMonitorRequest import TestSiteMonitorRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = TestSiteMonitorRequest(params_dict, headers) resp = client.send(req) Printer.print_result(resp) except ImportError: print('{"error":"This api is not supported, please use the newer version"}') except Exception as e: print(e)
def describe_bandwidth_traffic(self): client_factory = ClientFactory('jdccs') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.jdccs.apis.DescribeBandwidthTrafficRequest import DescribeBandwidthTrafficRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = DescribeBandwidthTrafficRequest(params_dict, headers) resp = client.send(req) Printer.print_result(resp) except ImportError: print('{"error":"This api is not supported, please use the newer version"}') except Exception as e: print(e)
def unassign_secondary_ips(self): client_factory = ClientFactory('yunding') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.yunding.apis.UnassignSecondaryIpsRequest import UnassignSecondaryIpsRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = UnassignSecondaryIpsRequest(params_dict, headers) resp = client.send(req) Printer.print_result(resp) except ImportError: print('{"error":"This api is not supported, please use the newer version"}') except Exception as e: print(e)
def update_thing_shadow(self): client_factory = ClientFactory('iothub') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.iothub.apis.UpdateThingShadowRequest import UpdateThingShadowRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = UpdateThingShadowRequest(params_dict, headers) resp = client.send(req) Printer.print_result(resp) except ImportError: print('{"error":"This api is not supported, please use the newer version"}') except Exception as e: print(e)
def modify_file_system_attribute(self): client_factory = ClientFactory('zfs') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.zfs.apis.ModifyFileSystemAttributeRequest import ModifyFileSystemAttributeRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = ModifyFileSystemAttributeRequest(params_dict, headers) resp = client.send(req) Printer.print_result(resp) except ImportError: print('{"error":"This api is not supported, please use the newer version"}') except Exception as e: print(e)
def rebuild_pod(self): client_factory = ClientFactory('pod') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.pod.apis.RebuildPodRequest import RebuildPodRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = RebuildPodRequest(params_dict, headers) resp = client.send(req) Printer.print_result(resp) except ImportError: print('{"error":"This api is not supported, please use the newer version"}') except Exception as e: print(e)
def list_product_abilities(self): client_factory = ClientFactory('iothub') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.iothub.apis.ListProductAbilitiesRequest import ListProductAbilitiesRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = ListProductAbilitiesRequest(params_dict, headers) resp = client.send(req) Printer.print_result(resp) except ImportError: print('{"error":"This api is not supported, please use the newer version"}') except Exception as e: print(e)
def put_custom_metric_data(self): client_factory = ClientFactory('monitor') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.monitor.apis.PutCustomMetricDataRequest import PutCustomMetricDataRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = PutCustomMetricDataRequest(params_dict, headers) resp = client.send(req) Printer.print_result(resp) except ImportError: print('{"error":"This api is not supported, please use the newer version"}') except Exception as e: print(e)
def describe_products_for_alarm(self): client_factory = ClientFactory('monitor') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.monitor.apis.DescribeProductsForAlarmRequest import DescribeProductsForAlarmRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = DescribeProductsForAlarmRequest(params_dict, headers) resp = client.send(req) Printer.print_result(resp) except ImportError: print('{"error":"This api is not supported, please use the newer version"}') except Exception as e: print(e)
def describe_metric_data_am(self): client_factory = ClientFactory('detection') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.detection.apis.DescribeMetricDataAmRequest import DescribeMetricDataAmRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = DescribeMetricDataAmRequest(params_dict, headers) resp = client.send(req) Printer.print_result(resp) except ImportError: print('{"error":"This api is not supported, please use the newer version"}') except Exception as e: print(e)
def get_sale_service_by_deliver_number(self): client_factory = ClientFactory('elite') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.elite.apis.GetSaleServiceByDeliverNumberRequest import GetSaleServiceByDeliverNumberRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = GetSaleServiceByDeliverNumberRequest(params_dict, headers) resp = client.send(req) Printer.print_result(resp) except ImportError: print('{"error":"This api is not supported, please use the newer version"}') except Exception as e: print(e)
def get_monitor_alarm_info(self): client_factory = ClientFactory('clouddnsservice') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.clouddnsservice.apis.GetMonitorAlarmInfoRequest import GetMonitorAlarmInfoRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = GetMonitorAlarmInfoRequest(params_dict, headers) resp = client.send(req) Printer.print_result(resp) except ImportError: print('{"error":"This api is not supported, please use the newer version"}') except Exception as e: print(e)
def last_downsample(self): client_factory = ClientFactory('jdccs') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.jdccs.apis.LastDownsampleRequest import LastDownsampleRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = LastDownsampleRequest(params_dict, headers) resp = client.send(req) Printer.print_result(resp) except ImportError: print('{"error":"This api is not supported, please use the newer version"}') except Exception as e: print(e)
def batch_set_dns_resolve(self): client_factory = ClientFactory('clouddnsservice') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.clouddnsservice.apis.BatchSetDnsResolveRequest import BatchSetDnsResolveRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = BatchSetDnsResolveRequest(params_dict, headers) resp = client.send(req) Printer.print_result(resp) except ImportError: print('{"error":"This api is not supported, please use the newer version"}') except Exception as e: print(e)
def resize_tty(h, w, app, region_id, container_id, exec_id=None): params = { 'height': h, 'width': w, 'regionId': region_id, 'containerId': container_id } if exec_id is not None: params.update({'execId': exec_id}) client_factory = ClientFactory('nc') client = client_factory.get(app) if client is None: return req = ResizeTtyRequest(params) resp = client.send(req) Printer.print_result(resp)
def submit_vqd_task(self): client_factory = ClientFactory('vqd') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.vqd.apis.SubmitVqdTaskRequest import SubmitVqdTaskRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = SubmitVqdTaskRequest(params_dict, headers) resp = client.send(req) Printer.print_result(resp) except ImportError: print( '{"error":"This api is not supported, please use the newer version"}' ) except Exception as e: print(e)
def get_authorization_token(self): client_factory = ClientFactory('containerregistry') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.containerregistry.apis.GetAuthorizationTokenRequest import GetAuthorizationTokenRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = GetAuthorizationTokenRequest(params_dict, headers) resp = client.send(req) Printer.print_result(resp) except ImportError: print( '{"error":"This api is not supported, please use the newer version"}' ) except Exception as e: print(e)
def get_sensitive_op_setting(self): client_factory = ClientFactory('sop') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.sop.apis.GetSensitiveOpSettingRequest import GetSensitiveOpSettingRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = GetSensitiveOpSettingRequest(params_dict, headers) resp = client.send(req) Printer.print_result(resp) except ImportError: print( '{"error":"This api is not supported, please use the newer version"}' ) except Exception as e: print(e)
def get_consumer_group_list(self): client_factory = ClientFactory('streambus') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.streambus.apis.GetConsumerGroupListRequest import GetConsumerGroupListRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = GetConsumerGroupListRequest(params_dict, headers) resp = client.send(req) Printer.print_result(resp) except ImportError: print( '{"error":"This api is not supported, please use the newer version"}' ) except Exception as e: print(e)
def async_invoke(self): client_factory = ClientFactory('function') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.function.apis.AsyncInvokeRequest import AsyncInvokeRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = AsyncInvokeRequest(params_dict, headers) resp = client.send(req) Printer.print_result(resp) except ImportError: print( '{"error":"This api is not supported, please use the newer version"}' ) except Exception as e: print(e)