def query_namespace_detail(self): client_factory = ClientFactory('streamcomputer') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.streamcomputer.apis.QueryNamespaceDetailRequest import QueryNamespaceDetailRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = QueryNamespaceDetailRequest(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 add_or_update_storage(self): client_factory = ClientFactory('streamcomputer') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.streamcomputer.apis.AddOrUpdateStorageRequest import AddOrUpdateStorageRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = AddOrUpdateStorageRequest(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_snapshot_attribute(self): client_factory = ClientFactory('disk') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.disk.apis.ModifySnapshotAttributeRequest import ModifySnapshotAttributeRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = ModifySnapshotAttributeRequest(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 disabled_user_access_key(self): client_factory = ClientFactory('iam') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.iam.apis.DisabledUserAccessKeyRequest import DisabledUserAccessKeyRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = DisabledUserAccessKeyRequest(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_flow(self): client_factory = ClientFactory('baseanti') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.baseanti.apis.DescribeIpResourceFlowRequest import DescribeIpResourceFlowRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = DescribeIpResourceFlowRequest(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_my_customer_list(self): client_factory = ClientFactory('partner') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.partner.apis.QueryMyCustomerListRequest import QueryMyCustomerListRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = QueryMyCustomerListRequest(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_instance_spec(self): client_factory = ClientFactory('mongodb') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.mongodb.apis.ModifyInstanceSpecRequest import ModifyInstanceSpecRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = ModifyInstanceSpecRequest(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('iotcore') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.iotcore.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 get_large_screen_data(self): client_factory = ClientFactory('datastar') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.datastar.apis.GetLargeScreenDataRequest import GetLargeScreenDataRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = GetLargeScreenDataRequest(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_rds_instances(self): client_factory = ClientFactory('yundingdatapush') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.yundingdatapush.apis.DescribeRdsInstancesRequest import DescribeRdsInstancesRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = DescribeRdsInstancesRequest(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 reset_cache_instance_password(self): client_factory = ClientFactory('redis') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.redis.apis.ResetCacheInstancePasswordRequest import ResetCacheInstancePasswordRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = ResetCacheInstancePasswordRequest(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)
def check_repository_name(self): client_factory = ClientFactory('cr') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.cr.apis.CheckRepositoryNameRequest import CheckRepositoryNameRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = CheckRepositoryNameRequest(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 jdx_query_delivery_info(self): client_factory = ClientFactory('elite') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.elite.apis.JdxQueryDeliveryInfoRequest import JdxQueryDeliveryInfoRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = JdxQueryDeliveryInfoRequest(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 backup_download_url(self): client_factory = ClientFactory('mongodb') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.mongodb.apis.BackupDownloadURLRequest import BackupDownloadURLRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = BackupDownloadURLRequest(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('iotcore') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.iotcore.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 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 set_ip_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.SetIpCleanThresholdRequest import SetIpCleanThresholdRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = SetIpCleanThresholdRequest(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 gprs_realtime_info(self): client_factory = ClientFactory('iotlink') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.iotlink.apis.GprsRealtimeInfoRequest import GprsRealtimeInfoRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = GprsRealtimeInfoRequest(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_total_consumption(self): client_factory = ClientFactory('partner') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.partner.apis.GetTotalConsumptionRequest import GetTotalConsumptionRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = GetTotalConsumptionRequest(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 add_permissions_to_sub_user(self): client_factory = ClientFactory('iam') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.iam.apis.AddPermissionsToSubUserRequest import AddPermissionsToSubUserRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = AddPermissionsToSubUserRequest(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 execute_change_set(self): client_factory = ClientFactory('jdro') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.jdro.apis.ExecuteChangeSetRequest import ExecuteChangeSetRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = ExecuteChangeSetRequest(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 disassociate_elastic_ip(self): client_factory = ClientFactory('pod') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.pod.apis.DisassociateElasticIpRequest import DisassociateElasticIpRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = DisassociateElasticIpRequest(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 device_state(self): client_factory = ClientFactory('iothub') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.iothub.apis.DeviceStateRequest import DeviceStateRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = DeviceStateRequest(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_by_id(self): client_factory = ClientFactory('portal') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.portal.apis.DescribeProductsByIdRequest import DescribeProductsByIdRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = DescribeProductsByIdRequest(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_deploy(self): client_factory = ClientFactory('deploy') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.deploy.apis.CreateDeployRequest import CreateDeployRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = CreateDeployRequest(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 remove_permission(self): client_factory = ClientFactory('jcq') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.jcq.apis.RemovePermissionRequest import RemovePermissionRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = RemovePermissionRequest(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_dead_letter_numbers_with_topic(self): client_factory = ClientFactory('jcq') client = client_factory.get(self.app) if client is None: return try: from jdcloud_sdk.services.jcq.apis.DescribeDeadLetterNumbersWithTopicRequest import DescribeDeadLetterNumbersWithTopicRequest params_dict = collect_user_args(self.app) headers = collect_user_headers(self.app) req = DescribeDeadLetterNumbersWithTopicRequest( 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 attach(self): profile_region_id = ProfileManager().load_current_profile().region_id region_id = self.app.pargs.regionId if self.app.pargs.regionId else profile_region_id headers = collect_user_headers(self.app) attach(self.app, 'nc', headers, region_id, self.app.pargs.containerId)