computenestsupplier-20210521/main.tea (7,695 lines of code) (raw):

/** * */ import Util; import OpenApi; import OpenApiUtil; import EndpointUtil; extends OpenApi; init(config: OpenApi.Config){ super(config); @endpointRule = 'regional'; checkConfig(config); @endpoint = getEndpoint('computenestsupplier', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint); } function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{ if (!Util.empty(endpoint)) { return endpoint; } if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) { return endpointMap[regionId]; } return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix); } model AddServiceSharedAccountsRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.', example='BBBAAfu+XtuBE55iRLHEYYuojI4='), regionId?: string(name='RegionId', description='The region ID. This parameter is required.', example='cn-hangzhou'), serviceId?: string(name='ServiceId', description='The service ID. This parameter is required.', example='service-63b8a060e9d54cxxxxxx'), sharedAccounts?: [ { permission?: string(name='Permission', description='The permissions on the service. Valid values: * Deployable: Permissions to deploy the service. * Accessible: Permissions to access the service. This parameter is required.', example='Accessible'), userAliUid?: string(name='UserAliUid', description='The Alibaba Cloud account ID of the user. This parameter is required.', example='123456'), } ](name='SharedAccounts', description='The shared account and permissions of the service. This parameter is required.'), type?: string(name='Type', description='The share type of the service. Default value: SharedAccount. Valid values: * SharedAccount: The service is shared by multiple accounts. * Reseller: The service is distributed.', example='SharedAccount'), } model AddServiceSharedAccountsResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='E2815213-EA4F-5759-8EA1-56DD051BB3FD'), } model AddServiceSharedAccountsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: AddServiceSharedAccountsResponseBody(name='body'), } /** * @summary Adds a shared account of a service. * * @param request AddServiceSharedAccountsRequest * @param runtime runtime options for this request RuntimeOptions * @return AddServiceSharedAccountsResponse */ async function addServiceSharedAccountsWithOptions(request: AddServiceSharedAccountsRequest, runtime: Util.RuntimeOptions): AddServiceSharedAccountsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.sharedAccounts)) { query['SharedAccounts'] = request.sharedAccounts; } if (!Util.isUnset(request.type)) { query['Type'] = request.type; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'AddServiceSharedAccounts', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Adds a shared account of a service. * * @param request AddServiceSharedAccountsRequest * @return AddServiceSharedAccountsResponse */ async function addServiceSharedAccounts(request: AddServiceSharedAccountsRequest): AddServiceSharedAccountsResponse { var runtime = new Util.RuntimeOptions{}; return addServiceSharedAccountsWithOptions(request, runtime); } model ApproveServiceUsageRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.', example='10CM943JP0EN9D51H'), comments?: string(name='Comments', description='Approval comments.', example='Welcome to TuGraph. Your application has been approved. Should you have any questions, please feel free to email us at tugraph@service.alipay.com or call our contact number 400-903-0809. Contact person: Yuansu.'), regionId?: string(name='RegionId', description='The region ID.', example='cn-hangzhou'), serviceId?: string(name='ServiceId', description='The service ID. This parameter is required.', example='service-39f4f251e94843xxxxxx'), type?: int32(name='Type', description='ServiceSharedAccountType,', example='SharedAccount'), userAliUid?: long(name='UserAliUid', description='User ali uid. This parameter is required.', example='127383705958xxxx'), } model ApproveServiceUsageResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='4DB0F536-B3BE-4F0D-BD29-E83FB56D550C'), } model ApproveServiceUsageResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ApproveServiceUsageResponseBody(name='body'), } /** * @summary 商家通过服务使用请求 * * @param request ApproveServiceUsageRequest * @param runtime runtime options for this request RuntimeOptions * @return ApproveServiceUsageResponse */ async function approveServiceUsageWithOptions(request: ApproveServiceUsageRequest, runtime: Util.RuntimeOptions): ApproveServiceUsageResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.comments)) { query['Comments'] = request.comments; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.type)) { query['Type'] = request.type; } if (!Util.isUnset(request.userAliUid)) { query['UserAliUid'] = request.userAliUid; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ApproveServiceUsage', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary 商家通过服务使用请求 * * @param request ApproveServiceUsageRequest * @return ApproveServiceUsageResponse */ async function approveServiceUsage(request: ApproveServiceUsageRequest): ApproveServiceUsageResponse { var runtime = new Util.RuntimeOptions{}; return approveServiceUsageWithOptions(request, runtime); } model CancelServiceRegistrationRequest { clientToken?: string(name='ClientToken', description='Client token, used to ensure the idempotence of requests. Generate a unique value for this parameter from your client to ensure it is unique across different requests. ClientToken supports only ASCII characters.', example='AAAAAWns8w4MmhzeptXVRG0PUEU='), regionId?: string(name='RegionId', description='Region ID. This parameter is required.', example='cn-hangzhou'), registrationId?: string(name='RegistrationId', description='Service registration ID. This parameter is required.', example='sr-540930183f93xxxxxx'), } model CancelServiceRegistrationResponseBody = { requestId?: string(name='RequestId', description='Request ID.', example='C4A145D8-6F6C-532A-9001-9730CDA27578'), } model CancelServiceRegistrationResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CancelServiceRegistrationResponseBody(name='body'), } /** * @summary Cancel service registration. * * @description Only service registration in the Submitted status can be canceled. * * @param request CancelServiceRegistrationRequest * @param runtime runtime options for this request RuntimeOptions * @return CancelServiceRegistrationResponse */ async function cancelServiceRegistrationWithOptions(request: CancelServiceRegistrationRequest, runtime: Util.RuntimeOptions): CancelServiceRegistrationResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.registrationId)) { query['RegistrationId'] = request.registrationId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'CancelServiceRegistration', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Cancel service registration. * * @description Only service registration in the Submitted status can be canceled. * * @param request CancelServiceRegistrationRequest * @return CancelServiceRegistrationResponse */ async function cancelServiceRegistration(request: CancelServiceRegistrationRequest): CancelServiceRegistrationResponse { var runtime = new Util.RuntimeOptions{}; return cancelServiceRegistrationWithOptions(request, runtime); } model ContinueDeployServiceInstanceRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.', example='123e4567-e89b-12d3-a456-426655440000'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run for the request to check information such as the permissions and instance status. Valid values: * true: performs a dry run for the request, but does not create a service instance. * false: performs a dry run for the request, and creates a service instance if the request passes the dry run.', example='false'), parameters?: string(name='Parameters', description='The configuration parameters of the service instance.', example='{"NodeCount": 3, "SystemDiskSize": 40, "InstancePassword": "******"}'), regionId?: string(name='RegionId', description='The region ID. This parameter is required.', example='cn-hangzhou'), serviceInstanceId?: string(name='ServiceInstanceId', description='The ID of the service instance. This parameter is required.', example='si-0e6fca6a51a54420****'), } model ContinueDeployServiceInstanceResponseBody = { dryRunResult?: { parametersAllowedToBeModified?: [ string ](name='ParametersAllowedToBeModified', description='The parameters that can be modified. The operation that is performed to modify the parameters does not cause a validation error. > This parameter is returned only if DryRun is set to true.'), parametersConditionallyAllowedToBeModified?: [ string ](name='ParametersConditionallyAllowedToBeModified', description='The parameters that can be modified under specific conditions. The new values of the parameters determine whether the operation that is performed to modify the parameters causes a validation error. > This parameter is returned only if DryRun is set to true.'), parametersNotAllowedToBeModified?: [ string ](name='ParametersNotAllowedToBeModified', description='The parameters that cannot be modified. The operation that is performed to modify the parameters causes a validation error. > This parameter is returned only if DryRun is set to true.'), }(name='DryRunResult', description='The dry run result.'), requestId?: string(name='RequestId', description='The request ID.', example='82DF27ED-E538-5AC0-A11C-39334A873189'), serviceInstanceId?: string(name='ServiceInstanceId', description='The ID of the service instance.', example='si-d6ab3a63ccbb4b17****'), } model ContinueDeployServiceInstanceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ContinueDeployServiceInstanceResponseBody(name='body'), } /** * @summary Redeploys a service instance after the service instance failed to be deployed. * * @param request ContinueDeployServiceInstanceRequest * @param runtime runtime options for this request RuntimeOptions * @return ContinueDeployServiceInstanceResponse */ async function continueDeployServiceInstanceWithOptions(request: ContinueDeployServiceInstanceRequest, runtime: Util.RuntimeOptions): ContinueDeployServiceInstanceResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.dryRun)) { query['DryRun'] = request.dryRun; } if (!Util.isUnset(request.parameters)) { query['Parameters'] = request.parameters; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceInstanceId)) { query['ServiceInstanceId'] = request.serviceInstanceId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ContinueDeployServiceInstance', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Redeploys a service instance after the service instance failed to be deployed. * * @param request ContinueDeployServiceInstanceRequest * @return ContinueDeployServiceInstanceResponse */ async function continueDeployServiceInstance(request: ContinueDeployServiceInstanceRequest): ContinueDeployServiceInstanceResponse { var runtime = new Util.RuntimeOptions{}; return continueDeployServiceInstanceWithOptions(request, runtime); } model CreateArtifactRequest { artifactBuildProperty?: { buildArgs?: [ { argumentName?: string(name='ArgumentName', description='The name of a specific build argument.', example='ENV'), argumentValue?: string(name='ArgumentValue', description='The value of a specific build argument.', example='nginx:latest'), } ](name='BuildArgs', description='The build arguments used during the image build process. > This parameter is available only if the ArtifactBuildType is Dockerfile type.'), codeRepo?: { branch?: string(name='Branch', description='The name of the branch in the code repository.', example='main'), endpoint?: string(name='Endpoint', description='The endpoint. The URL address used to access the privately deployed GitLab instance.', example='http://121.40.25.0'), orgId?: string(name='OrgId', description='The organization ID.', example='455231'), owner?: string(name='Owner', description='The owner of the code repository. > This parameter is available only if the git repository is private.', example='aliyun-computenest'), platform?: string(name='Platform', description='The platform type. Valid values: - github - gitee - gitlab - codeup', example='github'), repoId?: long(name='RepoId', description='The repository ID.', example='103'), repoName?: string(name='RepoName', description='The name of the repository.', example='aliyun-computenest/quickstart-Lobexxx'), }(name='CodeRepo', description='The address of the code repository. > This parameter is available only if the ArtifactBuildType is Dockerfile or Buildpacks type.'), commandContent?: string(name='CommandContent', description='The command content. > This parameter is available only if the deployment package is a ecs image type.', example='echo "start run command"'), commandType?: string(name='CommandType', description='The command type. Valid values: * RunBatScript: batch command, applicable to Windows instances. * RunPowerShellScript: PowerShell command, applicable to Windows instances. * RunShellScript: shell command, applicable to Linux instances. > This parameter is available only if the deployment package is a ecs image type.', example='RunShellScript'), dockerfilePath?: string(name='DockerfilePath', description='The relative path to the Dockerfile within the code repository. > This parameter is available only if the ArtifactBuildType is Dockerfile type.', example='./file/Dockerfile'), regionId?: string(name='RegionId', description='The region ID where the source mirror image is located. > This parameter is available only if the deployment package is a ecs image type.', example='cn-hangzhou'), sourceContainerImage?: string(name='SourceContainerImage', description='The pull location of the source container image. This is used for the command docker pull ${SourceContainerImage}. > This parameter is available only if the ArtifactBuildType is ContainerImage type.', example='pytorch/pytorch:2.5.1-cuda12.4-cudnn9-devel'), sourceImageId?: string(name='SourceImageId', description='The source image id. Supported Types: - Image ID: Pass the Image ID of the Ecs image directly. - OOS Common Parameter Name: Obtain the corresponding Image ID automatically by using the OOS common parameter name. > This parameter is available only if the deployment package is a ecs image type.', example='Image ID:m-t4nhenrdc38pe4***** ubuntu_22_04_x64_20G_alibase_20240926.vhd OOS Common Parameter Name:aliyun/services/computenest/images/aliyun_3_2104_python_3_11'), }(name='ArtifactBuildProperty', description='The build properties of the artifact, utilized for hosting and building the deployment package.'), artifactBuildType?: string(name='ArtifactBuildType', description='The type of the artifact build task. Valid values: - EcsImage: Build ECS (Elastic Container Service) image. - Dockerfile: Build container image based on Dockerfile. - Buildpacks: Build container image based on Buildpacks. - ContainerImage: Rebuild container image by renaming an existing container image.', example='Dockerfile'), artifactId?: string(name='ArtifactId', description='The ID of the deployment package.', example='artifact-eea08d1e2d3a43aexxxx'), artifactProperty?: { commodityCode?: string(name='CommodityCode', description='The commodity code of the service in Alibaba Cloud Marketplace. > This parameter is available only if the deployment package is an image.', example='cmjj00xxxx'), commodityVersion?: string(name='CommodityVersion', description='The commodity version of the service in Alibaba Cloud Marketplace. > This parameter is available only if the deployment package is an image.', example='V1.0'), imageId?: string(name='ImageId', description='The image ID. > This parameter is available only if the deployment package is an image.', example='m-0xij191j9cuev6xxxxxx'), regionId?: string(name='RegionId', description='The region ID. > This parameter is available only if the deployment package is an image.', example='cn-hangzhou'), repoId?: string(name='RepoId', description='The ID of the image repository. > This parameter is available only if the deployment package is a container image or of the Helm chart type.', example='crr-d8o1nponyc2t1gcg'), repoName?: string(name='RepoName', description='The name of the image repository. > This parameter is available only if the deployment package is a container image or of the Helm chart type.', example='wordpress'), repoType?: string(name='RepoType', description='The default repository type. Valid values: * `Public`: a public repository. * `Private`: a private repository. You can specify the RepoType or Summary parameter. The RepoType parameter is optional.', example='Public'), tag?: string(name='Tag', description='The version tag of the image repository. > This parameter is available only if the deployment package is a container image or of the Helm chart type.', example='v1'), url?: string(name='Url', description='The object URL of the deployment package.', example='https://service-info-private.oss-cn-hangzhou.aliyuncs.com/1309208528xxxxxx/template/2e1ce8fc-xxxx-481c-9e8e-789ba9db487d.json'), }(name='ArtifactProperty', description='The properties of the deployment object.'), artifactType?: string(name='ArtifactType', description='The type of the deployment package. Valid values: * EcsImage: Elastic Compute Service (ECS) image. * AcrImage: container image. * File: Object Storage Service (OSS) object. * Script: script. This parameter is required.', example='EcsImage'), clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.', example='10CM943JP0EN9D51H'), description?: string(name='Description', description='The description of the deployment package.', example='Test artifact'), name?: string(name='Name', description='The name of the deployment package. This parameter is required.', example='Name'), resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-aekzkt5buxxxxxx'), supportRegionIds?: [ string ](name='SupportRegionIds', description='The supported regions.'), tag?: [ { key?: string(name='Key', description='The tag key.', example='key1'), value?: string(name='Value', description='The tag value.', example='value1'), } ](name='Tag', description='The custom tags.'), versionName?: string(name='VersionName', description='The version name of the deployment package. This parameter is required.', example='v1'), } model CreateArtifactShrinkRequest { artifactBuildPropertyShrink?: string(name='ArtifactBuildProperty', description='The build properties of the artifact, utilized for hosting and building the deployment package.'), artifactBuildType?: string(name='ArtifactBuildType', description='The type of the artifact build task. Valid values: - EcsImage: Build ECS (Elastic Container Service) image. - Dockerfile: Build container image based on Dockerfile. - Buildpacks: Build container image based on Buildpacks. - ContainerImage: Rebuild container image by renaming an existing container image.', example='Dockerfile'), artifactId?: string(name='ArtifactId', description='The ID of the deployment package.', example='artifact-eea08d1e2d3a43aexxxx'), artifactPropertyShrink?: string(name='ArtifactProperty', description='The properties of the deployment object.'), artifactType?: string(name='ArtifactType', description='The type of the deployment package. Valid values: * EcsImage: Elastic Compute Service (ECS) image. * AcrImage: container image. * File: Object Storage Service (OSS) object. * Script: script. This parameter is required.', example='EcsImage'), clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.', example='10CM943JP0EN9D51H'), description?: string(name='Description', description='The description of the deployment package.', example='Test artifact'), name?: string(name='Name', description='The name of the deployment package. This parameter is required.', example='Name'), resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-aekzkt5buxxxxxx'), supportRegionIds?: [ string ](name='SupportRegionIds', description='The supported regions.'), tag?: [ { key?: string(name='Key', description='The tag key.', example='key1'), value?: string(name='Value', description='The tag value.', example='value1'), } ](name='Tag', description='The custom tags.'), versionName?: string(name='VersionName', description='The version name of the deployment package. This parameter is required.', example='v1'), } model CreateArtifactResponseBody = { artifactBuildProperty?: string(name='ArtifactBuildProperty', description='The build properties of the artifact, utilized for hosting and building the deployment package.', example='"{\\\\"RegionId\\\\":\\\\"xxx\\\\", \\\\"SourceImageId\\\\":\\\\"xxx\\\\", \\\\"\\\\":\\\\"xxx\\\\", \\\\"CommandType\\\\":\\\\"xxx\\\\", \\\\"CommandContent\\\\":\\\\"xxx\\\\"}"'), artifactBuildType?: string(name='ArtifactBuildType', description='The type of the deployment package to be built.', example='Dockerfile'), artifactId?: string(name='ArtifactId', description='The ID of the deployment package.', example='artifact-eea08d1e2d3a43aexxxx'), artifactProperty?: string(name='ArtifactProperty', description='The properties of the deployment object.', example='{\\\\"CommodityCode\\\\":\\\\"cmjj0005xxxx\\\\",\\\\"CommodityVersion\\\\":\\\\"V2022xxxx\\\\"}'), artifactType?: string(name='ArtifactType', description='The type of the deployment package.', example='EcsImage'), artifactVersion?: string(name='ArtifactVersion', description='The version of the deployment package.', example='2'), description?: string(name='Description', description='The description of the deployment package.', example='Test artifact'), gmtModified?: string(name='GmtModified', description='The time when the deployment package was modified.', example='2022-11-11T12:00:00Z'), maxVersion?: long(name='MaxVersion', description='The latest version of the deployment package.', example='1'), name?: string(name='Name', description='The name of the deployment package.', example='Name'), requestId?: string(name='RequestId', description='The request ID.', example='B1A0198B-F316-1B72-B8DD-28B6F6D6XXXX'), status?: string(name='Status', description='The status of the deployment package. Valid values:', example='Created'), statusDetail?: string(name='StatusDetail', description='The status of the deployment package.', example='"/usr/local/share/aliyun-assist/work/script/t-hz04zm90y6og0sg.sh: line 1: pip: command not found"'), supportRegionIds?: string(name='SupportRegionIds', description='The ID of the region that supports the deployment package.', example='[ "cn-beijing", "cn-hangzhou", "cn-shanghai" ]'), versionName?: string(name='VersionName', description='The name of the deployment package.', example='v1'), } model CreateArtifactResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CreateArtifactResponseBody(name='body'), } /** * @summary Creates a deployment package. * * @param tmpReq CreateArtifactRequest * @param runtime runtime options for this request RuntimeOptions * @return CreateArtifactResponse */ async function createArtifactWithOptions(tmpReq: CreateArtifactRequest, runtime: Util.RuntimeOptions): CreateArtifactResponse { Util.validateModel(tmpReq); var request = new CreateArtifactShrinkRequest{}; OpenApiUtil.convert(tmpReq, request); if (!Util.isUnset(tmpReq.artifactBuildProperty)) { request.artifactBuildPropertyShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.artifactBuildProperty, 'ArtifactBuildProperty', 'json'); } if (!Util.isUnset(tmpReq.artifactProperty)) { request.artifactPropertyShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.artifactProperty, 'ArtifactProperty', 'json'); } var query = {}; if (!Util.isUnset(request.artifactBuildPropertyShrink)) { query['ArtifactBuildProperty'] = request.artifactBuildPropertyShrink; } if (!Util.isUnset(request.artifactBuildType)) { query['ArtifactBuildType'] = request.artifactBuildType; } if (!Util.isUnset(request.artifactId)) { query['ArtifactId'] = request.artifactId; } if (!Util.isUnset(request.artifactPropertyShrink)) { query['ArtifactProperty'] = request.artifactPropertyShrink; } if (!Util.isUnset(request.artifactType)) { query['ArtifactType'] = request.artifactType; } if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.description)) { query['Description'] = request.description; } if (!Util.isUnset(request.name)) { query['Name'] = request.name; } if (!Util.isUnset(request.resourceGroupId)) { query['ResourceGroupId'] = request.resourceGroupId; } if (!Util.isUnset(request.supportRegionIds)) { query['SupportRegionIds'] = request.supportRegionIds; } if (!Util.isUnset(request.tag)) { query['Tag'] = request.tag; } if (!Util.isUnset(request.versionName)) { query['VersionName'] = request.versionName; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'CreateArtifact', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Creates a deployment package. * * @param request CreateArtifactRequest * @return CreateArtifactResponse */ async function createArtifact(request: CreateArtifactRequest): CreateArtifactResponse { var runtime = new Util.RuntimeOptions{}; return createArtifactWithOptions(request, runtime); } model CreateServiceRequest { alarmMetadata?: string(name='AlarmMetadata', description='The alert configurations of the service. > This parameter takes effect only when you specify an alert policy for **PolicyNames**.', example='{ "TemplateUrl": "http://template.file.url", // 应用分组级别告警元数据 "ApplicationGroups": [ { "Name": "applicationGroup1", "TemplateUrl": "url1" }, { "Name": "applicationGroup2", "TemplateUrl": "url2" } ] }'), approvalType?: string(name='ApprovalType', description='The approval type of the service usage application. Valid values: * Manual: The application is manually approved. * AutoPass: The application is automatically approved.', example='Manual'), buildParameters?: string(name='BuildParameters', description='The parameters for building the service', example='{ "ServiceTemplateId": "st-xxxxx"}'), clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.', example='10CM943JP0EN9D51H'), complianceMetadata?: { compliancePacks?: [ string ](name='CompliancePacks', description='The compliance package selected.'), }(name='ComplianceMetadata', description='Compliance check metadata.'), deployMetadata?: string(name='DeployMetadata', description='The storage configurations of the service. The format in which the deployment information of a service is stored varies based on the deployment type of the service. In this case, the deployment information is stored in the JSON string format.', example='{\\\\"TemplateConfigs\\\\":[{\\\\"Name\\\\":\\\\"模板1\\\\",\\\\"Url\\\\":\\\\"oss://computenest-test/template" + ".json?RegionId=cn-beijing\\\\",\\\\"PredefinedParameters\\\\":[{\\\\"Name\\\\":\\\\"低配版\\\\"," + "\\\\"Parameters\\\\":{\\\\"InstanceType\\\\":\\\\"ecs.g5.large\\\\",\\\\"DataDiskSize\\\\":40}},{\\\\"Name\\\\":\\\\"高配版\\\\"," + "\\\\"Parameters\\\\":{\\\\"InstanceType\\\\":\\\\"ecs.g5.large\\\\",\\\\"DataDiskSize\\\\":200}}]}]}'), deployType?: string(name='DeployType', description='The deployment type of the service. Valid values: * ros: The service is deployed by using Resource Orchestration Service (ROS). * terraform: The service is deployed by using Terraform. * ack: The service is deployed by using Container Service for Kubernetes (ACK). * spi: The service is deployed by calling a service provider interface (SPI). * operation: The service is deployed by using a hosted O\\\\&M service. This parameter is required.', example='ros'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run for the request to check information. Valid values: * true: performs a dry run for the request, but does not create a service. * false: performs a dry run for the request, and create a service if the request passes the dry run.', example='true'), duration?: long(name='Duration', description='The duration for which hosted O\\\\&M is implemented. Unit: seconds.', example='0'), isSupportOperated?: boolean(name='IsSupportOperated', description='Specifies whether to enable the hosted O\\\\&M feature for the service. Default value: false. Valid values: * true * false > This parameter is required if you set **ServiceType** to **private**.', example='false'), licenseMetadata?: string(name='LicenseMetadata', description='The license metadata.', example='{\\\\"RetentionDays\\\\":3}'), logMetadata?: string(name='LogMetadata', description='The logging configurations.', example='{ "Logstores": [ { "LogstoreName": "access-log", "LogPath": "/home/admin/app/logs", # This parameter is not required for containers. Configure the parameter in the YAML file. "FilePattern": "access.log\\\\*" # This parameter is not required for containers. Configure the parameter in the YAML file. } ] }'), operationMetadata?: string(name='OperationMetadata', description='The hosted O\\\\&M configurations.', example='{\\\\"PrometheusConfigMap\\\\":{\\\\"New_Vpc_Ack_And_Jumpserver\\\\":{}}}'), policyNames?: string(name='PolicyNames', description='The policy name. The name can be up to 128 characters in length. Separate multiple names with commas (,). Only hosted O\\\\&M policies are supported.', example='policyName1, policyName2'), regionId?: string(name='RegionId', description='The region ID. This parameter is required.', example='cn-hangzhou'), resellable?: boolean(name='Resellable', description='Whether resell is supported.', example='false'), resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-aek25refu7r3opq'), serviceId?: string(name='ServiceId', description='The service ID.', example='service-0e6fca6a51a544xxxxxx'), serviceInfo?: [ { agreements?: [ { name?: string(name='Name', description='Protocol name.', example='Name'), url?: string(name='Url', description='Protocol url.', example='https://aliyun.com/xxxxxxxx.html'), } ](name='Agreements', description='Protocol document information about the service.'), image?: string(name='Image', description='The URL of the service icon.', example='http://img.tidb.oss.url'), locale?: string(name='Locale', description='The language of the service. Valid values: * zh-CN: Chinese * en-US: English This parameter is required.', example='zh-CN'), longDescriptionUrl?: string(name='LongDescriptionUrl', description='The URL of the detailed description of the service.', example='http://description.tidb.oss.url'), name?: string(name='Name', description='The service name. This parameter is required.', example='TiDB Database'), shortDescription?: string(name='ShortDescription', description='The description of the service.', example='TiDB是A公司自主设计、研发的开源分布式关系型数据库。'), softwares?: [ { name?: string(name='Name', description='The name of the software.', example='MySQL'), version?: string(name='Version', description='The version of the software.', example='5.7'), } ](name='Softwares', description='The list of the software in the service.'), } ](name='ServiceInfo', description='The service details.'), serviceType?: string(name='ServiceType', description='The service type. Valid values: * private: The service is a private service and is deployed within the account of a customer. * managed: The service is a fully managed service and is deployed within the account of a service provider. * operation: The service is a hosted O\\\\&M service. * poc: The service is a trial service.', example='private'), shareType?: string(name='ShareType', description='The permission type of the deployment URL. Valid values: * Public: All users can go to the URL to create a service instance or a trial service instance. * Restricted: Only users in the whitelist can go to the URL to create a service instance or a trial service instance. * OnlyFormalRestricted: Only users in the whitelist can go to the URL to create a service instance. * OnlyTrailRestricted: Only users in the whitelist can go to the URL to create a trial service instance. * Hidden: Users not in the whitelist cannot see the service details page when they go to the URL and cannot request deployment permissions.', example='Public'), sourceServiceId?: string(name='SourceServiceId', description='The source service ID for resell。', example='service-70a3b15bb62643xxxxxx'), sourceServiceVersion?: string(name='SourceServiceVersion', description='The source service version for resell。', example='1'), tag?: [ { key?: string(name='Key', description='The tag key.', example='Usage'), value?: string(name='Value', description='The tag value.', example='Web'), } ](name='Tag', description='The custom tags.'), tenantType?: string(name='TenantType', description='The type of the tenant. Valid values: * SingleTenant * MultiTenant', example='SingleTenant'), trialDuration?: long(name='TrialDuration', description='The trial duration. Unit: day. The maximum trial duration cannot exceed 30 days.', example='7'), upgradeMetadata?: string(name='UpgradeMetadata', description='The metadata about the upgrade.', example='{\\\\"Description\\\\":\\\\"xxx\\\\",\\\\"SupportRollback\\\\":true,\\\\"SupportUpgradeFromVersions\\\\":[],\\\\"UpgradeComponents\\\\":[\\\\"Configuration\\\\"]}'), versionName?: string(name='VersionName', description='The version name.', example='Draft'), } model CreateServiceShrinkRequest { alarmMetadata?: string(name='AlarmMetadata', description='The alert configurations of the service. > This parameter takes effect only when you specify an alert policy for **PolicyNames**.', example='{ "TemplateUrl": "http://template.file.url", // 应用分组级别告警元数据 "ApplicationGroups": [ { "Name": "applicationGroup1", "TemplateUrl": "url1" }, { "Name": "applicationGroup2", "TemplateUrl": "url2" } ] }'), approvalType?: string(name='ApprovalType', description='The approval type of the service usage application. Valid values: * Manual: The application is manually approved. * AutoPass: The application is automatically approved.', example='Manual'), buildParameters?: string(name='BuildParameters', description='The parameters for building the service', example='{ "ServiceTemplateId": "st-xxxxx"}'), clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.', example='10CM943JP0EN9D51H'), complianceMetadataShrink?: string(name='ComplianceMetadata', description='Compliance check metadata.'), deployMetadata?: string(name='DeployMetadata', description='The storage configurations of the service. The format in which the deployment information of a service is stored varies based on the deployment type of the service. In this case, the deployment information is stored in the JSON string format.', example='{\\\\"TemplateConfigs\\\\":[{\\\\"Name\\\\":\\\\"模板1\\\\",\\\\"Url\\\\":\\\\"oss://computenest-test/template" + ".json?RegionId=cn-beijing\\\\",\\\\"PredefinedParameters\\\\":[{\\\\"Name\\\\":\\\\"低配版\\\\"," + "\\\\"Parameters\\\\":{\\\\"InstanceType\\\\":\\\\"ecs.g5.large\\\\",\\\\"DataDiskSize\\\\":40}},{\\\\"Name\\\\":\\\\"高配版\\\\"," + "\\\\"Parameters\\\\":{\\\\"InstanceType\\\\":\\\\"ecs.g5.large\\\\",\\\\"DataDiskSize\\\\":200}}]}]}'), deployType?: string(name='DeployType', description='The deployment type of the service. Valid values: * ros: The service is deployed by using Resource Orchestration Service (ROS). * terraform: The service is deployed by using Terraform. * ack: The service is deployed by using Container Service for Kubernetes (ACK). * spi: The service is deployed by calling a service provider interface (SPI). * operation: The service is deployed by using a hosted O\\\\&M service. This parameter is required.', example='ros'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run for the request to check information. Valid values: * true: performs a dry run for the request, but does not create a service. * false: performs a dry run for the request, and create a service if the request passes the dry run.', example='true'), duration?: long(name='Duration', description='The duration for which hosted O\\\\&M is implemented. Unit: seconds.', example='0'), isSupportOperated?: boolean(name='IsSupportOperated', description='Specifies whether to enable the hosted O\\\\&M feature for the service. Default value: false. Valid values: * true * false > This parameter is required if you set **ServiceType** to **private**.', example='false'), licenseMetadata?: string(name='LicenseMetadata', description='The license metadata.', example='{\\\\"RetentionDays\\\\":3}'), logMetadata?: string(name='LogMetadata', description='The logging configurations.', example='{ "Logstores": [ { "LogstoreName": "access-log", "LogPath": "/home/admin/app/logs", # This parameter is not required for containers. Configure the parameter in the YAML file. "FilePattern": "access.log\\\\*" # This parameter is not required for containers. Configure the parameter in the YAML file. } ] }'), operationMetadata?: string(name='OperationMetadata', description='The hosted O\\\\&M configurations.', example='{\\\\"PrometheusConfigMap\\\\":{\\\\"New_Vpc_Ack_And_Jumpserver\\\\":{}}}'), policyNames?: string(name='PolicyNames', description='The policy name. The name can be up to 128 characters in length. Separate multiple names with commas (,). Only hosted O\\\\&M policies are supported.', example='policyName1, policyName2'), regionId?: string(name='RegionId', description='The region ID. This parameter is required.', example='cn-hangzhou'), resellable?: boolean(name='Resellable', description='Whether resell is supported.', example='false'), resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-aek25refu7r3opq'), serviceId?: string(name='ServiceId', description='The service ID.', example='service-0e6fca6a51a544xxxxxx'), serviceInfo?: [ { agreements?: [ { name?: string(name='Name', description='Protocol name.', example='Name'), url?: string(name='Url', description='Protocol url.', example='https://aliyun.com/xxxxxxxx.html'), } ](name='Agreements', description='Protocol document information about the service.'), image?: string(name='Image', description='The URL of the service icon.', example='http://img.tidb.oss.url'), locale?: string(name='Locale', description='The language of the service. Valid values: * zh-CN: Chinese * en-US: English This parameter is required.', example='zh-CN'), longDescriptionUrl?: string(name='LongDescriptionUrl', description='The URL of the detailed description of the service.', example='http://description.tidb.oss.url'), name?: string(name='Name', description='The service name. This parameter is required.', example='TiDB Database'), shortDescription?: string(name='ShortDescription', description='The description of the service.', example='TiDB是A公司自主设计、研发的开源分布式关系型数据库。'), softwares?: [ { name?: string(name='Name', description='The name of the software.', example='MySQL'), version?: string(name='Version', description='The version of the software.', example='5.7'), } ](name='Softwares', description='The list of the software in the service.'), } ](name='ServiceInfo', description='The service details.'), serviceType?: string(name='ServiceType', description='The service type. Valid values: * private: The service is a private service and is deployed within the account of a customer. * managed: The service is a fully managed service and is deployed within the account of a service provider. * operation: The service is a hosted O\\\\&M service. * poc: The service is a trial service.', example='private'), shareType?: string(name='ShareType', description='The permission type of the deployment URL. Valid values: * Public: All users can go to the URL to create a service instance or a trial service instance. * Restricted: Only users in the whitelist can go to the URL to create a service instance or a trial service instance. * OnlyFormalRestricted: Only users in the whitelist can go to the URL to create a service instance. * OnlyTrailRestricted: Only users in the whitelist can go to the URL to create a trial service instance. * Hidden: Users not in the whitelist cannot see the service details page when they go to the URL and cannot request deployment permissions.', example='Public'), sourceServiceId?: string(name='SourceServiceId', description='The source service ID for resell。', example='service-70a3b15bb62643xxxxxx'), sourceServiceVersion?: string(name='SourceServiceVersion', description='The source service version for resell。', example='1'), tag?: [ { key?: string(name='Key', description='The tag key.', example='Usage'), value?: string(name='Value', description='The tag value.', example='Web'), } ](name='Tag', description='The custom tags.'), tenantType?: string(name='TenantType', description='The type of the tenant. Valid values: * SingleTenant * MultiTenant', example='SingleTenant'), trialDuration?: long(name='TrialDuration', description='The trial duration. Unit: day. The maximum trial duration cannot exceed 30 days.', example='7'), upgradeMetadata?: string(name='UpgradeMetadata', description='The metadata about the upgrade.', example='{\\\\"Description\\\\":\\\\"xxx\\\\",\\\\"SupportRollback\\\\":true,\\\\"SupportUpgradeFromVersions\\\\":[],\\\\"UpgradeComponents\\\\":[\\\\"Configuration\\\\"]}'), versionName?: string(name='VersionName', description='The version name.', example='Draft'), } model CreateServiceResponseBody = { dryRunResult?: { rolePolicy?: { missingPolicy?: [ { action?: [ string ](name='Action', description='The Actions.'), resource?: string(name='Resource', description='Resource in ram policy.', example='*'), serviceName?: string(name='ServiceName', description='The service name in ram policy.', example='ecs'), } ](name='MissingPolicy', description='The missing ram policy for deploying role.'), policy?: string(name='Policy', description='The required ram policy for deploying role.', example='{ "Statement": [{ "Action": ["oos:CancelExecutions", "oos:DeleteExecutions", "oos:GetTemplate", "oos:ListExecutions", "oos:ListTemplates", "oos:NotifyExecution", "oos:StartExecution"], "Effect": "Allow", "Resource": "*" }, { "Action": ["ram:PassRole"], "Effect": "Allow", "Resource": "*" }, { "Action": ["ros:CreateStack", "ros:GetStack", "ros:UpdateStack", "ros:ListStackEvents", "ros:ListStackResources", "ros:ListStackResources", "ros:DeleteStack", "ram:GetRole"], "Effect": "Allow", "Resource": "*" }], "Version": "1" }'), }(name='RolePolicy', description='The required ram policy for deploying role.'), }(name='DryRunResult', description='The dry run result.'), requestId?: string(name='RequestId', description='The request ID.', example='4DB0F536-B3BE-4F0D-BD29-E83FB56D550C'), serviceId?: string(name='ServiceId', description='The service ID.', example='service-0e6fca6a51a544xxxxxx'), status?: string(name='Status', description='The status of the service.', example='Created'), version?: string(name='Version', description='The service version.', example='draft'), } model CreateServiceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CreateServiceResponseBody(name='body'), } /** * @summary Creates a service. * * @param tmpReq CreateServiceRequest * @param runtime runtime options for this request RuntimeOptions * @return CreateServiceResponse */ async function createServiceWithOptions(tmpReq: CreateServiceRequest, runtime: Util.RuntimeOptions): CreateServiceResponse { Util.validateModel(tmpReq); var request = new CreateServiceShrinkRequest{}; OpenApiUtil.convert(tmpReq, request); if (!Util.isUnset(tmpReq.complianceMetadata)) { request.complianceMetadataShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.complianceMetadata, 'ComplianceMetadata', 'json'); } var query = {}; if (!Util.isUnset(request.alarmMetadata)) { query['AlarmMetadata'] = request.alarmMetadata; } if (!Util.isUnset(request.approvalType)) { query['ApprovalType'] = request.approvalType; } if (!Util.isUnset(request.buildParameters)) { query['BuildParameters'] = request.buildParameters; } if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.complianceMetadataShrink)) { query['ComplianceMetadata'] = request.complianceMetadataShrink; } if (!Util.isUnset(request.deployMetadata)) { query['DeployMetadata'] = request.deployMetadata; } if (!Util.isUnset(request.deployType)) { query['DeployType'] = request.deployType; } if (!Util.isUnset(request.dryRun)) { query['DryRun'] = request.dryRun; } if (!Util.isUnset(request.duration)) { query['Duration'] = request.duration; } if (!Util.isUnset(request.isSupportOperated)) { query['IsSupportOperated'] = request.isSupportOperated; } if (!Util.isUnset(request.licenseMetadata)) { query['LicenseMetadata'] = request.licenseMetadata; } if (!Util.isUnset(request.logMetadata)) { query['LogMetadata'] = request.logMetadata; } if (!Util.isUnset(request.operationMetadata)) { query['OperationMetadata'] = request.operationMetadata; } if (!Util.isUnset(request.policyNames)) { query['PolicyNames'] = request.policyNames; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.resellable)) { query['Resellable'] = request.resellable; } if (!Util.isUnset(request.resourceGroupId)) { query['ResourceGroupId'] = request.resourceGroupId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.serviceInfo)) { query['ServiceInfo'] = request.serviceInfo; } if (!Util.isUnset(request.serviceType)) { query['ServiceType'] = request.serviceType; } if (!Util.isUnset(request.shareType)) { query['ShareType'] = request.shareType; } if (!Util.isUnset(request.sourceServiceId)) { query['SourceServiceId'] = request.sourceServiceId; } if (!Util.isUnset(request.sourceServiceVersion)) { query['SourceServiceVersion'] = request.sourceServiceVersion; } if (!Util.isUnset(request.tag)) { query['Tag'] = request.tag; } if (!Util.isUnset(request.tenantType)) { query['TenantType'] = request.tenantType; } if (!Util.isUnset(request.trialDuration)) { query['TrialDuration'] = request.trialDuration; } if (!Util.isUnset(request.upgradeMetadata)) { query['UpgradeMetadata'] = request.upgradeMetadata; } if (!Util.isUnset(request.versionName)) { query['VersionName'] = request.versionName; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'CreateService', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Creates a service. * * @param request CreateServiceRequest * @return CreateServiceResponse */ async function createService(request: CreateServiceRequest): CreateServiceResponse { var runtime = new Util.RuntimeOptions{}; return createServiceWithOptions(request, runtime); } model CreateServiceInstanceRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.', example='123e4567-e89b-12d3-a456-426655440000'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run for the request to check information such as the permissions and instance status. Valid values: * true: performs a dry run for the request, but does not create a service instance. * false: performs a dry run for the request, and creates a service instance if the request passes the dry run.', example='false'), endTime?: string(name='EndTime', description='The time when the service instance was released. > This parameter is available only for the service instances that are managed by service providers. Use the UTC time format: yyyy-MM-ddTHH:mmZ', example='2023-12-12T03:13:05Z'), name?: string(name='Name', description='The name of the service instance. The value must meet the following requirements: * The name cannot exceed 64 characters in length. * It can contain digits, letters, hyphens (-), and underscores (_). It must start with a digit or a letter.', example='TestName'), parameters?: map[string]any(name='Parameters', description='The parameters that are specified for service instance deployment. > If you want to specify the region in which the service instance is deployed, you must specify the information in Parameters.', example='{"NodeCount": 3, "SystemDiskSize": 40, "InstancePassword": "******"}'), regionId?: string(name='RegionId', description='The region ID. Valid values: * cn-hangzhou: China (Hangzhou) * ap-southeast-1: Singapore This parameter is required.', example='cn-hangzhou'), resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-aekzuqyxxxxxx'), serviceId?: string(name='ServiceId', description='The service ID. This parameter is required.', example='service-0e6fca6a51a54420****'), serviceVersion?: string(name='ServiceVersion', description='The service version.', example='1'), specificationName?: string(name='SpecificationName', description='The name of the package specification.', example='套餐一'), tag?: [ { key?: string(name='Key', description='The tag key.', example='key1'), value?: string(name='Value', description='The tag value.', example='value1'), } ](name='Tag', description='The custom tags.'), templateName?: string(name='TemplateName', description='The template name. You must specify a template name if the service supports multiple templates.', example='模板1'), userId?: string(name='UserId', description='The user ID.', example='1563457855xxxxxx'), } model CreateServiceInstanceShrinkRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.', example='123e4567-e89b-12d3-a456-426655440000'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run for the request to check information such as the permissions and instance status. Valid values: * true: performs a dry run for the request, but does not create a service instance. * false: performs a dry run for the request, and creates a service instance if the request passes the dry run.', example='false'), endTime?: string(name='EndTime', description='The time when the service instance was released. > This parameter is available only for the service instances that are managed by service providers. Use the UTC time format: yyyy-MM-ddTHH:mmZ', example='2023-12-12T03:13:05Z'), name?: string(name='Name', description='The name of the service instance. The value must meet the following requirements: * The name cannot exceed 64 characters in length. * It can contain digits, letters, hyphens (-), and underscores (_). It must start with a digit or a letter.', example='TestName'), parametersShrink?: string(name='Parameters', description='The parameters that are specified for service instance deployment. > If you want to specify the region in which the service instance is deployed, you must specify the information in Parameters.', example='{"NodeCount": 3, "SystemDiskSize": 40, "InstancePassword": "******"}'), regionId?: string(name='RegionId', description='The region ID. Valid values: * cn-hangzhou: China (Hangzhou) * ap-southeast-1: Singapore This parameter is required.', example='cn-hangzhou'), resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-aekzuqyxxxxxx'), serviceId?: string(name='ServiceId', description='The service ID. This parameter is required.', example='service-0e6fca6a51a54420****'), serviceVersion?: string(name='ServiceVersion', description='The service version.', example='1'), specificationName?: string(name='SpecificationName', description='The name of the package specification.', example='套餐一'), tag?: [ { key?: string(name='Key', description='The tag key.', example='key1'), value?: string(name='Value', description='The tag value.', example='value1'), } ](name='Tag', description='The custom tags.'), templateName?: string(name='TemplateName', description='The template name. You must specify a template name if the service supports multiple templates.', example='模板1'), userId?: string(name='UserId', description='The user ID.', example='1563457855xxxxxx'), } model CreateServiceInstanceResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='4DB0F536-B3BE-4F0D-BD29-E83FB56D****'), serviceInstanceId?: string(name='ServiceInstanceId', description='The ID of the service instance.', example='si-d6ab3a63ccbb4b17****'), status?: string(name='Status', description='The status of the service instance. Valid values: * Created * Deploying * DeployedFailed * Deployed * Upgrading * Deleting * Deleted * DeletedFailed', example='Created'), } model CreateServiceInstanceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CreateServiceInstanceResponseBody(name='body'), } /** * @summary Creates and deploys a service instance. * * @param tmpReq CreateServiceInstanceRequest * @param runtime runtime options for this request RuntimeOptions * @return CreateServiceInstanceResponse */ async function createServiceInstanceWithOptions(tmpReq: CreateServiceInstanceRequest, runtime: Util.RuntimeOptions): CreateServiceInstanceResponse { Util.validateModel(tmpReq); var request = new CreateServiceInstanceShrinkRequest{}; OpenApiUtil.convert(tmpReq, request); if (!Util.isUnset(tmpReq.parameters)) { request.parametersShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.parameters, 'Parameters', 'json'); } var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.dryRun)) { query['DryRun'] = request.dryRun; } if (!Util.isUnset(request.endTime)) { query['EndTime'] = request.endTime; } if (!Util.isUnset(request.name)) { query['Name'] = request.name; } if (!Util.isUnset(request.parametersShrink)) { query['Parameters'] = request.parametersShrink; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.resourceGroupId)) { query['ResourceGroupId'] = request.resourceGroupId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.serviceVersion)) { query['ServiceVersion'] = request.serviceVersion; } if (!Util.isUnset(request.specificationName)) { query['SpecificationName'] = request.specificationName; } if (!Util.isUnset(request.tag)) { query['Tag'] = request.tag; } if (!Util.isUnset(request.templateName)) { query['TemplateName'] = request.templateName; } if (!Util.isUnset(request.userId)) { query['UserId'] = request.userId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'CreateServiceInstance', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Creates and deploys a service instance. * * @param request CreateServiceInstanceRequest * @return CreateServiceInstanceResponse */ async function createServiceInstance(request: CreateServiceInstanceRequest): CreateServiceInstanceResponse { var runtime = new Util.RuntimeOptions{}; return createServiceInstanceWithOptions(request, runtime); } model CreateServiceTestCaseRequest { regionId?: string(name='RegionId', description='The region ID.', example='cn-hangzhou'), serviceId?: string(name='ServiceId', description='The service ID. This parameter is required.', example='service-0e6fca6a51a544xxxxxx'), serviceVersion?: string(name='ServiceVersion', description='The service version. This parameter is required.', example='draft'), templateName?: string(name='TemplateName', description='The template name. This parameter is required.', example='Custom_Image_Ecs'), testCaseName?: string(name='TestCaseName', description='Service Test case name. This parameter is required.', example='case1'), testConfig?: string(name='TestConfig', description='The service test config This parameter is required.', example='--- parameters: PayType: "PostPaid" EcsInstanceType: "$[iact3-auto]" InstancePassword: "$[iact3-auto]"'), } model CreateServiceTestCaseResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='E50287CB-AABF-4877-92C0-289B339A1546'), testCaseId?: string(name='TestCaseId', description='The test case Id', example='stc-5ba03a6a9a2746be8739'), } model CreateServiceTestCaseResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CreateServiceTestCaseResponseBody(name='body'), } /** * @summary Create service test case. * * @param request CreateServiceTestCaseRequest * @param runtime runtime options for this request RuntimeOptions * @return CreateServiceTestCaseResponse */ async function createServiceTestCaseWithOptions(request: CreateServiceTestCaseRequest, runtime: Util.RuntimeOptions): CreateServiceTestCaseResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.serviceVersion)) { query['ServiceVersion'] = request.serviceVersion; } if (!Util.isUnset(request.templateName)) { query['TemplateName'] = request.templateName; } if (!Util.isUnset(request.testCaseName)) { query['TestCaseName'] = request.testCaseName; } if (!Util.isUnset(request.testConfig)) { query['TestConfig'] = request.testConfig; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'CreateServiceTestCase', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Create service test case. * * @param request CreateServiceTestCaseRequest * @return CreateServiceTestCaseResponse */ async function createServiceTestCase(request: CreateServiceTestCaseRequest): CreateServiceTestCaseResponse { var runtime = new Util.RuntimeOptions{}; return createServiceTestCaseWithOptions(request, runtime); } model CreateServiceTestTaskRequest { regionId?: string(name='RegionId', description='The region ID.', example='cn-hangzhou'), taskName?: string(name='TaskName', description='The name of the task. This parameter is required.', example='nametest'), taskRegionId?: string(name='TaskRegionId', description='The Task Execution Region', example='cn-beijing'), testCaseIds?: [ string ](name='TestCaseIds', description='The service test case ids. This parameter is required.'), } model CreateServiceTestTaskResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='DF0F666F-FBBC-55C3-A368-C955DE7B4839'), taskId?: string(name='TaskId', description='The task ID.', example='stt-568c2c5a687a409b977e'), } model CreateServiceTestTaskResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CreateServiceTestTaskResponseBody(name='body'), } /** * @summary 创建服务测试任务 * * @param request CreateServiceTestTaskRequest * @param runtime runtime options for this request RuntimeOptions * @return CreateServiceTestTaskResponse */ async function createServiceTestTaskWithOptions(request: CreateServiceTestTaskRequest, runtime: Util.RuntimeOptions): CreateServiceTestTaskResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.taskName)) { query['TaskName'] = request.taskName; } if (!Util.isUnset(request.taskRegionId)) { query['TaskRegionId'] = request.taskRegionId; } if (!Util.isUnset(request.testCaseIds)) { query['TestCaseIds'] = request.testCaseIds; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'CreateServiceTestTask', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary 创建服务测试任务 * * @param request CreateServiceTestTaskRequest * @return CreateServiceTestTaskResponse */ async function createServiceTestTask(request: CreateServiceTestTaskRequest): CreateServiceTestTaskResponse { var runtime = new Util.RuntimeOptions{}; return createServiceTestTaskWithOptions(request, runtime); } model CreateServiceUsageRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.', example='mRdxWuW2ts'), regionId?: string(name='RegionId', description='The region ID.', example='cn-hangzhou'), serviceId?: string(name='ServiceId', description='The service ID. This parameter is required.', example='service-c2d118c9193e49xxxxxx'), } model CreateServiceUsageResponseBody = { requestId?: string(name='RequestId', description='Id of the request', example='E73F09DC-6C13-5CB1-A10F-7A4E125ABD2C'), } model CreateServiceUsageResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CreateServiceUsageResponseBody(name='body'), } /** * @summary Create Service resell application. * * @param request CreateServiceUsageRequest * @param runtime runtime options for this request RuntimeOptions * @return CreateServiceUsageResponse */ async function createServiceUsageWithOptions(request: CreateServiceUsageRequest, runtime: Util.RuntimeOptions): CreateServiceUsageResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'CreateServiceUsage', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Create Service resell application. * * @param request CreateServiceUsageRequest * @return CreateServiceUsageResponse */ async function createServiceUsage(request: CreateServiceUsageRequest): CreateServiceUsageResponse { var runtime = new Util.RuntimeOptions{}; return createServiceUsageWithOptions(request, runtime); } model CreateSupplierRegistrationRequest { contactEmail?: string(name='ContactEmail', description='Contact email This parameter is required.', example='xxxx@xxx.com'), contactNumber?: string(name='ContactNumber', description='Contact number This parameter is required.', example='186xxxxxxxxx'), contactPerson?: string(name='ContactPerson', description='Contact person This parameter is required.', example='Mike'), contactPersonTitle?: string(name='ContactPersonTitle', description='Contact person tiltle This parameter is required.', example='CTO'), enableResellerMode?: boolean(name='EnableResellerMode', description='Whether to enable the resell mode', example='true'), productAnnualRevenue?: string(name='ProductAnnualRevenue', description='Annual product revenue', example='1000'), productBusiness?: string(name='ProductBusiness', description='The business of product', example='AI'), productDeliveryTypes?: [ string ](name='ProductDeliveryTypes', description='Product delivery type This parameter is required.'), productPublishTime?: string(name='ProductPublishTime', description='The publish time of product', example='2020.10.10'), productSellTypes?: [ string ](name='ProductSellTypes', description='Product sell type This parameter is required.'), regionId?: string(name='RegionId', description='The region ID. This parameter is required.', example='cn-hangzhou'), resellBusinessDesc?: string(name='ResellBusinessDesc', description='The description of resell business.', example='empty'), suggestion?: string(name='Suggestion', description='The demands of service providers.', example='empty'), supplierDesc?: string(name='SupplierDesc', description='The description of service provider. This parameter is required.', example='Test supplier'), supplierLogo?: string(name='SupplierLogo', description='The Logo of service provider.', example='http://example.aliyundoc.com/cover/34DB-4F4C-9373-003AA060****.png'), supplierName?: string(name='SupplierName', description='The name of the service provider. This parameter is required.', example='Alibaba Cloud'), supplierNameEn?: string(name='SupplierNameEn', description='The english name of the service provider. This parameter is required.', example='Alibaba Cloud'), supplierUrl?: string(name='SupplierUrl', description='The URL of the service provider. This parameter is required.', example='http://www.xxx.xxx.cn'), } model CreateSupplierRegistrationResponseBody = { requestId?: string(name='RequestId', description='Id of the request', example='C4A145D8-xxxx-xxxx-xxxx-9730CDA27578'), } model CreateSupplierRegistrationResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CreateSupplierRegistrationResponseBody(name='body'), } /** * @summary 注册成为服务商 * * @param request CreateSupplierRegistrationRequest * @param runtime runtime options for this request RuntimeOptions * @return CreateSupplierRegistrationResponse */ async function createSupplierRegistrationWithOptions(request: CreateSupplierRegistrationRequest, runtime: Util.RuntimeOptions): CreateSupplierRegistrationResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.contactEmail)) { query['ContactEmail'] = request.contactEmail; } if (!Util.isUnset(request.contactNumber)) { query['ContactNumber'] = request.contactNumber; } if (!Util.isUnset(request.contactPerson)) { query['ContactPerson'] = request.contactPerson; } if (!Util.isUnset(request.contactPersonTitle)) { query['ContactPersonTitle'] = request.contactPersonTitle; } if (!Util.isUnset(request.enableResellerMode)) { query['EnableResellerMode'] = request.enableResellerMode; } if (!Util.isUnset(request.productAnnualRevenue)) { query['ProductAnnualRevenue'] = request.productAnnualRevenue; } if (!Util.isUnset(request.productBusiness)) { query['ProductBusiness'] = request.productBusiness; } if (!Util.isUnset(request.productDeliveryTypes)) { query['ProductDeliveryTypes'] = request.productDeliveryTypes; } if (!Util.isUnset(request.productPublishTime)) { query['ProductPublishTime'] = request.productPublishTime; } if (!Util.isUnset(request.productSellTypes)) { query['ProductSellTypes'] = request.productSellTypes; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.resellBusinessDesc)) { query['ResellBusinessDesc'] = request.resellBusinessDesc; } if (!Util.isUnset(request.suggestion)) { query['Suggestion'] = request.suggestion; } if (!Util.isUnset(request.supplierDesc)) { query['SupplierDesc'] = request.supplierDesc; } if (!Util.isUnset(request.supplierLogo)) { query['SupplierLogo'] = request.supplierLogo; } if (!Util.isUnset(request.supplierName)) { query['SupplierName'] = request.supplierName; } if (!Util.isUnset(request.supplierNameEn)) { query['SupplierNameEn'] = request.supplierNameEn; } if (!Util.isUnset(request.supplierUrl)) { query['SupplierUrl'] = request.supplierUrl; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'CreateSupplierRegistration', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary 注册成为服务商 * * @param request CreateSupplierRegistrationRequest * @return CreateSupplierRegistrationResponse */ async function createSupplierRegistration(request: CreateSupplierRegistrationRequest): CreateSupplierRegistrationResponse { var runtime = new Util.RuntimeOptions{}; return createSupplierRegistrationWithOptions(request, runtime); } model DeleteArtifactRequest { artifactId?: string(name='ArtifactId', description='The ID of the artifact. This parameter is required.', example='artifact-eea08d1e2d3a43aexxxx'), artifactVersion?: string(name='ArtifactVersion', description='The version of the artifact.', example='2'), clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.', example='788E7CP0EN9D51P'), } model DeleteArtifactResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='B1A0198B-F316-1B72-B8DD-28B6F6D6XXXX'), } model DeleteArtifactResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeleteArtifactResponseBody(name='body'), } /** * @summary Deletes an artifact. * * @param request DeleteArtifactRequest * @param runtime runtime options for this request RuntimeOptions * @return DeleteArtifactResponse */ async function deleteArtifactWithOptions(request: DeleteArtifactRequest, runtime: Util.RuntimeOptions): DeleteArtifactResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.artifactId)) { query['ArtifactId'] = request.artifactId; } if (!Util.isUnset(request.artifactVersion)) { query['ArtifactVersion'] = request.artifactVersion; } if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DeleteArtifact', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Deletes an artifact. * * @param request DeleteArtifactRequest * @return DeleteArtifactResponse */ async function deleteArtifact(request: DeleteArtifactRequest): DeleteArtifactResponse { var runtime = new Util.RuntimeOptions{}; return deleteArtifactWithOptions(request, runtime); } model DeleteServiceRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.', example='10CM943JP0EN9D51H'), regionId?: string(name='RegionId', description='The region ID. This parameter is required.', example='cn-hangzhou'), serviceId?: string(name='ServiceId', description='The service ID. This parameter is required.', example='service-0e6fca6a51a54420****'), serviceVersion?: string(name='ServiceVersion', description='The service version. This parameter is required.', example='2'), } model DeleteServiceResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='4DB0F536-B3BE-4F0D-BD29-E83FB56D****'), } model DeleteServiceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeleteServiceResponseBody(name='body'), } /** * @summary Deletes a service. * * @param request DeleteServiceRequest * @param runtime runtime options for this request RuntimeOptions * @return DeleteServiceResponse */ async function deleteServiceWithOptions(request: DeleteServiceRequest, runtime: Util.RuntimeOptions): DeleteServiceResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.serviceVersion)) { query['ServiceVersion'] = request.serviceVersion; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DeleteService', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Deletes a service. * * @param request DeleteServiceRequest * @return DeleteServiceResponse */ async function deleteService(request: DeleteServiceRequest): DeleteServiceResponse { var runtime = new Util.RuntimeOptions{}; return deleteServiceWithOptions(request, runtime); } model DeleteServiceInstancesRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.', example='123e4567-e89b-12d3-a456-426655440000'), regionId?: string(name='RegionId', description='The region ID. This parameter is required.', example='cn-hangzhou'), serviceInstanceId?: [ string ](name='ServiceInstanceId', description='The IDs of the service instances. This parameter is required.'), } model DeleteServiceInstancesResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='DB140E67-D75F-5585-946E-41D8DC8F4E00'), } model DeleteServiceInstancesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeleteServiceInstancesResponseBody(name='body'), } /** * @summary Deletes a service instance. * * @param request DeleteServiceInstancesRequest * @param runtime runtime options for this request RuntimeOptions * @return DeleteServiceInstancesResponse */ async function deleteServiceInstancesWithOptions(request: DeleteServiceInstancesRequest, runtime: Util.RuntimeOptions): DeleteServiceInstancesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceInstanceId)) { query['ServiceInstanceId'] = request.serviceInstanceId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DeleteServiceInstances', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Deletes a service instance. * * @param request DeleteServiceInstancesRequest * @return DeleteServiceInstancesResponse */ async function deleteServiceInstances(request: DeleteServiceInstancesRequest): DeleteServiceInstancesResponse { var runtime = new Util.RuntimeOptions{}; return deleteServiceInstancesWithOptions(request, runtime); } model DeleteServiceTestCaseRequest { regionId?: string(name='RegionId', description='Region ID.', example='cn-hangzhou'), testCaseId?: string(name='TestCaseId', description='The service test case id. This parameter is required.', example='stc-0b2a3ad7e1de4c299eec'), } model DeleteServiceTestCaseResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='4DB0F536-B3BE-4F0D-BD29-E83FB56D****'), } model DeleteServiceTestCaseResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeleteServiceTestCaseResponseBody(name='body'), } /** * @summary 删除服务测试配置 * * @param request DeleteServiceTestCaseRequest * @param runtime runtime options for this request RuntimeOptions * @return DeleteServiceTestCaseResponse */ async function deleteServiceTestCaseWithOptions(request: DeleteServiceTestCaseRequest, runtime: Util.RuntimeOptions): DeleteServiceTestCaseResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.testCaseId)) { query['TestCaseId'] = request.testCaseId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DeleteServiceTestCase', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary 删除服务测试配置 * * @param request DeleteServiceTestCaseRequest * @return DeleteServiceTestCaseResponse */ async function deleteServiceTestCase(request: DeleteServiceTestCaseRequest): DeleteServiceTestCaseResponse { var runtime = new Util.RuntimeOptions{}; return deleteServiceTestCaseWithOptions(request, runtime); } model DeployServiceInstanceRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.', example='123e4567-e89b-12d3-a456-426655440000'), regionId?: string(name='RegionId', description='The region ID. This parameter is required.', example='cn-hangzhou'), serviceInstanceId?: string(name='ServiceInstanceId', description='The ID of the service instance. This parameter is required.', example='si-0e6fca6a51a54420****'), } model DeployServiceInstanceResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='B8A6AEA6-0D8F-589A-A7FF-B44FD842456E'), } model DeployServiceInstanceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeployServiceInstanceResponseBody(name='body'), } /** * @summary Deploys a service instance. * * @param request DeployServiceInstanceRequest * @param runtime runtime options for this request RuntimeOptions * @return DeployServiceInstanceResponse */ async function deployServiceInstanceWithOptions(request: DeployServiceInstanceRequest, runtime: Util.RuntimeOptions): DeployServiceInstanceResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceInstanceId)) { query['ServiceInstanceId'] = request.serviceInstanceId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DeployServiceInstance', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Deploys a service instance. * * @param request DeployServiceInstanceRequest * @return DeployServiceInstanceResponse */ async function deployServiceInstance(request: DeployServiceInstanceRequest): DeployServiceInstanceResponse { var runtime = new Util.RuntimeOptions{}; return deployServiceInstanceWithOptions(request, runtime); } model GenerateDefaultServiceTestConfigRequest { serviceId?: string(name='ServiceId', description='The service ID. This parameter is required.', example='service-41ad58439b4b4bf8ae73'), serviceVersion?: string(name='ServiceVersion', description='The service version. This parameter is required.', example='draft'), templateName?: string(name='TemplateName', description='The template name.', example='test-1'), } model GenerateDefaultServiceTestConfigResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='51945B04-6AA6-410D-93BA-236E0248B104'), testConfig?: string(name='TestConfig', description='The service test config', example='--- parameters: PayType: "PostPaid" EcsInstanceType: "$[iact3-auto]" InstancePassword: "$[iact3-auto]"'), } model GenerateDefaultServiceTestConfigResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GenerateDefaultServiceTestConfigResponseBody(name='body'), } /** * @summary 生成默认服务测试配置 * * @param request GenerateDefaultServiceTestConfigRequest * @param runtime runtime options for this request RuntimeOptions * @return GenerateDefaultServiceTestConfigResponse */ async function generateDefaultServiceTestConfigWithOptions(request: GenerateDefaultServiceTestConfigRequest, runtime: Util.RuntimeOptions): GenerateDefaultServiceTestConfigResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.serviceVersion)) { query['ServiceVersion'] = request.serviceVersion; } if (!Util.isUnset(request.templateName)) { query['TemplateName'] = request.templateName; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'GenerateDefaultServiceTestConfig', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary 生成默认服务测试配置 * * @param request GenerateDefaultServiceTestConfigRequest * @return GenerateDefaultServiceTestConfigResponse */ async function generateDefaultServiceTestConfig(request: GenerateDefaultServiceTestConfigRequest): GenerateDefaultServiceTestConfigResponse { var runtime = new Util.RuntimeOptions{}; return generateDefaultServiceTestConfigWithOptions(request, runtime); } model GenerateServicePolicyRequest { operationTypes?: [ string ](name='OperationTypes', description='The type of operation N for which you want to generate the policy information.'), regionId?: string(name='RegionId', description='The region ID. This parameter is required.', example='cn-hangzhou'), serviceId?: string(name='ServiceId', description='The service ID. This parameter is required.', example='service-6c20f0f8085645xxxxxx'), serviceVersion?: string(name='ServiceVersion', description='The service version.', example='1'), templateName?: string(name='TemplateName', description='The template name.', example='模板1'), trialType?: string(name='TrialType', description='The trial policy. Valid values: * Trial: Trials are supported. * NotTrial: Trials are not supported.', example='NotTrial'), } model GenerateServicePolicyResponseBody = { missingPolicy?: [ { action?: [ string ](name='Action', description='Operations on specific resources.'), resource?: string(name='Resource', description='The specific objects authorized. An asterisk (*) denotes all resources.', example='*'), serviceName?: string(name='ServiceName', description='The name of the service.', example='ecs'), } ](name='MissingPolicy', description='The policies that are missing.'), policy?: string(name='Policy', description='The RAM policy.', example='{Statement": [{ "Action": ["oos:*"], "Effect": "Allow", "Resource": "*"},{ "Action": ["ecs:DescribeInstances"], "Effect": "Allow", "Resource": "*"},{ "Action": ["ecs:RunInstance"], "Effect": "Allow", "Resource": "*"}], "Version": "1"}'), requestId?: string(name='RequestId', description='The request ID.', example='5040BE9E-8DA2-5C9D-9B70-0EE6027A14BC'), } model GenerateServicePolicyResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GenerateServicePolicyResponseBody(name='body'), } /** * @summary 生成并校验服务创建stack所需要 * * @param request GenerateServicePolicyRequest * @param runtime runtime options for this request RuntimeOptions * @return GenerateServicePolicyResponse */ async function generateServicePolicyWithOptions(request: GenerateServicePolicyRequest, runtime: Util.RuntimeOptions): GenerateServicePolicyResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.operationTypes)) { query['OperationTypes'] = request.operationTypes; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.serviceVersion)) { query['ServiceVersion'] = request.serviceVersion; } if (!Util.isUnset(request.templateName)) { query['TemplateName'] = request.templateName; } if (!Util.isUnset(request.trialType)) { query['TrialType'] = request.trialType; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'GenerateServicePolicy', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary 生成并校验服务创建stack所需要 * * @param request GenerateServicePolicyRequest * @return GenerateServicePolicyResponse */ async function generateServicePolicy(request: GenerateServicePolicyRequest): GenerateServicePolicyResponse { var runtime = new Util.RuntimeOptions{}; return generateServicePolicyWithOptions(request, runtime); } model GetArtifactRequest { artifactId?: string(name='ArtifactId', description='The ID of the deployment package.', example='artifact-eea08d1e2d3a43aexxxx'), artifactName?: string(name='ArtifactName', description='The name of the deployment package.', example='gpu-test'), artifactVersion?: string(name='ArtifactVersion', description='The version of the deployment package.', example='1'), } model GetArtifactResponseBody = { artifactBuildProperty?: string(name='ArtifactBuildProperty', description='The build properties of the artifact, utilized for hosting and building the deployment package.', example='"{\\\\"RegionId\\\\":\\\\"xxx\\\\", \\\\"SourceImageId\\\\":\\\\"xxx\\\\", \\\\"\\\\":\\\\"xxx\\\\", \\\\"CommandType\\\\":\\\\"xxx\\\\", \\\\"CommandContent\\\\":\\\\"xxx\\\\"}"'), artifactBuildType?: string(name='ArtifactBuildType', description='The type of the deployment package to be built.', example='Dockerfile'), artifactId?: string(name='ArtifactId', description='The ID of the deployment package.', example='artifact-eea08d1e2d3a43aexxxx'), artifactProperty?: string(name='ArtifactProperty', description='The properties of the deployment package.', example='{\\\\"CommodityCode\\\\":\\\\"cmjj0005xxxx\\\\",\\\\"CommodityVersion\\\\":\\\\"V2022xxxx\\\\"}'), artifactType?: string(name='ArtifactType', description='The type of the deployment package.', example='EcsImage'), artifactVersion?: string(name='ArtifactVersion', description='The version of the deployment package.', example='2'), description?: string(name='Description', description='The description of the deployment package.', example='Description'), gmtModified?: string(name='GmtModified', description='The time when the deployment package was modified.', example='2022-10-20T02:19:55Z'), maxVersion?: long(name='MaxVersion', description='The latest version of the deployment package.', example='2'), name?: string(name='Name', description='The name of the deployment package.', example='Name'), permissionType?: string(name='PermissionType', description='Permission fields are applicable to container image artifact and Helm Chart artifact They can only change from Automatic to Public. Options: - Public - Automatic', example='Public'), progress?: string(name='Progress', description='The distribution progress of the deployment package.', example='100'), requestId?: string(name='RequestId', description='The request ID.', example='B1A0198B-F316-1B72-B8DD-28B6F6D6XXXX'), resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-aekzkt5buxxxxxx'), status?: string(name='Status', description='The status of the deployment package. Valid values:', example='Available'), statusDetail?: string(name='StatusDetail', description='The description of the deployment package.', example='"/usr/local/share/aliyun-assist/work/script/t-hz04zm90y6og0sg.sh: line 1: pip: command not found"'), supportRegionIds?: string(name='SupportRegionIds', description='The ID of the region that supports the deployment package.', example='["cn-hangzhou","cn-beijing"]'), tags?: [ { key?: string(name='Key', description='The tag key of the deployment package.', example='key1'), value?: string(name='Value', description='The tag value of the deployment package.', example='value1'), } ](name='Tags', description='The tags of the deployment package.'), versionName?: string(name='VersionName', description='The version name of the deployment package.', example='v1'), } model GetArtifactResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetArtifactResponseBody(name='body'), } /** * @summary Queries the information about a deployment package. * * @param request GetArtifactRequest * @param runtime runtime options for this request RuntimeOptions * @return GetArtifactResponse */ async function getArtifactWithOptions(request: GetArtifactRequest, runtime: Util.RuntimeOptions): GetArtifactResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.artifactId)) { query['ArtifactId'] = request.artifactId; } if (!Util.isUnset(request.artifactName)) { query['ArtifactName'] = request.artifactName; } if (!Util.isUnset(request.artifactVersion)) { query['ArtifactVersion'] = request.artifactVersion; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'GetArtifact', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Queries the information about a deployment package. * * @param request GetArtifactRequest * @return GetArtifactResponse */ async function getArtifact(request: GetArtifactRequest): GetArtifactResponse { var runtime = new Util.RuntimeOptions{}; return getArtifactWithOptions(request, runtime); } model GetArtifactRepositoryCredentialsRequest { artifactType?: string(name='ArtifactType', description='The type of the deployment package. Valid values: * File: Object Storage Service (OSS) object. * AcrImage: container image. This parameter is required.', example='File'), deployRegionId?: string(name='DeployRegionId', description='The region ID.', example='cn-hangzhou'), } model GetArtifactRepositoryCredentialsResponseBody = { availableResources?: [ { path?: string(name='Path', description='The path.', example='"/xxx/"'), regionId?: string(name='RegionId', description='The region ID.', example='oss-cn-hangzhou'), repositoryName?: string(name='RepositoryName', description='The repository name.', example='computenest-artifacts-draft-cn-hangzhou'), } ](name='AvailableResources', description='The information about the resources that can be uploaded.'), credentials?: { accessKeyId?: string(name='AccessKeyId', description='The AccessKey ID.', example='STS.xxx'), accessKeySecret?: string(name='AccessKeySecret', description='The AccessKey secret.', example='xxx'), password?: string(name='Password', description='The password.', example='eyJ0aW1lIjoiMTUyNjU0OTc5:0705733****'), securityToken?: string(name='SecurityToken', description='The Security Token Service (STS) token.', example='xxx'), username?: string(name='Username', description='The username.', example='xxx'), }(name='Credentials', description='The credentials.'), expireDate?: string(name='ExpireDate', description='The time when the credentials expired.', example='1526549792000'), requestId?: string(name='RequestId', description='The request ID.', example='94E89857-B994-44B6-9C4F-DBD200E9XXXX'), } model GetArtifactRepositoryCredentialsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetArtifactRepositoryCredentialsResponseBody(name='body'), } /** * @summary Queries the credentials that are required to upload a deployment package. * * @param request GetArtifactRepositoryCredentialsRequest * @param runtime runtime options for this request RuntimeOptions * @return GetArtifactRepositoryCredentialsResponse */ async function getArtifactRepositoryCredentialsWithOptions(request: GetArtifactRepositoryCredentialsRequest, runtime: Util.RuntimeOptions): GetArtifactRepositoryCredentialsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.artifactType)) { query['ArtifactType'] = request.artifactType; } if (!Util.isUnset(request.deployRegionId)) { query['DeployRegionId'] = request.deployRegionId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'GetArtifactRepositoryCredentials', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Queries the credentials that are required to upload a deployment package. * * @param request GetArtifactRepositoryCredentialsRequest * @return GetArtifactRepositoryCredentialsResponse */ async function getArtifactRepositoryCredentials(request: GetArtifactRepositoryCredentialsRequest): GetArtifactRepositoryCredentialsResponse { var runtime = new Util.RuntimeOptions{}; return getArtifactRepositoryCredentialsWithOptions(request, runtime); } model GetServiceRequest { filterAliUid?: boolean(name='FilterAliUid', description='Specifies whether to filter information based on Alibaba Cloud account IDs.', example='false'), regionId?: string(name='RegionId', description='The region ID.', example='cn-hangzhou'), serviceId?: string(name='ServiceId', description='The service ID.', example='service-4ee86df83fd948******'), serviceInstanceId?: string(name='ServiceInstanceId', description='The Service Instance Id.', example='si-85b1exxx'), serviceName?: string(name='ServiceName', description='The Service Name.', example='Wordpress社区版'), serviceVersion?: string(name='ServiceVersion', description='The service version.', example='1'), sharedAccountType?: string(name='SharedAccountType', description='The share type of the service. Default value: SharedAccount. Valid values: * SharedAccount: The service is shared by multiple accounts. * Resell: The service is distributed.', example='SharedAccount'), showDetail?: [ string ](name='ShowDetail', description='The information that you want to query.'), } model GetServiceResponseBody = { alarmMetadata?: string(name='AlarmMetadata', description='The alert configurations of the service. > This parameter takes effect only when you specify an alert policy for **PolicyNames**.', example='{ "TemplateUrl": "http://template.file.url", // 应用分组级别告警元数据 "ApplicationGroups": [ { "Name": "applicationGroup1", "TemplateUrl": "url1" }, { "Name": "applicationGroup2", "TemplateUrl": "url2" } ] }'), approvalType?: string(name='ApprovalType', description='The approval type of the service usage application. Valid values: * Manual: The application is manually approved. * AutoPass: The application is automatically approved.', example='Manual'), buildInfo?: string(name='BuildInfo', description='The information of build service information.', example='{ "RepoUrl": "https://github.com/user/repo.git", "Brancn": "main"}'), buildParameters?: string(name='BuildParameters', description='The parameters for building the service', example='{ "ServiceTemplateId": "st-xxxxx"}'), categories?: string(name='Categories', description='The category of the service.', example='DevOps'), commodity?: { chargeType?: string(name='ChargeType', description='The billing method of the service. Valid values: * **PREPAY** (default): subscription. * **POSTPAY**: pay-as-you-go.', example='PREPAY'), commodityCode?: string(name='CommodityCode', description='The commodity code of the service in Alibaba Cloud Marketplace.', example='cmjj00xxxx'), components?: [ string ](name='Components', description='The commodity modules.'), cssMetadata?: { componentsMappings?: [ { mappings?: map[string]string(name='Mappings', description='The mappings.'), templateName?: string(name='TemplateName', description='The template name.', example='Template 1'), } ](name='ComponentsMappings', description='The mapping information about the billing items.'), meteringEntityExtraInfos?: [ { entityId?: string(name='EntityId', description='The ID of the entity.', example='cmgj0048****-Frequency-1'), metricName?: string(name='MetricName', description='Name of a measurement indicator.', example='AvgMemory'), promql?: string(name='Promql', description='Custom PromQL.', example='avg_over_time(count(kube_pod_info{namespace=\\\\"default\\\\"})[1h:1m])'), type?: string(name='Type', description='Measurement indicators.', example='ComputeNestPrometheus'), } ](name='MeteringEntityExtraInfos', description='Metering item configuration information.'), meteringEntityMappings?: [ { entityIds?: string(name='EntityIds', description='The ID of the entity.', example='cmgj0015****-Frequency-1'), specificationName?: string(name='SpecificationName', description='The package name.', example='Pay-as-you-go package'), templateName?: string(name='TemplateName', description='The template name.', example='模板1'), } ](name='MeteringEntityMappings', description='The binding relationship between package and measurement dimension.'), }(name='CssMetadata', description='The configuration metadata related to Lingxiao.'), marketplaceMetadata?: { meteringEntityExtraInfos?: [ { entityId?: string(name='EntityId', description='The ID of the billable item.', example='cmgjxxxxxxxx-NetworkOut-2'), metricName?: string(name='MetricName', description='The metric name.', example='NetworkLantency'), promql?: string(name='Promql', description='The custom prometheus statement.', example='avg_over_time(count(kube_pod_info{namespace=\\\\"default\\\\"})[1h:1m])'), type?: string(name='Type', description='The metric.', example='AvgPod'), } ](name='MeteringEntityExtraInfos', description='The configurations of the billable items.'), meteringEntityMappings?: [ { entityIds?: string(name='EntityIds', description='The ID of the billable item.', example='cmgjxxxxxxxx-NetworkOut-2'), specificationName?: string(name='SpecificationName', description='The name of the specification package.', example='Pay-as-you-go Package'), templateName?: string(name='TemplateName', description='The template name.', example='Template 1'), } ](name='MeteringEntityMappings', description='The billable items that are associated with the package.'), specificationMappings?: [ { specificationCode?: string(name='SpecificationCode', description='The specification code of the service in Alibaba Cloud Marketplace.', example='cmjj00xxxx'), specificationName?: string(name='SpecificationName', description='The name of the specification package.', example='Pay-as-you-go'), templateName?: string(name='TemplateName', description='The template name.', example='Template 1'), trialType?: string(name='TrialType', description='The trial policy. Valid values: * Trial: Trials are supported. * NotTrial: Trials are not supported.', example='NotTrial'), } ](name='SpecificationMappings', description='The mappings between the service specifications and the template or package.'), }(name='MarketplaceMetadata', description='The metadata of Alibaba Cloud Marketplace.'), meteringEntities?: [ { entityId?: string(name='EntityId', description='The ID of the billable item.', example='cmgjxxxxxxxx-NetworkOut'), name?: string(name='Name', description='The name of the billable item.', example='spring-boot-demo'), } ](name='MeteringEntities', description='The information about the billable item.'), saasBoostMetadata?: string(name='SaasBoostMetadata', description='The configuration metadata related to Saas Boost.', example='{ "Enabled":false // The public endpoint of the SaaS Boost instance. "PublicAccessUrl":"https://example.com" }'), specifications?: [ { code?: string(name='Code', description='The commodity code.', example='cmjj00xxxx'), name?: string(name='Name', description='The specification name.', example='specifications1'), times?: [ string ](name='Times', description='The subscription duration. Unit: week or year.'), } ](name='Specifications', description='The specification details of the service in Alibaba Cloud Marketplace.'), type?: string(name='Type', description='The service type. Valid values: * marketplace: Alibaba Cloud Marketplace. * Css: Lingxiao.', example='Marketplace'), }(name='Commodity', description='The commodity details.'), complianceMetadata?: { compliancePacks?: [ string ](name='CompliancePacks', description='The compliance package is selected.'), }(name='ComplianceMetadata', description='Compliance check metadata.'), createTime?: string(name='CreateTime', description='The time when the service was created.', example='2021-05-20T00:00:00Z'), crossRegionConnectionStatus?: string(name='CrossRegionConnectionStatus', description='The binding configurations of the commodity module.', example='componesConfigs'), deployMetadata?: string(name='DeployMetadata', description='The storage configurations of the service. The format in which the deployment information of a service is stored varies based on the deployment type of the service. In this case, the deployment information is stored in the JSON string format.', example='{\\\\"TemplateConfigs\\\\":[{\\\\"Name\\\\":\\\\"模板1\\\\",\\\\"Url\\\\":\\\\"oss://computenest-test/template" + ".json?RegionId=cn-beijing\\\\",\\\\"PredefinedParameters\\\\":[{\\\\"Name\\\\":\\\\"低配版\\\\"," + "\\\\"Parameters\\\\":{\\\\"InstanceType\\\\":\\\\"ecs.g5.large\\\\",\\\\"DataDiskSize\\\\":40}},{\\\\"Name\\\\":\\\\"高配版\\\\"," + "\\\\"Parameters\\\\":{\\\\"InstanceType\\\\":\\\\"ecs.g5.large\\\\",\\\\"DataDiskSize\\\\":200}}]}]}'), deployType?: string(name='DeployType', description='The deployment type of the service. Valid values: * ros: The service is deployed by using Resource Orchestration Service (ROS). * terraform: The service is deployed by using Terraform. * spi: The service is deployed by calling a service provider interface (SPI). * operation: The service is deployed by using a hosted O\\\\&M service. * container: The service is deployed by using a container. * pkg: The service is deployed by using a package.', example='ros'), duration?: long(name='Duration', description='The duration for which hosted O\\\\&M is implemented. Unit: seconds.', example='259200'), entitySource?: map[string]string(name='EntitySource', description='The report source.'), isSupportOperated?: boolean(name='IsSupportOperated', description='Indicates whether the hosted O\\\\&M feature is enabled for the service. Default value: false. Valid values: * true * false > This parameter is returned if you set **ServiceType** to **private**.', example='false'), licenseMetadata?: string(name='LicenseMetadata', description='The license metadata.', example='{"renewType":"MONTHLY"}'), logMetadata?: string(name='LogMetadata', description='The logging configurations.', example='{ "Logstores": [ { "LogstoreName": "access-log", "LogPath": "/home/admin/app/logs", # This parameter is not required for containers. Configure the parameter in the YAML file. "FilePattern": "access.log\\\\*" # This parameter is not required for containers. Configure the parameter in the YAML file. } ] }'), operationMetadata?: string(name='OperationMetadata', description='The hosted O\\\\&M configurations.', example='{\\\\"PrometheusConfigMap\\\\":{\\\\"New_Vpc_Ack_And_Jumpserver\\\\":{}}}'), payFromType?: string(name='PayFromType', description='The source for which fees are generated. Valid values: * None: No fees are generated. * Marketplace: Fees are generated for Alibaba Cloud Marketplace. * Custom: The custom fees.', example='None'), permission?: string(name='Permission', description='The permissions on the service. Valid values: * Deployable: Permissions to deploy the service. * Accessible: Permissions to access the service.', example='Deployable'), policyNames?: string(name='PolicyNames', description='The policy name. The name can be up to 128 characters in length. Separate multiple names with commas (,). Only hosted O\\\\&M policies are supported.', example='policyName1, policyName2'), progress?: long(name='Progress', description='The deployment progress of the service instance. Unit: percentage.', example='90'), publishTime?: string(name='PublishTime', description='The time when the service was published.', example='2021-05-21T00:00:00Z'), registrationId?: string(name='RegistrationId', description='The registration ID.', example='sr-04056c2ab4b94bxxxxxx'), requestId?: string(name='RequestId', description='The request ID.', example='B1A0198B-F316-1B72-B8DD-28B6F6D6XXXX'), resellable?: boolean(name='Resellable', description='Indicates whether the distribution is supported. Valid values: * false * true', example='false'), resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-aekzuqyxxxxxx'), serviceAuditDocumentUrl?: string(name='ServiceAuditDocumentUrl', description='The URL of the service audit file.', example='https://service-info-public.oss-cn-hangzhou.aliyuncs.com/1690707531xxxxxx/service-document/be3382cd-xxxx-xxxx-xxxx-f8707ec12879.docx'), serviceDiscoverable?: string(name='ServiceDiscoverable', description='Indicates whether the service is visible. Valid values: * INVISIBLE * DISCOVERABLE', example='DISCOVERABLE'), serviceDocumentInfos?: [ { documentUrl?: string(name='DocumentUrl', description='The URL that is used to access the document.', example='http://docurl'), locale?: string(name='Locale', description='The language of the return data. Valid values: zh-CN and en-US.', example='zh-CN'), templateName?: string(name='TemplateName', description='The template name.', example='Default Template.'), } ](name='ServiceDocumentInfos', description='Service document information.'), serviceId?: string(name='ServiceId', description='The service ID.', example='service-70a3b15bb62643xxxxxx'), serviceInfos?: [ { agreements?: [ { name?: string(name='Name', description='The agreement name.', example='Name'), url?: string(name='Url', description='The agreement URL.', example='https://aliyun.com/xxxxxxxx.html'), } ](name='Agreements', description='The agreement information about the service.'), image?: string(name='Image', description='The URL of the service icon.', example='https://example.com/service-image/c1c4a559-cc60-4af1-b976-98f356602462.png'), locale?: string(name='Locale', description='The language of the service. Valid values: * zh-CN: Chinese * en-US: English', example='zh-CN'), longDescriptionUrl?: string(name='LongDescriptionUrl', description='The URL of the detailed description of the service.', example='https://example.com'), name?: string(name='Name', description='The service name.', example='WordPress'), shortDescription?: string(name='ShortDescription', description='The description of the service.', example='B是A公司自主设计并研发的开源分布式的关系型数据库'), softwares?: [ { name?: string(name='Name', description='The name of the software', example='MySQL'), version?: string(name='Version', description='The version of the software.', example='5.7'), } ](name='Softwares', description='The list of the information about the software in the service.'), } ](name='ServiceInfos', description='The information about the service.'), serviceProductUrl?: string(name='ServiceProductUrl', description='The URL of the service page.', example='http://example2.com'), serviceType?: string(name='ServiceType', description='The type of the service. Valid values: * private: The service is a private service and is deployed within the account of a customer. * managed: The service is a fully managed service and is deployed within the account of a service provider. * operation: The service is a hosted O\\\\&M service.', example='private'), shareType?: string(name='ShareType', description='The permission type of the deployment URL. Valid values: * Public: All users can go to the URL to create a service instance or a trial service instance. * Restricted: Only users in the whitelist can go to the URL to create a service instance or a trial service instance. * OnlyFormalRestricted: Only users in the whitelist can go to the URL to create a service instance. * OnlyTrailRestricted: Only users in the whitelist can go to the URL to create a trial service instance. * Hidden: Users not in the whitelist cannot see the service details page when they go to the URL and cannot request deployment permissions.', example='Public'), shareTypeStatus?: string(name='ShareTypeStatus', description='The share status of the instance. > This parameter is discontinued.', example='This parameter is discontinued.'), sourceServiceId?: string(name='SourceServiceId', description='The ID of the distribution source service.', example='service-70a3b15bb62643xxxxxx'), sourceServiceVersion?: string(name='SourceServiceVersion', description='The version of the distribution source service.', example='1'), sourceSupplierName?: string(name='SourceSupplierName', description='The name of the distribution source service provider.', example='SourceSupplier'), statistic?: { accumulativeInstanceCount?: int32(name='AccumulativeInstanceCount', description='The total number of service instances that belong to the service. The service instances that are deleted are counted.', example='75'), accumulativePocAmount?: double(name='AccumulativePocAmount', description='The total amount consumed for trial service instances. Unit: CNY.', example='80.35'), accumulativeUserCount?: int32(name='AccumulativeUserCount', description='The total number of users who use the service. The historical users are counted.', example='60'), averagePocAmount?: double(name='AveragePocAmount', description='The average amount consumed for trial service instances per instance. Unit: CNY.', example='40.17'), averagePocDuration?: double(name='AveragePocDuration', description='The average duration for which trial service instances are in use. Unit: Hour.', example='1'), averagePocUnitAmount?: double(name='AveragePocUnitAmount', description='The average amount consumed for trial service instances per a period of time. Unit: CNY.', example='167.9'), deployedServiceInstanceCount?: int32(name='DeployedServiceInstanceCount', description='The number of online service instances. It means the number of service instances that are successfully deployed.', example='20'), deployedUserCount?: int32(name='DeployedUserCount', description='The number of online users. It means the number of users who successfully deployed the service instances.', example='10'), submittedUsageCount?: int32(name='SubmittedUsageCount', description='The number of service applications that are in the Submitted state.', example='10'), }(name='Statistic', description='The statistics.'), status?: string(name='Status', description='The status of the service. Valid values: * Draft: The service is a draft. * Submitted: The service is submitted for review. You cannot modify services in this state. * Approved: The service is approved. You cannot modify services in this state. You can publish services in this state. * Launching: The service is being published. * Online: The service is published. * Offline: The service is unpublished.', example='Online'), statusDetail?: string(name='StatusDetail', description='The description of the service status.', example='deploy successfully'), supplierName?: string(name='SupplierName', description='The name of the service provider.', example='Alibaba Cloud'), supplierUrl?: string(name='SupplierUrl', description='The URL of the service provider.', example='http://example.com'), supportContacts?: [ { type?: string(name='Type', description='The type of Contact information.', example='Email'), value?: string(name='Value', description='The value of Contact information.', example='supplier@test.com'), } ](name='SupportContacts', description='Contact information of the service provider.'), tags?: [ { key?: string(name='Key', description='The tag key.', example='key1'), value?: string(name='Value', description='The tag value.', example='value1'), } ](name='Tags', description='The service tags.'), tenantType?: string(name='TenantType', description='The type of the tenant. Valid values: * SingleTenant * MultiTenant', example='SingleTenant'), testStatus?: string(name='TestStatus', description='The status of the test. Valid values: * `CONFIG_IS_NULL`: No test configurations exist. * `SERVICE_TEST_SUCCEED`: The service passed the test. * `SERVICE_TSET_DOING`: The service does not pass the test.', example='SERVICE_TEST_SUCCEED'), trialDuration?: long(name='TrialDuration', description='The trial duration. Unit: day. The maximum trial duration cannot exceed 30 days.', example='7'), trialType?: string(name='TrialType', description='The trial policy. Valid values: * Trial: Trials are supported. * NotTrial: Trials are not supported.', example='Trial'), updateTime?: string(name='UpdateTime', description='The time when the service was updated.', example='2021-05-22T00:00:00Z'), upgradeMetadata?: string(name='UpgradeMetadata', description='The metadata about the upgrade.', example='{\\\\"Description\\\\":\\\\"xxx\\\\",\\\\"SupportRollback\\\\":true,\\\\"SupportUpgradeFromVersions\\\\":[],\\\\"UpgradeComponents\\\\":[\\\\"Configuration\\\\"]}'), version?: string(name='Version', description='The service version.', example='1.0'), versionName?: string(name='VersionName', description='The version name.', example='v1'), virtualInternetService?: string(name='VirtualInternetService', description='Indicates whether the service is a virtual Internet service. Valid values: * false * true', example='false'), virtualInternetServiceId?: string(name='VirtualInternetServiceId', description='The ID of the virtual Internet service.', example='service-70a3b15bb62643xxxxxx'), } model GetServiceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetServiceResponseBody(name='body'), } /** * @summary Queries the information about a service. * * @param request GetServiceRequest * @param runtime runtime options for this request RuntimeOptions * @return GetServiceResponse */ async function getServiceWithOptions(request: GetServiceRequest, runtime: Util.RuntimeOptions): GetServiceResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.filterAliUid)) { query['FilterAliUid'] = request.filterAliUid; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.serviceInstanceId)) { query['ServiceInstanceId'] = request.serviceInstanceId; } if (!Util.isUnset(request.serviceName)) { query['ServiceName'] = request.serviceName; } if (!Util.isUnset(request.serviceVersion)) { query['ServiceVersion'] = request.serviceVersion; } if (!Util.isUnset(request.sharedAccountType)) { query['SharedAccountType'] = request.sharedAccountType; } if (!Util.isUnset(request.showDetail)) { query['ShowDetail'] = request.showDetail; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'GetService', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Queries the information about a service. * * @param request GetServiceRequest * @return GetServiceResponse */ async function getService(request: GetServiceRequest): GetServiceResponse { var runtime = new Util.RuntimeOptions{}; return getServiceWithOptions(request, runtime); } model GetServiceEstimateCostRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.', example='mRdxWuW2ts'), commodity?: { payPeriod?: int32(name='PayPeriod', description='The subscription duration.', example='1'), payPeriodUnit?: string(name='PayPeriodUnit', description='The unit of the subscription duration. Valid values: * Year * Month * Day', example='Month'), }(name='Commodity', description='The subscription duration information about the purchase order of Alibaba Cloud Marketplace.'), parameters?: map[string]any(name='Parameters', description='The parameters that are specified to deploy the service instance.', example='{\\\\"PayType\\\\":\\\\"PostPaid\\\\",\\\\"InstancePassword\\\\":\\\\"xxxxxxxxxx\\\\",\\\\"EcsInstanceType\\\\":\\\\"ecs.g6.large\\\\",\\\\"VSwitchId\\\\":\\\\"vsw-0jlueyydpuekoxxxxxxxx\\\\",\\\\"VpcId\\\\":\\\\"vpc-0jlps6mjbgvpqxxxxxxxx\\\\",\\\\"ZoneId\\\\":\\\\"cn-wulanchabu-a\\\\",\\\\"Enable\\\\":false,\\\\"RegionId\\\\":\\\\"cn-wulanchabu\\\\"}'), regionId?: string(name='RegionId', description='The region ID.', example='cn-wulanchabu'), serviceId?: string(name='ServiceId', description='The service ID. This parameter is required.', example='service-16fbd358d75e49xxxxxx'), serviceInstanceId?: string(name='ServiceInstanceId', description='The ID of the service instance.', example='si-d6ab3a63ccbb4b17****'), serviceVersion?: string(name='ServiceVersion', description='The service version.', example='draft'), specificationName?: string(name='SpecificationName', description='The package name.', example='Package 1'), templateName?: string(name='TemplateName', description='The template name.', example='Custom_Image_Ecs'), } model GetServiceEstimateCostShrinkRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.', example='mRdxWuW2ts'), commodityShrink?: string(name='Commodity', description='The subscription duration information about the purchase order of Alibaba Cloud Marketplace.'), parametersShrink?: string(name='Parameters', description='The parameters that are specified to deploy the service instance.', example='{\\\\"PayType\\\\":\\\\"PostPaid\\\\",\\\\"InstancePassword\\\\":\\\\"xxxxxxxxxx\\\\",\\\\"EcsInstanceType\\\\":\\\\"ecs.g6.large\\\\",\\\\"VSwitchId\\\\":\\\\"vsw-0jlueyydpuekoxxxxxxxx\\\\",\\\\"VpcId\\\\":\\\\"vpc-0jlps6mjbgvpqxxxxxxxx\\\\",\\\\"ZoneId\\\\":\\\\"cn-wulanchabu-a\\\\",\\\\"Enable\\\\":false,\\\\"RegionId\\\\":\\\\"cn-wulanchabu\\\\"}'), regionId?: string(name='RegionId', description='The region ID.', example='cn-wulanchabu'), serviceId?: string(name='ServiceId', description='The service ID. This parameter is required.', example='service-16fbd358d75e49xxxxxx'), serviceInstanceId?: string(name='ServiceInstanceId', description='The ID of the service instance.', example='si-d6ab3a63ccbb4b17****'), serviceVersion?: string(name='ServiceVersion', description='The service version.', example='draft'), specificationName?: string(name='SpecificationName', description='The package name.', example='Package 1'), templateName?: string(name='TemplateName', description='The template name.', example='Custom_Image_Ecs'), } model GetServiceEstimateCostResponseBody = { commodity?: map[string]any(name='Commodity', description='The subscription duration information about the purchase order of Alibaba Cloud Marketplace.', example='{\\\\"PayPeriodUnit\\\\":Month,\\\\"PayPeriod\\\\":1}'), requestId?: string(name='RequestId', description='The request ID.', example='E73F09DC-6C13-5CB1-A10F-7A4E125ABD2C'), resources?: map[string]any(name='Resources', description='The list of resources.', example='{ "ECSInstances":{ "Type":"ALIYUN::ECS::InstanceGroup", "Success":true, "Result":{ "Order":{ "Currency":"CNY", "RuleIds":[ 1752723 ], "DetailInfos":{ "ResourcePriceModel":[ { "Resource":"bandwidth", "TradeAmount":0.0, "SubRuleIds":[], "OriginalAmount":0.0, "DiscountAmount":0.0 }, { "Resource":"image", "TradeAmount":0.0, "SubRuleIds":[], "OriginalAmount":0.0, "DiscountAmount":0.0 }, { "Resource":"instanceType", "TradeAmount":0.006966, "SubRuleIds":[], "OriginalAmount":0.45, "DiscountAmount":0.443034 }, { "Resource":"systemDisk", "TradeAmount":0.000867, "SubRuleIds":[], "OriginalAmount":0.056, "DiscountAmount":0.055133 }, { "Resource":"dataDisk", "TradeAmount":0.002167, "SubRuleIds":[], "OriginalAmount":0.14, "DiscountAmount":0.137833 } ] }'), } model GetServiceEstimateCostResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetServiceEstimateCostResponseBody(name='body'), } /** * @summary Queries the estimated price for creating a service instance. * * @param tmpReq GetServiceEstimateCostRequest * @param runtime runtime options for this request RuntimeOptions * @return GetServiceEstimateCostResponse */ async function getServiceEstimateCostWithOptions(tmpReq: GetServiceEstimateCostRequest, runtime: Util.RuntimeOptions): GetServiceEstimateCostResponse { Util.validateModel(tmpReq); var request = new GetServiceEstimateCostShrinkRequest{}; OpenApiUtil.convert(tmpReq, request); if (!Util.isUnset(tmpReq.commodity)) { request.commodityShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.commodity, 'Commodity', 'json'); } if (!Util.isUnset(tmpReq.parameters)) { request.parametersShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.parameters, 'Parameters', 'json'); } var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.commodityShrink)) { query['Commodity'] = request.commodityShrink; } if (!Util.isUnset(request.parametersShrink)) { query['Parameters'] = request.parametersShrink; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.serviceInstanceId)) { query['ServiceInstanceId'] = request.serviceInstanceId; } if (!Util.isUnset(request.serviceVersion)) { query['ServiceVersion'] = request.serviceVersion; } if (!Util.isUnset(request.specificationName)) { query['SpecificationName'] = request.specificationName; } if (!Util.isUnset(request.templateName)) { query['TemplateName'] = request.templateName; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'GetServiceEstimateCost', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Queries the estimated price for creating a service instance. * * @param request GetServiceEstimateCostRequest * @return GetServiceEstimateCostResponse */ async function getServiceEstimateCost(request: GetServiceEstimateCostRequest): GetServiceEstimateCostResponse { var runtime = new Util.RuntimeOptions{}; return getServiceEstimateCostWithOptions(request, runtime); } model GetServiceInstanceRequest { regionId?: string(name='RegionId', description='The region ID. This parameter is required.', example='cn-hangzhou'), serviceInstanceId?: string(name='ServiceInstanceId', description='The ID of the service instance. This parameter is required.', example='si-d6ab3a63ccbb4b17****'), } model GetServiceInstanceResponseBody = { bizStatus?: string(name='BizStatus', description='The business status of the service instance. Valid values: * Normal: The service instance is normal. * Renewing: The service instance is being renewed. * RenewFailed: The service instance failed to be renewed. * Expired: The service instance expired.', example='Normal'), createTime?: string(name='CreateTime', description='The time when the service instance was created.', example='2021-05-20T00:00:00Z'), enableInstanceOps?: boolean(name='EnableInstanceOps', description='Indicates whether the service instance supports the hosted O\\\\&M feature. Valid values: * true * false', example='true'), enableUserPrometheus?: boolean(name='EnableUserPrometheus', description='Indicates whether the Prometheus monitoring feature is enabled on the user side.', example='true'), endTime?: string(name='EndTime', description='The time when the service instance expires.', example='2022-01-01T12:00:00'), grafanaDashBoardUrl?: string(name='GrafanaDashBoardUrl', description='The URL of the Grafana dashboard.', example='https://g.xxxxxx.aliyun.com/d/xxxxxxxx-cn-mariadb/mysql-xxxxxxxx-quickstart-and-dashboard?orgId=355401&refresh=10s'), isOperated?: boolean(name='IsOperated', description='Indicates whether the hosted O\\\\&M feature is enabled for the service instance. Valid values: * true * false', example='true'), licenseMetadata?: string(name='LicenseMetadata', description='The license metadata.', example='{"renewType":"MONTHLY"}'), name?: string(name='Name', description='The name of the service instance.', example='TestName'), networkConfig?: { endpointId?: string(name='EndpointId', description='The ID of the endpoint for the private connection. > This parameter is discontinued.', example='ep-m5ei37240541816b****'), endpointServiceId?: string(name='EndpointServiceId', description='The ID of the endpoint service for the private connection. > This parameter is discontinued.', example='epsrv-5ei07324541816bxxxx'), privateVpcConnections?: [ { connectionConfigs?: [ { connectBandwidth?: int32(name='ConnectBandwidth', description='The bandwidth limit for the private connection established based on the private network interconnection mode of Compute Nest.', example='1536Mbps'), domainName?: string(name='DomainName', description='The domain name.', example='example.com'), endpointIps?: [ string ](name='EndpointIps', description='The IP addresses of the endpoints for private connections.'), ingressEndpointStatus?: string(name='IngressEndpointStatus', description='The status of the Ingress endpoint. Valid values: * Ready: The Ingress endpoint is connected. * Pending: The Ingress endpoint is being connected. * Failed: The Ingress endpoint fails to be connected. * Deleted: The Ingress endpoint is deleted. * Deleting: The Ingress endpoint is being deleted.', example='Ready'), networkServiceStatus?: string(name='NetworkServiceStatus', description='The status of the network service. Valid values: * Ready: The network service is connected. * Pending: The network service is being connected. * Failed: The network service fails to be connected. * Deleted: The network service is deleted. * Deleting: The network service is being deleted.', example='Ready'), securityGroups?: [ string ](name='SecurityGroups', description='The names of the security groups.'), vSwitches?: [ string ](name='VSwitches', description='The names of the vSwitches.'), vpcId?: string(name='VpcId', description='The virtual private cloud (VPC) ID.', example='vpc-bp1vwnn14rqpyiczj****'), } ](name='ConnectionConfigs', description='The network configurations, which are mainly used for the private connection.'), endpointId?: string(name='EndpointId', description='The ID of the endpoint for the private connection.', example='ep-m5ei37240541816b****'), endpointServiceId?: string(name='EndpointServiceId', description='The ID of the endpoint service for the private connection.', example='epsrv-5ei07324541816bxxxx'), privateZoneName?: string(name='PrivateZoneName', description='The custom domain name.', example='test.computenest.aliyuncs.com'), } ](name='PrivateVpcConnections', description='The information about private connections.'), reversePrivateVpcConnections?: [ { endpointId?: string(name='EndpointId', description='The ID of the endpoint for the reverse private connection.', example='ep-m5ei42370541816b****'), endpointServiceId?: string(name='EndpointServiceId', description='The ID of the endpoint service for the reverse private connection.', example='epsrv-5ei07324541816bxxxx'), } ](name='ReversePrivateVpcConnections', description='The information about the reverse private connection.'), }(name='NetworkConfig', description='The network configurations. > This parameter is discontinued.'), operatedServiceInstanceId?: string(name='OperatedServiceInstanceId', description='The ID of the service instance that is used to implement hosted O\\\\&M.', example='si-d6ab3a63ccbb4b17****'), operationEndTime?: string(name='OperationEndTime', description='The end of the time range during which hosted O\\\\&M is implemented.', example='2022-01-28T06:48:56Z'), operationExtraInfo?: string(name='OperationExtraInfo', description='Operate extra info', example='6cc5ce3590ed7f5529e85fec'), operationStartTime?: string(name='OperationStartTime', description='The beginning of the time range during which hosted O\\\\&M is implemented.', example='2021-12-29T06:48:56Z'), outputs?: string(name='Outputs', description='The outputs returned from creating the service instance. * If the service is deployed by using a ROS template, all output fields of the template are returned. * If the service is deployed by calling an SPI operation, the output fields of the service provider and for the Compute Nest additional features are returned.', example='{ "InstanceIds": [ "i-hp38ofxl0dsyfi7z****" ] }'), parameters?: string(name='Parameters', description='The parameters that are specified to deploy the service instance.', example='{ "param": "value" }'), payType?: string(name='PayType', description='The billing method of the service. Valid values: * Permanent: Once you purchase the service, you can use it permanently. * Subscription: You purchase the service from Alibaba Cloud Marketplace and are charged for the service on a subscription basis. * PayAsYouGo: You purchase the service from Alibaba Cloud Marketplace and are charged for the service on a pay-as-you-go basis. * CustomFixTime: You are charged for the service based on a custom duration fixed by the service provider.', example='Subscription'), predefinedParameterName?: string(name='PredefinedParameterName', description='The package name.', example='Package 1'), progress?: long(name='Progress', description='The deployment progress of the service instance. Unit: percentage.', example='90'), rdAccountLoginUrl?: string(name='RdAccountLoginUrl', description='The logon URL for the accounts in the resource directory corresponding to the service instance.', example='https://signin.aliyun.com/switchRole.htm?parentAlias=1307782318217247.onaliyun.com&roleName=ResourceDirectoryAccountAccessRole'), requestId?: string(name='RequestId', description='The request ID.', example='4DB0F536-B3BE-4F0D-BD29-E83FB56D550C'), resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-aekzkt5buxxxxxx'), resources?: string(name='Resources', description='The list of resources.', example='[ { "StackId": "stack-xxx" } ]'), service?: { deployMetadata?: string(name='DeployMetadata', description='The storage configurations of the service. The format in which the deployment information of a service is stored varies based on the deployment type of the service. In this case, the deployment information is stored in the JSON string format.'), deployType?: string(name='DeployType', description='The deployment type of the service. Valid values: * ros: The service is deployed by using Resource Orchestration Service (ROS). * terraform: The service is deployed by using Terraform. * ack: The service is deployed by using Container Service for Kubernetes (ACK). * spi: The service is deployed by calling a service provider interface (SPI). * operation: The service is deployed by using a hosted O\\\\&M service.', example='ros'), publishTime?: string(name='PublishTime', description='The time when the service was published.', example='2021-05-21T00:00:00Z'), serviceDocUrl?: string(name='ServiceDocUrl', description='The URL of the service documentation.', example='http://example.com'), serviceId?: string(name='ServiceId', description='The service ID.', example='service-9c8a3522528b4fe8****'), serviceInfos?: [ { image?: string(name='Image', description='The URL of the service icon.', example='https://example.com/service-image/c1c4a559-cc60-4af1-b976-98f356602462.png'), locale?: string(name='Locale', description='The language of the service instance.', example='zh-CN'), name?: string(name='Name', description='The service name.', example='WordPress'), shortDescription?: string(name='ShortDescription', description='The description of the service.', example='B是A公司自主设计并研发的开源分布式的关系型数据库'), } ](name='ServiceInfos', description='The information about the service.'), serviceProductUrl?: string(name='ServiceProductUrl', description='The URL of the service page.', example='https://service-info-private.oss-cn-hangzhou.aliyuncs.com'), serviceType?: string(name='ServiceType', description='The type of the service. Valid values: * private: The service is a private service and is deployed within the account of a customer. * managed: The service is a fully managed service and is deployed within the account of a service provider. * operation: The service is a hosted O\\\\&M service.', example='private'), status?: string(name='Status', description='The status of the service. Valid values: Draft: The registration request of the service is pending to be submitted. Submitted: The registration request of the service is submitted. Approved: The registration request of the service is approved. Online: The service is published. Offline: The service is unpublished. Deleted: The service is deleted. Launching: The service is being published.', example='Online'), supplierName?: string(name='SupplierName', description='The name of the service provider.', example='Alibaba Cloud'), supplierUrl?: string(name='SupplierUrl', description='The URL of the service provider.', example='http://example.com'), upgradableServiceInfos?: [ { version?: string(name='Version', description='The upgradable service version.', example='4'), versionName?: string(name='VersionName', description='The version name of an upgradable service version.', example='Init version'), } ](name='UpgradableServiceInfos', description='The upgradable service Info.'), upgradableServiceVersions?: [ string ](name='UpgradableServiceVersions', description='The service versions that can be updated.'), version?: string(name='Version', description='The service version.', example='1'), versionName?: string(name='VersionName', description='The custom version name defined by the service provider.', example='20231127020225'), }(name='Service', description='The information about the service to which the service instance belongs.'), serviceInstanceId?: string(name='ServiceInstanceId', description='The ID of the service instance.', example='si-d6ab3a63ccbb4b17****'), serviceType?: string(name='ServiceType', description='The type of the service. Valid values: * private: The service is a private service and is deployed within the account of a customer. * managed: The service is a fully managed service and is deployed within the account of a service provider. * operation: The service is a hosted O\\\\&M service. * poc: The service is a trial service.', example='private'), source?: string(name='Source', description='The source of the service instance. Valid values: * User: Compute Nest customer * Market: Alibaba Cloud Marketplace * Supplier: Compute Nest service provider', example='User'), status?: string(name='Status', description='The deployment state of the service instance. Valid values: * Created * Deploying * DeployedFailed * Deployed * Upgrading * Deleting * Deleted * DeletedFailed', example='Deployed'), statusDetail?: string(name='StatusDetail', description='The description of the deployment state of the service instance.', example='deploy successfully'), supplierUid?: long(name='SupplierUid', description='The Alibaba Cloud account ID of the service provider.', example='1964460391538545'), tags?: [ { key?: string(name='Key', description='The tag key.', example='key1'), value?: string(name='Value', description='The tag value.', example='value1'), } ](name='Tags', description='The custom tags.'), templateName?: string(name='TemplateName', description='The template name.', example='模板1'), updateTime?: string(name='UpdateTime', description='The time when the service instance was updated.', example='2021-05-20T00:00:00Z'), userId?: long(name='UserId', description='The Alibaba Cloud account ID of the user.', example='1234567'), } model GetServiceInstanceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetServiceInstanceResponseBody(name='body'), } /** * @summary Queries the information about a service instance. * * @param request GetServiceInstanceRequest * @param runtime runtime options for this request RuntimeOptions * @return GetServiceInstanceResponse */ async function getServiceInstanceWithOptions(request: GetServiceInstanceRequest, runtime: Util.RuntimeOptions): GetServiceInstanceResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceInstanceId)) { query['ServiceInstanceId'] = request.serviceInstanceId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'GetServiceInstance', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Queries the information about a service instance. * * @param request GetServiceInstanceRequest * @return GetServiceInstanceResponse */ async function getServiceInstance(request: GetServiceInstanceRequest): GetServiceInstanceResponse { var runtime = new Util.RuntimeOptions{}; return getServiceInstanceWithOptions(request, runtime); } model GetServiceProvisionsRequest { parameters?: map[string]any(name='Parameters', description='The parameters that are specified to deploy the service instance.', example='{\\\\"RegionId\\\\":\\\\"cn-hangzhou\\\\"}'), regionId?: string(name='RegionId', description='The region ID.', example='cn-hangzhou'), serviceId?: string(name='ServiceId', description='The service ID. This parameter is required.', example='service-20b8a396048346xxxxxx'), serviceVersion?: string(name='ServiceVersion', description='The service version.', example='1'), templateName?: string(name='TemplateName', description='The template name.', example='模板1'), } model GetServiceProvisionsShrinkRequest { parametersShrink?: string(name='Parameters', description='The parameters that are specified to deploy the service instance.', example='{\\\\"RegionId\\\\":\\\\"cn-hangzhou\\\\"}'), regionId?: string(name='RegionId', description='The region ID.', example='cn-hangzhou'), serviceId?: string(name='ServiceId', description='The service ID. This parameter is required.', example='service-20b8a396048346xxxxxx'), serviceVersion?: string(name='ServiceVersion', description='The service version.', example='1'), templateName?: string(name='TemplateName', description='The template name.', example='模板1'), } model GetServiceProvisionsResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='DB1FA13E-1087-5654-84D5-58A0ACAD1B18'), serviceProvisions?: [ { autoEnableService?: boolean(name='AutoEnableService', description='Indicates whether automatic activation for the service is defined in the template. Valid values: * true: Automatic activation for the service is defined in the template. * false: Manual activation for the service is defined in the template.', example='true'), enableURL?: string(name='EnableURL', description='The URL that points to the activation page of the service. > This parameter is returned if Status is set to Disabled.', example='https://common-buy.aliyun.com/?commodityCode=sls'), roleProvision?: { authorizationURL?: string(name='AuthorizationURL', description='The authorization URL of the RAM role. > This parameter is returned if Created is set to false.', example='https://ram.console.aliyun.com/role/authorization?request={"Services":[{"Service":"CS","Roles":[{"RoleName":"AliyunCSManagedVKRole","TemplateId":"AliyunCSManagedVKRole"},{"RoleName":"AliyunCSDefaultRole","TemplateId":"Default"}]}],"ReturnUrl":"https://cs.console.aliyun.com/"}'), roles?: [ { apiForCreation?: { apiName?: string(name='ApiName', description='The name of the API operation.', example='GetServiceProvisions'), apiProductId?: string(name='ApiProductId', description='The ID of the Alibaba Cloud service to which the API operation belongs.', example='ComputeNest'), apiType?: string(name='ApiType', description='The type of the API operation. Valid values: * Open: public * Inner: private', example='Open'), parameters?: map[string]any(name='Parameters', description='The parameters of the API operation. ${Variable name} indicates a dynamic parameter.', example='{ "ServiceLinkedRole": "AliyunServiceRoleForRdsPgsqlOnEcs", "RegionId": "${RegionId}" }'), }(name='ApiForCreation', description='The information about the API operation that is used to create the RAM role.'), created?: boolean(name='Created', description='Indicates whether the RAM role is created. Valid values: * true * false', example='true'), function?: string(name='Function', description='The purpose for which the RAM role is used. Default value: Default. A value of Default indicates that the RAM role is the default role of the service.', example='Default'), roleName?: string(name='RoleName', description='The name of the role.', example='AliyunServiceRole'), } ](name='Roles', description='The RAM roles.'), }(name='RoleProvision', description='The information about the RAM roles of the cloud service. If this parameter is empty, no RAM roles is associated with the service.'), serviceName?: string(name='ServiceName', description='The name of the cloud service.', example='db'), status?: string(name='Status', description='The activation status of the cloud service. Valid values: - Enabled: The cloud service is activated. - EnabledByDefault: The cloud service is activated by default. - Disabled: The cloud service is not activated. - Unknown: The activation status of the cloud service is unknown.', example='Enabled'), statusReason?: string(name='StatusReason', description='The reason why the service is in the Disabled or Unknown state. > This parameter is returned if Status is set to Disabled or Unknown.', example='resource(Eip) import info missing'), } ](name='ServiceProvisions', description='The information about the cloud services.'), } model GetServiceProvisionsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetServiceProvisionsResponseBody(name='body'), } /** * @summary 计算巢查询服务是否开通 * * @param tmpReq GetServiceProvisionsRequest * @param runtime runtime options for this request RuntimeOptions * @return GetServiceProvisionsResponse */ async function getServiceProvisionsWithOptions(tmpReq: GetServiceProvisionsRequest, runtime: Util.RuntimeOptions): GetServiceProvisionsResponse { Util.validateModel(tmpReq); var request = new GetServiceProvisionsShrinkRequest{}; OpenApiUtil.convert(tmpReq, request); if (!Util.isUnset(tmpReq.parameters)) { request.parametersShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.parameters, 'Parameters', 'json'); } var query = {}; if (!Util.isUnset(request.parametersShrink)) { query['Parameters'] = request.parametersShrink; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.serviceVersion)) { query['ServiceVersion'] = request.serviceVersion; } if (!Util.isUnset(request.templateName)) { query['TemplateName'] = request.templateName; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'GetServiceProvisions', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary 计算巢查询服务是否开通 * * @param request GetServiceProvisionsRequest * @return GetServiceProvisionsResponse */ async function getServiceProvisions(request: GetServiceProvisionsRequest): GetServiceProvisionsResponse { var runtime = new Util.RuntimeOptions{}; return getServiceProvisionsWithOptions(request, runtime); } model GetServiceRegistrationRequest { regionId?: string(name='RegionId', description='Region ID. This parameter is required.', example='cn-hangzhou'), registrationId?: string(name='RegistrationId', description='Service registration ID.', example='sr-1b4aabc1c9eb4109****'), } model GetServiceRegistrationResponseBody = { comment?: string(name='Comment', description='Comment from reviewer.', example='comment message'), detail?: { atRisk?: boolean(name='AtRisk', description='Whether risk exists.', example='true'), hasRelatedArtifact?: boolean(name='HasRelatedArtifact', description='Whether service is associated with artifact.', example='true'), reports?: string(name='Reports', description='The reports.', example='{ "template1":"https://compute-nest-security-audit-bucket.oss-cn-hangzhou.aliyuncs.com/report" }'), templateDiffUrl?: string(name='TemplateDiffUrl', description='The url of template diff file.', example='https://compute-nest-template-diff-bucket.oss-cn-hangzhou.aliyuncs.com/service-abc/diff'), }(name='Detail', description='The details of service audit.'), finishTime?: string(name='FinishTime', description='Finish time.', example='2024-12-07T11:05:50Z'), registrationId?: string(name='RegistrationId', description='Service registration ID.', example='sr-1b4aabc1c9eb4109****'), requestId?: string(name='RequestId', description='The request ID.', example='A361BA9E-xxxx-xxxx-xxxx-C26E5180456E'), serviceId?: string(name='ServiceId', description='The service ID.', example='service-c2d118c9193e49xxxxxx'), serviceInfo?: { serviceType?: string(name='ServiceType', description='The type of the service. Valid values: * private: The service is a private service and is deployed within the account of a customer. * managed: The service is a fully managed service and is deployed within the account of a service provider. * operation: The service is a hosted O\\\\&M service.', example='private'), trialType?: string(name='TrialType', description='The trial policy. Valid values: * Trial: Trials are supported. * NotTrial: Trials are not supported.', example='Trial'), versionName?: string(name='VersionName', description='The version name.', example='v1.0'), }(name='ServiceInfo', description='The service details.'), serviceVersion?: string(name='ServiceVersion', description='The service version.', example='beta'), status?: string(name='Status', description='The status of service registration. Valid values: * Submitted * Approved * Rejected * Canceled * Executed', example='Submitted'), submitTime?: string(name='SubmitTime', description='Submit time.', example='2024-12-07T11:05:50Z'), } model GetServiceRegistrationResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetServiceRegistrationResponseBody(name='body'), } /** * @summary Get service registration detail. * * @param request GetServiceRegistrationRequest * @param runtime runtime options for this request RuntimeOptions * @return GetServiceRegistrationResponse */ async function getServiceRegistrationWithOptions(request: GetServiceRegistrationRequest, runtime: Util.RuntimeOptions): GetServiceRegistrationResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.registrationId)) { query['RegistrationId'] = request.registrationId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'GetServiceRegistration', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Get service registration detail. * * @param request GetServiceRegistrationRequest * @return GetServiceRegistrationResponse */ async function getServiceRegistration(request: GetServiceRegistrationRequest): GetServiceRegistrationResponse { var runtime = new Util.RuntimeOptions{}; return getServiceRegistrationWithOptions(request, runtime); } model GetServiceTemplateParameterConstraintsRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.', example='10CM943JP0EN9D51H'), deployRegionId?: string(name='DeployRegionId', description='The ID of the region in which the service instance is deployed. This parameter is required.', example='cn-huhehaote'), enablePrivateVpcConnection?: boolean(name='EnablePrivateVpcConnection', description='Specifies whether to enable the private connection feature. Valid values: * true * false', example='true'), parameters?: [ { parameterKey?: string(name='ParameterKey', description='The parameter name.', example='PayType'), parameterValue?: string(name='ParameterValue', description='The parameter value.', example='PostPaid'), } ](name='Parameters', description='The parameters in the template.'), regionId?: string(name='RegionId', description='The region ID. This parameter is required.', example='cn-hangzhou'), serviceId?: string(name='ServiceId', description='The service ID. This parameter is required.', example='service-1c11f365190c44xxxxxx'), serviceInstanceId?: string(name='ServiceInstanceId', description='The ID of the service instance.', example='si-d6ab3a63ccbb4b17****'), serviceVersion?: string(name='ServiceVersion', description='The service version.', example='draft'), templateName?: string(name='TemplateName', description='The template name. This parameter is required.', example='模板1'), } model GetServiceTemplateParameterConstraintsResponseBody = { familyConstraints?: [ string ](name='FamilyConstraints', description='The constraint families.'), parameterConstraints?: [ { allowedValues?: [ string ](name='AllowedValues', description='The valid values of the parameter.'), associationParameterNames?: [ string ](name='AssociationParameterNames', description='The names of the associated parameters.'), behavior?: string(name='Behavior', description='The behavior of the parameter. Valid values: * NoLimit: The value of this parameter is not limited. * NotSupport: The value of this parameter cannot be queried. * QueryError: The query failed. > If AllowedValues is not returned, Behavior and BehaviorReason are returned.', example='NoLimit'), behaviorReason?: string(name='BehaviorReason', description='The reason why the behavior of the parameter is returned.', example='none'), originalConstraints?: [ { allowedValues?: [ string ](name='AllowedValues', description='The valid values of the parameter.'), propertyName?: string(name='PropertyName', description='The property name.', example='lnch_Source'), resourceName?: string(name='ResourceName', description='The resource name.', example='i-8vb0smn1lf6g77md****'), resourceType?: string(name='ResourceType', description='The resource type.', example='serviceinstance'), } ](name='OriginalConstraints', description='The original constraint information.'), parameterKey?: string(name='ParameterKey', description='The name of the parameter.', example='PayType'), type?: string(name='Type', description='The type of the parameter.', example='String'), } ](name='ParameterConstraints', description='The parameters in the template.'), requestId?: string(name='RequestId', description='The request ID.', example='C81C0732-DEBC-559C-B563-7EB2BEB21088'), } model GetServiceTemplateParameterConstraintsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetServiceTemplateParameterConstraintsResponseBody(name='body'), } /** * @summary Queries the valid values of parameters in a Resource Orchestration Service (ROS) template. * * @param request GetServiceTemplateParameterConstraintsRequest * @param runtime runtime options for this request RuntimeOptions * @return GetServiceTemplateParameterConstraintsResponse */ async function getServiceTemplateParameterConstraintsWithOptions(request: GetServiceTemplateParameterConstraintsRequest, runtime: Util.RuntimeOptions): GetServiceTemplateParameterConstraintsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.deployRegionId)) { query['DeployRegionId'] = request.deployRegionId; } if (!Util.isUnset(request.enablePrivateVpcConnection)) { query['EnablePrivateVpcConnection'] = request.enablePrivateVpcConnection; } if (!Util.isUnset(request.parameters)) { query['Parameters'] = request.parameters; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.serviceInstanceId)) { query['ServiceInstanceId'] = request.serviceInstanceId; } if (!Util.isUnset(request.serviceVersion)) { query['ServiceVersion'] = request.serviceVersion; } if (!Util.isUnset(request.templateName)) { query['TemplateName'] = request.templateName; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'GetServiceTemplateParameterConstraints', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Queries the valid values of parameters in a Resource Orchestration Service (ROS) template. * * @param request GetServiceTemplateParameterConstraintsRequest * @return GetServiceTemplateParameterConstraintsResponse */ async function getServiceTemplateParameterConstraints(request: GetServiceTemplateParameterConstraintsRequest): GetServiceTemplateParameterConstraintsResponse { var runtime = new Util.RuntimeOptions{}; return getServiceTemplateParameterConstraintsWithOptions(request, runtime); } model GetServiceTestTaskRequest { regionId?: string(name='RegionId', description='The region ID.', example='cn-hangzhou'), taskId?: string(name='TaskId', description='The task ID.', example='stt-xxxx'), } model GetServiceTestTaskResponseBody = { executionDetails?: [ { caseName?: string(name='CaseName', description='The service test case name.', example='case1'), executionReport?: string(name='ExecutionReport', description='The execution report', example='----------------------------------------------------------------------------- Region: cn-qingdao StackName: iact3-default-cn-qingd StackId: 009d2991-f494-d *****************************************************************************'), status?: string(name='Status', description='The sub task status.', example='Runing'), subTaskId?: string(name='SubTaskId', description='The sub task id.', example='stt-xxxx'), } ](name='ExecutionDetails', description='The execution details.'), requestId?: string(name='RequestId', description='Id of the request', example='A361BA9E-xxxx-xxxx-xxxx-C26E5180456E'), status?: string(name='Status', description='The status of the service test task. Valid values: * Running * Success * Failure', example='Running'), taskName?: string(name='TaskName', description='The task name.', example='nametest'), taskRegionId?: string(name='TaskRegionId', description='The task execution region.', example='cn-beijing'), } model GetServiceTestTaskResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetServiceTestTaskResponseBody(name='body'), } /** * @summary 获取服务测试任务中Cases执行情况 * * @param request GetServiceTestTaskRequest * @param runtime runtime options for this request RuntimeOptions * @return GetServiceTestTaskResponse */ async function getServiceTestTaskWithOptions(request: GetServiceTestTaskRequest, runtime: Util.RuntimeOptions): GetServiceTestTaskResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.taskId)) { query['TaskId'] = request.taskId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'GetServiceTestTask', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary 获取服务测试任务中Cases执行情况 * * @param request GetServiceTestTaskRequest * @return GetServiceTestTaskResponse */ async function getServiceTestTask(request: GetServiceTestTaskRequest): GetServiceTestTaskResponse { var runtime = new Util.RuntimeOptions{}; return getServiceTestTaskWithOptions(request, runtime); } model GetSupplierInformationRequest { regionId?: string(name='RegionId', description='The region ID. This parameter is required.', example='cn-hangzhou'), } model GetSupplierInformationResponseBody = { acrNamespace?: string(name='AcrNamespace', description='Acr container namespace', example='computenest'), deliverySettings?: { ossBucketName?: string(name='OssBucketName', description='The name of the OSS bucket.', example='mybucket'), ossEnabled?: boolean(name='OssEnabled', description='Indicates whether screencast delivery to Object Storage Service (OSS) is enabled. Valid values: * true * false', example='true'), ossExpirationDays?: long(name='OssExpirationDays', description='The number of days for which the screencasts are saved.', example='7'), ossPath?: string(name='OssPath', description='The OSS path.', example='path1/path2/'), }(name='DeliverySettings', description='The delivery settings.'), enableReseller?: boolean(name='EnableReseller', description='Whether to enable reseller', example='true'), operationIp?: string(name='OperationIp', description='The Ip of the operation.', example='10.xxx.xxx.xxx/101'), operationMfaPresent?: boolean(name='OperationMfaPresent', description='The MFA of the operation.', example='true'), requestId?: string(name='RequestId', description='The request ID.', example='51945B04-6AA6-410D-93BA-236E0248B104'), supplierDesc?: string(name='SupplierDesc', description='The description of service provider.', example='Test supplier'), supplierLogo?: string(name='SupplierLogo', description='The Logo of service provider.', example='http://example.aliyundoc.com/cover/34DB-4F4C-9373-003AA060****.png'), supplierName?: string(name='SupplierName', description='The name of the service provider.', example='Alibaba Cloud'), supplierUrl?: string(name='SupplierUrl', description='The URL of the service provider.', example='http://www.xxx.xxx.cn'), supportContacts?: [ { type?: string(name='Type', description='The type of contact information.', example='Email'), value?: string(name='Value', description='The value of contact information.', example='supplier@example.com'), } ](name='SupportContacts', description='Contact information of the service provider'), } model GetSupplierInformationResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetSupplierInformationResponseBody(name='body'), } /** * @summary 获取服务商信息 * * @param request GetSupplierInformationRequest * @param runtime runtime options for this request RuntimeOptions * @return GetSupplierInformationResponse */ async function getSupplierInformationWithOptions(request: GetSupplierInformationRequest, runtime: Util.RuntimeOptions): GetSupplierInformationResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'GetSupplierInformation', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary 获取服务商信息 * * @param request GetSupplierInformationRequest * @return GetSupplierInformationResponse */ async function getSupplierInformation(request: GetSupplierInformationRequest): GetSupplierInformationResponse { var runtime = new Util.RuntimeOptions{}; return getSupplierInformationWithOptions(request, runtime); } model GetUploadCredentialsRequest { fileName?: string(name='FileName', description='The file name to upload. This parameter is required.', example='template.yaml'), visibility?: string(name='Visibility', description='Specifies whether the file is publicly accessible. Valid values: **public** or **private**. The default value is **private**.', example='public'), } model GetUploadCredentialsResponseBody = { code?: string(name='Code', description='The response code.', example='200'), data?: { accessKeyId?: string(name='AccessKeyId', description='The AccessKey ID.', example='STS.NUCe19W1FKaHAYAhe********'), accessKeySecret?: string(name='AccessKeySecret', description='The AccessKey secret.', example='8LQGp59mY23pcXeTdcvSA1cUQZBeD92sFrXi********'), bucketName?: string(name='BucketName', description='The bucket name.', example='service-info-private'), expireDate?: string(name='ExpireDate', description='The time when the AccessKey pair expires.', example='2023-05-18T12:27:59Z'), key?: string(name='Key', description='The name of the key.', example='221514575922756034/cn-hangzhou/d57c62fbd508xxxxxxxx.json'), regionId?: string(name='RegionId', description='The region ID.', example='cn-hangzhou'), securityToken?: string(name='SecurityToken', description='The security token.', example='CAISzQN1q6Ft5B2yfSjIr5b2LouNuu5n/KOjQ3/wjGUHYdlagYGdmzz2IH1Le3NrBO8esfgymGFU6v8dlo1dYLQeHhadQI5cs80HtFqLSNaE65LswPlZ2M2ISETPJzfV9pCK'), }(name='Data', description='The response parameters.'), httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'), message?: string(name='Message', description='The message returned.', example='Success.'), requestId?: string(name='RequestId', description='The request ID.', example='FCC3321E-D518-1BC4-861E-588E9D4DAFB7'), success?: boolean(name='Success', description='Indicates whether the request was successful. A value of true indicates the request was successful. A value of false indicates the request failed.', example='true'), } model GetUploadCredentialsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetUploadCredentialsResponseBody(name='body'), } /** * @summary Obtain the AccessKey pair of uploaded files. * * @param request GetUploadCredentialsRequest * @param runtime runtime options for this request RuntimeOptions * @return GetUploadCredentialsResponse */ async function getUploadCredentialsWithOptions(request: GetUploadCredentialsRequest, runtime: Util.RuntimeOptions): GetUploadCredentialsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.fileName)) { query['FileName'] = request.fileName; } if (!Util.isUnset(request.visibility)) { query['Visibility'] = request.visibility; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'GetUploadCredentials', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Obtain the AccessKey pair of uploaded files. * * @param request GetUploadCredentialsRequest * @return GetUploadCredentialsResponse */ async function getUploadCredentials(request: GetUploadCredentialsRequest): GetUploadCredentialsResponse { var runtime = new Util.RuntimeOptions{}; return getUploadCredentialsWithOptions(request, runtime); } model LaunchServiceRequest { categories?: [ string ](name='Categories', description='The categories of the service.'), clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.', example='10CM943JP0EN9D51H'), recommend?: boolean(name='Recommend', description='Whether to set the recommended service publishing to the service directory.', example='false'), regionId?: string(name='RegionId', description='The region ID. This parameter is required.', example='cn-hangzhou'), serviceId?: string(name='ServiceId', description='The service ID. This parameter is required.', example='service-0e6fca6a51a544xxxxxx'), serviceVersion?: string(name='ServiceVersion', description='The service version. This parameter is required.', example='1.0'), } model LaunchServiceResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='4DB0F536-B3BE-4F0D-BD29-E83FB56D550C'), serviceLaunchResultType?: string(name='ServiceLaunchResultType', description='The mode of the service online. Valid Type - PublishNewVersion: Launch new version - PublishOfflineVersion: The offline version is online again. - UpdateLatestVersion: Update the latest version online', example='PublishNewVersion'), version?: string(name='Version', description='The service version.', example='1.0'), } model LaunchServiceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: LaunchServiceResponseBody(name='body'), } /** * @summary 上线服务 * * @param request LaunchServiceRequest * @param runtime runtime options for this request RuntimeOptions * @return LaunchServiceResponse */ async function launchServiceWithOptions(request: LaunchServiceRequest, runtime: Util.RuntimeOptions): LaunchServiceResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.categories)) { query['Categories'] = request.categories; } if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.recommend)) { query['Recommend'] = request.recommend; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.serviceVersion)) { query['ServiceVersion'] = request.serviceVersion; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'LaunchService', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary 上线服务 * * @param request LaunchServiceRequest * @return LaunchServiceResponse */ async function launchService(request: LaunchServiceRequest): LaunchServiceResponse { var runtime = new Util.RuntimeOptions{}; return launchServiceWithOptions(request, runtime); } model ListAcrImageRepositoriesRequest { artifactType?: string(name='ArtifactType', description='The type of the artifact. Default value: AcrImage. Valid values: * HelmChart: Helm chart image. * AcrImage: container image.', example='AcrImage'), maxResults?: int32(name='MaxResults', description='The number of entries per page. Valid values: 1 to 100. Default value: 20.', example='20'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results.', example='AAAAAWns8w4MmhzeptXVRG0PUEU='), repoName?: string(name='RepoName', description='The name of the image repository.', example='wordpress'), } model ListAcrImageRepositoriesResponseBody = { maxResults?: int32(name='MaxResults', description='The number of entries per page. Valid values: 1 to 100. Default value: 20.', example='20'), nextToken?: string(name='NextToken', description='A pagination token.', example='AAAAAfu+XtuBE55iRLHEYYuojI4='), repositories?: [ { createTime?: string(name='CreateTime', description='The time when the image was created.', example='2021-05-20T00:00:00Z'), modifiedTime?: string(name='ModifiedTime', description='The time when the image was modified.', example='2021-05-20T00:00:00Z'), namespace?: string(name='Namespace', description='The namespace of the repository', example='computenest'), repoId?: string(name='RepoId', description='The image repo ID.', example='crr-3gqhkza0wbxxxxxx'), repoName?: string(name='RepoName', description='The image repo name.', example='wordpress'), repoType?: string(name='RepoType', description='The type of the repository. Valid values: * `Private`: a private repository * `Public`: a public repository', example='Private'), } ](name='Repositories', description='The images.'), requestId?: string(name='RequestId', description='The request ID.', example='C4A145D8-6F6C-532A-9001-9730CDA27578'), totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='4'), } model ListAcrImageRepositoriesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListAcrImageRepositoriesResponseBody(name='body'), } /** * @summary Queries a list of images uploaded to Container Registry. * * @param request ListAcrImageRepositoriesRequest * @param runtime runtime options for this request RuntimeOptions * @return ListAcrImageRepositoriesResponse */ async function listAcrImageRepositoriesWithOptions(request: ListAcrImageRepositoriesRequest, runtime: Util.RuntimeOptions): ListAcrImageRepositoriesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.artifactType)) { query['ArtifactType'] = request.artifactType; } if (!Util.isUnset(request.maxResults)) { query['MaxResults'] = request.maxResults; } if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.repoName)) { query['RepoName'] = request.repoName; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListAcrImageRepositories', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Queries a list of images uploaded to Container Registry. * * @param request ListAcrImageRepositoriesRequest * @return ListAcrImageRepositoriesResponse */ async function listAcrImageRepositories(request: ListAcrImageRepositoriesRequest): ListAcrImageRepositoriesResponse { var runtime = new Util.RuntimeOptions{}; return listAcrImageRepositoriesWithOptions(request, runtime); } model ListAcrImageTagsRequest { artifactType?: string(name='ArtifactType', description='The type of the deployment package. Default value: AcrImage. Valid values: * HelmChart: Helm chart image. * AcrImage: container image.', example='AcrImage'), maxResults?: int32(name='MaxResults', description='The number of entries per page. Valid values: 1 to 100. Default value: 20.', example='20'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results.', example='AAAAAW8kZY+u1sYOaYf5JmgmDQQ='), repoId?: string(name='RepoId', description='The image ID.', example='crr-3gqhkza0wbxxxxxx'), } model ListAcrImageTagsResponseBody = { images?: [ { createTime?: string(name='CreateTime', description='The time when the image was created.', example='2021-05-20T00:00:00Z'), imageSize?: string(name='ImageSize', description='The image size. Unit: bytes.', example='188394616'), modifiedTime?: string(name='ModifiedTime', description='The time when the image was modified.', example='2021-05-20T00:00:00Z'), tag?: string(name='Tag', description='The image version.', example='5.7.2'), } ](name='Images', description='The list of images.'), maxResults?: int32(name='MaxResults', description='The number of entries per page. Valid values: 1 to 100. Default value: 20.', example='20'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results.', example='ey14..'), requestId?: string(name='RequestId', description='The request ID.', example='FEF343B9-1A15-5789-BE88-7B36190F5BF6'), totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='1'), } model ListAcrImageTagsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListAcrImageTagsResponseBody(name='body'), } /** * @summary Queries the versions of images that are uploaded to the image repository. * * @param request ListAcrImageTagsRequest * @param runtime runtime options for this request RuntimeOptions * @return ListAcrImageTagsResponse */ async function listAcrImageTagsWithOptions(request: ListAcrImageTagsRequest, runtime: Util.RuntimeOptions): ListAcrImageTagsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.artifactType)) { query['ArtifactType'] = request.artifactType; } if (!Util.isUnset(request.maxResults)) { query['MaxResults'] = request.maxResults; } if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.repoId)) { query['RepoId'] = request.repoId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListAcrImageTags', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Queries the versions of images that are uploaded to the image repository. * * @param request ListAcrImageTagsRequest * @return ListAcrImageTagsResponse */ async function listAcrImageTags(request: ListAcrImageTagsRequest): ListAcrImageTagsResponse { var runtime = new Util.RuntimeOptions{}; return listAcrImageTagsWithOptions(request, runtime); } model ListArtifactRisksRequest { artifactId?: string(name='ArtifactId', description='Artifact ID.', example='artifact-3fd95cdfdf0d4b1fa00c'), artifactVersion?: string(name='ArtifactVersion', description='Artifact version.', example='1'), } model ListArtifactRisksResponseBody = { artifactRiskList?: [ { cveNos?: string(name='CveNos', description='CVE numbers', example='CVE-2023-4911'), extendInfo?: string(name='ExtendInfo', description='Extended information, in JSON format, to be parsed according to the risk category', example='{ "feature": "ntpdate", "version": "4.2.6", "cveLocation": "/usr/lib" }'), level?: string(name='Level', description='Risk level: - high represents high', example='high'), riskName?: string(name='RiskName', description='Risk name.', example='USN-3686-1: file vulnerabilities'), riskType?: string(name='RiskType', description='Risk type. Values: - AcrCve Container image system vulnerability - AcrSca Container image application vulnerability - EcsVulnerability ECS image vulnerability information - EcsAlarm ECS image security alarm - EcsBaseline ECS image baseline check', example='AcrCve'), riskTypeName?: string(name='RiskTypeName', description='Risk Type name', example='Container System Vulner'), solution?: string(name='Solution', description='Solution for the risk item.', example='apt-get update && apt-get install ntpdate --only-upgrade'), } ](name='ArtifactRiskList', description='List of artifact risks'), requestId?: string(name='RequestId', description='Request ID.', example='52919DB1-03A0-55F5-BDD4-DB6DEBB8267A'), } model ListArtifactRisksResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListArtifactRisksResponseBody(name='body'), } /** * @summary Get the list of artifact security risks * * @param request ListArtifactRisksRequest * @param runtime runtime options for this request RuntimeOptions * @return ListArtifactRisksResponse */ async function listArtifactRisksWithOptions(request: ListArtifactRisksRequest, runtime: Util.RuntimeOptions): ListArtifactRisksResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.artifactId)) { query['ArtifactId'] = request.artifactId; } if (!Util.isUnset(request.artifactVersion)) { query['ArtifactVersion'] = request.artifactVersion; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListArtifactRisks', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Get the list of artifact security risks * * @param request ListArtifactRisksRequest * @return ListArtifactRisksResponse */ async function listArtifactRisks(request: ListArtifactRisksRequest): ListArtifactRisksResponse { var runtime = new Util.RuntimeOptions{}; return listArtifactRisksWithOptions(request, runtime); } model ListArtifactVersionsRequest { artifactId?: string(name='ArtifactId', description='The ID of the deployment package. This parameter is required.', example='artifact-eea08d1e2d3a43aexxxx'), filters?: [ { name?: string(name='Name', description='The parameter name of the filter. You can specify one or more filters. Valid values: **Status**:The artifact status', example='Status'), values?: [ string ](name='Values', description='The parameter values of the filter.'), } ](name='Filters', description='The filter.'), maxResults?: int32(name='MaxResults', description='The number of entries per page. Valid values: 1 to 100. Default value: 20.', example='20'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.', example='AAAAAc3HCuYhJi/wvpk4xOr0VLbfVwapgMwCN1wYzPVzLbItEdB0uWSY7AGnM3qCgm/YnjuEfwSnMwiMkcUoI0hRQzE='), } model ListArtifactVersionsShrinkRequest { artifactId?: string(name='ArtifactId', description='The ID of the deployment package. This parameter is required.', example='artifact-eea08d1e2d3a43aexxxx'), filtersShrink?: string(name='Filters', description='The filter.'), maxResults?: int32(name='MaxResults', description='The number of entries per page. Valid values: 1 to 100. Default value: 20.', example='20'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.', example='AAAAAc3HCuYhJi/wvpk4xOr0VLbfVwapgMwCN1wYzPVzLbItEdB0uWSY7AGnM3qCgm/YnjuEfwSnMwiMkcUoI0hRQzE='), } model ListArtifactVersionsResponseBody = { artifacts?: [ { artifactBuildProperty?: string(name='ArtifactBuildProperty', description='The build properties of the artifact, utilized for hosting and building the deployment package.', example='"{\\\\"RegionId\\\\":\\\\"xxx\\\\", \\\\"SourceImageId\\\\":\\\\"xxx\\\\", \\\\"\\\\":\\\\"xxx\\\\", \\\\"CommandType\\\\":\\\\"xxx\\\\", \\\\"CommandContent\\\\":\\\\"xxx\\\\"}"'), artifactBuildType?: string(name='ArtifactBuildType', description='The type of the deployment package to be built.', example='Dockerfile'), artifactId?: string(name='ArtifactId', description='The ID of the deployment package.', example='artifact-eea08d1e2d3a43aexxxx'), artifactProperty?: string(name='ArtifactProperty', description='The properties of the deployment package.', example='{\\\\"CommodityCode\\\\":\\\\"cmjj0005xxxx\\\\",\\\\"CommodityVersion\\\\":\\\\"V2022xxxx\\\\"}'), artifactType?: string(name='ArtifactType', description='The type of the deployment package.', example='EcsImage'), artifactVersion?: string(name='ArtifactVersion', description='The version of the deployment package.', example='2'), gmtCreate?: string(name='GmtCreate', description='The time when the certificate was created.', example='2022-10-20T02:19:53Z'), gmtModified?: string(name='GmtModified', description='The time when the deployment package was modified.', example='2022-10-20T02:19:55Z'), imageDelivery?: map[string]string(name='ImageDelivery', description='The distribution result of the image.'), progress?: string(name='Progress', description='The distribution progress of the deployment package.', example='100'), resultFile?: string(name='ResultFile', description='The result file of the security scan.', example='https://compute-nest-security-audit-bucket-ap-southeast-1.oss-ap-southeast-1.aliyuncs.com/51416747xxxx/xxxx'), securityAuditResult?: string(name='SecurityAuditResult', description='The result of the security scan. Valid values: * Normal: No risks exist on the deployment package. * AtRisk: Risks exist on the deployment package. * Processing: The deployment package is being scanned.', example='Normal'), status?: string(name='Status', description='The status of the deployment package. Valid values: * Created: The deployment package is created. * Scanning: The deployment package is being scanned. * ScanFailed: The deployment package failed to be scanned. * Delivering: The deployment package is being distributed. * Available: The deployment package is available. * Deleted: The deployment package is deleted.', example='Available'), statusDetail?: string(name='StatusDetail', description='The description of the deployment package.', example='"/usr/local/share/aliyun-assist/work/script/t-hz04zm90y6og0sg.sh: line 1: pip: command not found"'), supportRegionIds?: string(name='SupportRegionIds', description='The ID of the region that supports the deployment package.', example='[ "cn-beijing", "cn-hangzhou", "cn-shanghai" ]'), versionName?: string(name='VersionName', description='The version name of the deployment package.', example='v1'), } ](name='Artifacts', description='The version information about the deployment package.'), maxResults?: int32(name='MaxResults', description='The number of entries per page. Valid values: 1 to 100. Default value: 20.', example='20'), nextToken?: string(name='NextToken', description='The returned value of NextToken is a pagination token, which can be used in the next request to retrieve a new page of results.', example='AAAAAc3HCuYhJi/wvpk4xOr0VLbfVwapgMwCN1wYzPVzLbItEdB0uWSY7AGnM3qCgm/YnjuEfwSnMwiMkcUoI0hRQzE='), requestId?: string(name='RequestId', description='The request ID.', example='46577928-3162-15A6-9084-69820EB9xxxx'), totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='2'), } model ListArtifactVersionsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListArtifactVersionsResponseBody(name='body'), } /** * @summary Queries the version information about a deployment package. * * @param tmpReq ListArtifactVersionsRequest * @param runtime runtime options for this request RuntimeOptions * @return ListArtifactVersionsResponse */ async function listArtifactVersionsWithOptions(tmpReq: ListArtifactVersionsRequest, runtime: Util.RuntimeOptions): ListArtifactVersionsResponse { Util.validateModel(tmpReq); var request = new ListArtifactVersionsShrinkRequest{}; OpenApiUtil.convert(tmpReq, request); if (!Util.isUnset(tmpReq.filters)) { request.filtersShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.filters, 'Filters', 'json'); } var query = {}; if (!Util.isUnset(request.artifactId)) { query['ArtifactId'] = request.artifactId; } if (!Util.isUnset(request.filtersShrink)) { query['Filters'] = request.filtersShrink; } if (!Util.isUnset(request.maxResults)) { query['MaxResults'] = request.maxResults; } if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListArtifactVersions', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Queries the version information about a deployment package. * * @param request ListArtifactVersionsRequest * @return ListArtifactVersionsResponse */ async function listArtifactVersions(request: ListArtifactVersionsRequest): ListArtifactVersionsResponse { var runtime = new Util.RuntimeOptions{}; return listArtifactVersionsWithOptions(request, runtime); } model ListArtifactsRequest { filter?: [ { name?: string(name='Name', description='The parameter name of the filter. You can specify one or more filters. Valid values: * *Name*: The name of the deployment package. Fuzzy match is used. * ArtifactId: The ID of the deployment package. * ArtifactType: The type of the deployment package.', example='ArtifactType'), values?: [ string ](name='Values', description='The parameter values of the filter.'), } ](name='Filter', description='The filter.'), maxResults?: int32(name='MaxResults', description='The number of entries per page. Valid values: 1 to 100. Default value: 20.', example='20'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.', example='AAAAAc3HCuYhJi/wvpk4xOr0VLbfVwapgMwCN1wYzPVzLbItEdB0uWSY7AGnM3qCgm/YnjuEfwSnMwiMkcUoI0hRQzE='), resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-aek25yfxxxxxxxx'), tag?: [ { key?: string(name='Key', description='The tag key.', example='key1'), value?: string(name='Value', description='The tag value.', example='value1'), } ](name='Tag', description='The tags.'), } model ListArtifactsResponseBody = { artifacts?: [ { artifactBuildProperty?: string(name='ArtifactBuildProperty', description='The build properties of the artifact, utilized for hosting and building the deployment package.', example='{\\\\"CodeRepo\\\\":{\\\\"Owner\\\\":\\\\"wenle\\\\",\\\\"Platform\\\\":\\\\"github\\\\",\\\\"Branch\\\\":\\\\"main\\\\",\\\\"RepoName\\\\":\\\\"aliyun-computenest/java-springboot-demo\\\\"}}'), artifactId?: string(name='ArtifactId', description='The ID of the deployment package.', example='artifact-eea08d1e2d3a43aexxxx'), artifactType?: string(name='ArtifactType', description='The type of the deployment package.', example='EcsImage'), description?: string(name='Description', description='The description of the deployment package.', example='Description'), gmtModified?: string(name='GmtModified', description='The time when the deployment package was modified.', example='2022-10-20T02:19:55Z'), maxVersion?: string(name='MaxVersion', description='The latest version of the deployment package.', example='2'), name?: string(name='Name', description='The name of the deployment package.', example='Name'), resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-aek25rexxxxxxxx'), status?: string(name='Status', description='The status of the deployment package. Valid values: * Created: The deployment package is created. * Scanning: The deployment package is being scanned. * ScanFailed: The deployment package failed to be scanned. * Delivering: The deployment package is being distributed. * Available: The deployment package is available. * Deleted: The deployment package is deleted.', example='Created'), tags?: [ { key?: string(name='Key', description='The tag key.', example='key1'), value?: string(name='Value', description='The tag value.', example='value1'), } ](name='Tags', description='The tags.'), } ](name='Artifacts', description='The information about deployment packages.'), maxResults?: int32(name='MaxResults', description='The number of entries per page. Valid values: 1 to 100. Default value: 20.', example='20'), nextToken?: string(name='NextToken', description='The returned value of NextToken is a pagination token, which can be used in the next request to retrieve a new page of results.', example='AAAAAc3HCuYhJi/wvpk4xOr0VLbfVwapgMwCN1wYzPVzLbItEdB0uWSY7AGnM3qCgm/YnjuEfwSnMwiMkcUoI0hRQzE='), requestId?: string(name='RequestId', description='The request ID.', example='46577928-3162-15A6-9084-69820EB9xxxx'), totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='2'), } model ListArtifactsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListArtifactsResponseBody(name='body'), } /** * @summary Queries a list of deployment packages. * * @param request ListArtifactsRequest * @param runtime runtime options for this request RuntimeOptions * @return ListArtifactsResponse */ async function listArtifactsWithOptions(request: ListArtifactsRequest, runtime: Util.RuntimeOptions): ListArtifactsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.filter)) { query['Filter'] = request.filter; } if (!Util.isUnset(request.maxResults)) { query['MaxResults'] = request.maxResults; } if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.resourceGroupId)) { query['ResourceGroupId'] = request.resourceGroupId; } if (!Util.isUnset(request.tag)) { query['Tag'] = request.tag; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListArtifacts', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Queries a list of deployment packages. * * @param request ListArtifactsRequest * @return ListArtifactsResponse */ async function listArtifacts(request: ListArtifactsRequest): ListArtifactsResponse { var runtime = new Util.RuntimeOptions{}; return listArtifactsWithOptions(request, runtime); } model ListResellersRequest { filter?: [ { name?: string(name='Name', description='The parameter name of the filter. You can specify one or more parameter names to query services. Valid values: * ResellerUid: the uid of the distributor. * Name: the name of the distributor.', example='Name'), value?: [ string ](name='Value', description='Filter value array.'), } ](name='Filter', description='The filters.'), maxResults?: int32(name='MaxResults', description='The number of entries per page. Valid values: 1 to 100. Default value: 20.', example='20'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.', example='AAAAAWVmrOoWHbw/80lX0TWxe/s='), regionId?: string(name='RegionId', description='The region ID. This parameter is required.', example='cn-hangzhou'), } model ListResellersResponseBody = { maxResults?: int32(name='MaxResults', description='The number of entries per page. Valid values: 1 to 100. Default value: 20.', example='20'), nextToken?: string(name='NextToken', description='A pagination token.', example='AAAAAW8kZY+u1sYOaYf5JmgmDQQ='), requestId?: string(name='RequestId', description='The request ID.', example='A361BA9E-xxxx-xxxx-xxxx-C26E5180456E'), supplierInformation?: [ { supplierDesc?: string(name='SupplierDesc', description='The description of distributor.', example='It is a XXXX company'), supplierLogo?: string(name='SupplierLogo', description='The Logo of distributor', example='https://service-info-public.oss-cn-hangzhou.aliyuncs.com/31978070/service-image/d5c3b585-ff6b-4e4e-8885-xxxx.png'), supplierName?: string(name='SupplierName', description='The name of the distributor', example='Distributor A'), supplierUid?: long(name='SupplierUid', description='The Alibaba Cloud account ID of the distributor.', example='152xxxxxxxxxxx'), supplierUrl?: string(name='SupplierUrl', description='The URL of the distributor.', example='http://www.aliyun.com'), } ](name='SupplierInformation', description='distributor informations'), totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='4'), } model ListResellersResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListResellersResponseBody(name='body'), } /** * @summary Paginated query of distributor information list * * @param request ListResellersRequest * @param runtime runtime options for this request RuntimeOptions * @return ListResellersResponse */ async function listResellersWithOptions(request: ListResellersRequest, runtime: Util.RuntimeOptions): ListResellersResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.filter)) { query['Filter'] = request.filter; } if (!Util.isUnset(request.maxResults)) { query['MaxResults'] = request.maxResults; } if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListResellers', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Paginated query of distributor information list * * @param request ListResellersRequest * @return ListResellersResponse */ async function listResellers(request: ListResellersRequest): ListResellersResponse { var runtime = new Util.RuntimeOptions{}; return listResellersWithOptions(request, runtime); } model ListServiceInstanceBillRequest { billingCycle?: string(name='BillingCycle', description='The billing cycle. Format: YYYY-MM. This parameter is required.', example='2025-03'), billingDate?: string(name='BillingDate', description='The billing date. This parameter is required only if the **Granularity** parameter is set to DAILY. Format: YYYY-MM-DD.', example='2024-12-05'), granularity?: string(name='Granularity', description='The granularity at which bills are queried. Valid values: * MONTHLY: queries bills by month. The data queried is consistent with the data that is displayed for the specified billing cycle on the Billing Details tab of the Bill Details page in User Center. * DAILY: queries bills by day. The data queried is consistent with the data that is displayed for the specified day on the Billing Details tab of the Bill Details page in User Center. You must set the **BillingDate** parameter before you can set the Granularity parameter to DAILY.', example='MONTHLY'), maxResults?: int32(name='MaxResults', description='The maximum number of entries per page. Valid values: 1 to 100. Default value: 20.', example='20'), nextToken?: string(name='NextToken', description='A pagination token. It can be used in the next request to retrieve a new page of results. If NextToken is empty, no next page exists.', example='AAAAAfu+XtuBE55iRLHEYYuojI4='), serviceId?: string(name='ServiceId', description='The service ID.', example='service-6121296da4f44e469519'), serviceInstanceId?: string(name='ServiceInstanceId', description='The ID of the service instance.', example='si-0d0d7bc9accc4e2e8a8f'), serviceVersion?: string(name='ServiceVersion', description='The service version.', example='1'), } model ListServiceInstanceBillResponseBody = { item?: [ { billingCycle?: string(name='BillingCycle', description='The billing cycle. Format: YYYY-MM.', example='2024-12'), billingDate?: string(name='BillingDate', description='The billing date. This parameter is required only if the **Granularity** parameter is set to DAILY. Format: YYYY-MM-DD.', example='2024-12-05'), billingItem?: string(name='BillingItem', description='The billable item.', example='Bandwidth'), billingItemCode?: string(name='BillingItemCode', description='The code of the billable item.', example='disk'), currency?: string(name='Currency', description='The currency unit. * China site: **CNY**. * International site: **USD**.', example='CNY'), deductedByResourcePackage?: string(name='DeductedByResourcePackage', description='The amount deducted with resource plans.', example='0'), instanceID?: string(name='InstanceID', description='The ID of the instance.', example='rm-wz9k051l23j3o3xa9'), invoiceDiscount?: string(name='InvoiceDiscount', description='The discount amount.', example='0'), listPrice?: string(name='ListPrice', description='The unit price.', example='0.12'), listPriceUnit?: string(name='ListPriceUnit', description='The unit of the unit price.', example='CNY/GB'), pretaxAmount?: string(name='PretaxAmount', description='The pretax amount.', example='0'), pretaxGrossAmount?: string(name='PretaxGrossAmount', description='The pretax gross amount.', example='0'), productCode?: string(name='ProductCode', description='The code of the service.', example='oss'), productDetail?: string(name='ProductDetail', description='The details of the service.', example='sls'), productName?: string(name='ProductName', description='The name of the cloud service or the name of the service-linked role with which the cloud service is associated.', example='oss'), serviceInstanceId?: string(name='ServiceInstanceId', description='Service instance ID.', example='si-bc5d6ac7022647d3a3bd'), splitBillingCycle?: string(name='SplitBillingCycle', description='The billing cycle in which the bill is split.', example='2021-06'), subscriptionType?: string(name='SubscriptionType', description='The billing method. Valid values: * Subscription: the subscription billing method. * PayAsYouGo: the pay-as-you-go billing method.', example='Subscription'), usage?: string(name='Usage', description='The amount of resource usage.', example='1'), usageUnit?: string(name='UsageUnit', description='The unit of usage.', example='GB'), } ](name='Item', description='The billing information of the backup schedule.'), maxResults?: int32(name='MaxResults', description='The number of entries per page. Valid values: 1 to 100. Default value: 20.', example='20'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.', example='AAAAAfu+XtuBE55iRLHEYYuojI4='), requestId?: string(name='RequestId', description='The request ID.', example='7B68C6D1-0C22-53F7-997C-F95D109C31AA'), totalCount?: long(name='TotalCount', description='The total number of entries returned.', example='65'), } model ListServiceInstanceBillResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListServiceInstanceBillResponseBody(name='body'), } /** * @summary 展示服务实例账单 * * @param request ListServiceInstanceBillRequest * @param runtime runtime options for this request RuntimeOptions * @return ListServiceInstanceBillResponse */ async function listServiceInstanceBillWithOptions(request: ListServiceInstanceBillRequest, runtime: Util.RuntimeOptions): ListServiceInstanceBillResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.billingCycle)) { query['BillingCycle'] = request.billingCycle; } if (!Util.isUnset(request.billingDate)) { query['BillingDate'] = request.billingDate; } if (!Util.isUnset(request.granularity)) { query['Granularity'] = request.granularity; } if (!Util.isUnset(request.maxResults)) { query['MaxResults'] = request.maxResults; } if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.serviceInstanceId)) { query['ServiceInstanceId'] = request.serviceInstanceId; } if (!Util.isUnset(request.serviceVersion)) { query['ServiceVersion'] = request.serviceVersion; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListServiceInstanceBill', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary 展示服务实例账单 * * @param request ListServiceInstanceBillRequest * @return ListServiceInstanceBillResponse */ async function listServiceInstanceBill(request: ListServiceInstanceBillRequest): ListServiceInstanceBillResponse { var runtime = new Util.RuntimeOptions{}; return listServiceInstanceBillWithOptions(request, runtime); } model ListServiceInstanceDeployDetailsRequest { cycleTimeZone?: string(name='CycleTimeZone', description='The time zone. Reference Format: "+08:00" Valid Range: "-12:59" to "+13:00"', example='+08:00'), cycleType?: string(name='CycleType', description='Determines the time period over which data is aggregated. If no aggregation dimension is specified, the query defaults to providing detailed, unaggregated results. Optional Values: - Year - Month - Day - All', example='Month'), dimension?: [ string ](name='Dimension', description='The dimension names. (Equivalent to SQL\\\\"s GROUP BY Clause) Optional Values: - UserId - ServiceId - ServiceVersion - ServiceInstanceId - DeploySucceeded - ErrorType - ErrorCode'), endTime?: string(name='EndTime', description='The end of the time range to query. The end time must be later than the start time. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC.', example='2024-12-31T16:00:00Z'), filter?: [ { name?: string(name='Name', description='Filter Value Names (Equivalent to SQL\\\\"s WHERE Clause) Available Options: - UserId - ServiceId - ServiceVersion - ServiceInstanceId - DeploySucceeded (Accepts True or False and case-insensitive) - ErrorType - ErrorCode', example='ServiceId'), value?: [ string ](name='Value', description='A value of the filter condition.'), } ](name='Filter', description='The filter.'), maxResults?: int32(name='MaxResults', description='The number of entries per page. Valid values: 1 to 100. Default value: 20.', example='20'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.', example='AAAAAZbOYA+x9UgM6xrgcMqFUjk='), regionId?: string(name='RegionId', description='The region ID. This parameter is required.', example='cn-hangzhou'), startTime?: string(name='StartTime', description='The beginning of the time range to query. Specify the time in the ISO 8601 standard in the *yyyy-MM-dd*T*HH:mm*Z format. The time must be in UTC.', example='2024-08-25T02:23:00Z'), } model ListServiceInstanceDeployDetailsResponseBody = { deployDetails?: [ { count?: string(name='Count', description='The total number of entries that meet the specified conditions.', example='4'), createTime?: string(name='CreateTime', description='The time when the service instance was created.', example='2024-04-10T01:58:20Z'), cycle?: string(name='Cycle', description='The period over which data is aggregated.', example='Month'), deploySucceeded?: string(name='DeploySucceeded', description='The indicates whether the deployment was successful.', example='False'), errorCode?: string(name='ErrorCode', description='The error code.', example='StackValidationFailed'), errorDetail?: string(name='ErrorDetail', description='The error description.', example='{code: StackValidationFailed, message: \\\\"Failed to continue create ROS stack 89e724e2-84e6-4517-a372-30a545ab4145: Resource [LinuxInstanceRunCommand]: i-wz91nfbh1fxtmfb0try4 are not running. Command invocation only support running instances. ErrorCode: StackValidationFailed\\\\", requestId: null}'), errorType?: string(name='ErrorType', description='The type of error that caused the deployment to fail.', example='ValidationError'), serviceId?: string(name='ServiceId', description='The service ID.', example='service-c751ed91f2074af39779'), serviceInstanceId?: string(name='ServiceInstanceId', description='The service instance ID.', example='si-273e8cee11d349e1803c'), serviceNameChn?: string(name='ServiceNameChn', description='The name of the service in Chinese.', example='测试服务(Test Service)'), serviceNameEng?: string(name='ServiceNameEng', description='The name of the service in English.', example='Test Service'), serviceType?: string(name='ServiceType', description='The type of service. Possible values: - private: Deployed under the user\\\\"s account. - managed: Hosted under the service provider\\\\"s account. - operation: Managed operation service.', example='private'), serviceVersion?: string(name='ServiceVersion', description='The service version.', example='42'), timestamp?: string(name='Timestamp', description='The timestamp when the response is returned.', example='1723946641994'), userId?: string(name='UserId', description='The aliuid of user.', example='1591457835436382'), } ](name='DeployDetails', description='The details of the service instance deployment.'), maxResults?: int32(name='MaxResults', description='The number of entries per page. Valid values: 1 to 100. Default value: 20.', example='20'), nextToken?: string(name='NextToken', description='A pagination token. It can be used in the next request to retrieve a new page of results. If NextToken is empty, no next page exists.', example='AAAAAW8kZY+u1sYOaYf5JmgmDQQ='), requestId?: string(name='RequestId', description='The request ID.', example='0036D82E-0624-5B37-B797-C460F4B02026'), totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='7'), } model ListServiceInstanceDeployDetailsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListServiceInstanceDeployDetailsResponseBody(name='body'), } /** * @summary 查询服务实例部署详情 * * @param request ListServiceInstanceDeployDetailsRequest * @param runtime runtime options for this request RuntimeOptions * @return ListServiceInstanceDeployDetailsResponse */ async function listServiceInstanceDeployDetailsWithOptions(request: ListServiceInstanceDeployDetailsRequest, runtime: Util.RuntimeOptions): ListServiceInstanceDeployDetailsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.cycleTimeZone)) { query['CycleTimeZone'] = request.cycleTimeZone; } if (!Util.isUnset(request.cycleType)) { query['CycleType'] = request.cycleType; } if (!Util.isUnset(request.dimension)) { query['Dimension'] = request.dimension; } if (!Util.isUnset(request.endTime)) { query['EndTime'] = request.endTime; } if (!Util.isUnset(request.filter)) { query['Filter'] = request.filter; } if (!Util.isUnset(request.maxResults)) { query['MaxResults'] = request.maxResults; } if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.startTime)) { query['StartTime'] = request.startTime; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListServiceInstanceDeployDetails', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary 查询服务实例部署详情 * * @param request ListServiceInstanceDeployDetailsRequest * @return ListServiceInstanceDeployDetailsResponse */ async function listServiceInstanceDeployDetails(request: ListServiceInstanceDeployDetailsRequest): ListServiceInstanceDeployDetailsResponse { var runtime = new Util.RuntimeOptions{}; return listServiceInstanceDeployDetailsWithOptions(request, runtime); } model ListServiceInstanceLogsRequest { filter?: [ { name?: string(name='Name', description='The parameter name of the filter. You can specify one or more filters. Valid values: * StartTime: the start time of the log event. * EndTime: the end time of the ActionTrail event. * EventName: the name of the ActionTrail event. * ResourceName: the name of the ActionTrail resource. * ApplicationGroupName: the name of the application group.', example='StartTime'), value?: [ string ](name='Value', description='A value of the filter condition.'), } ](name='Filter', description='The filters.'), logSource?: string(name='LogSource', description='The log source. When this field is empty, query logs with the source set to computeNest and ros. Valid values: * computeNest : logs of the deployment and upgrade of the service instance. * application: logs generated by the application. * actionTrail: logs generated by ActionTrail. * compliancePack: Logs originating from the compliance package. * ros: Logs originating from ROS. * meteringData:Logs originating from the pay-as-you-go model.', example='computeNest'), logstore?: string(name='Logstore', description='The name of the Logstore to which log entries are delivered. It needs to be provided only when LogSource is set to Application.', example='livelog'), maxResults?: int32(name='MaxResults', description='The maximum number of entries per page. Valid values: 1 to 100. Default value: 20.', example='20'), nextToken?: string(name='NextToken', description='A pagination token.', example='BBBAAfu+XtuBE55iRLHEYYuojI4='), regionId?: string(name='RegionId', description='The region ID. This parameter is required.', example='cn-hangzhou'), serviceInstanceId?: string(name='ServiceInstanceId', description='The ID of the service instance. This parameter is required.', example='si-70a3b15bb626435b****'), sortOrder?: string(name='SortOrder', description='Sort Order. Possible values: + Ascending: Ascending order + Descending (default value): Descending order', example='Ascending'), } model ListServiceInstanceLogsResponseBody = { maxResults?: int32(name='MaxResults', description='The number of items to return per page when paginating results. The maximum is 100, and the default is 20.', example='20'), nextToken?: string(name='NextToken', description='A pagination token.', example='AAAAAfu+XtuBE55iRLHEYYuojI4='), requestId?: string(name='RequestId', description='The request ID.', example='51945B04-6AA6-410D-93BA-236E0248B104'), serviceInstancesLogs?: [ { compliancePackType?: string(name='CompliancePackType', description='Compliance package risk types. This only applies when the source is CompliancePack. . For example, data security checks within a VPC, such as VpcDataRisk', example='VpcDataRisk'), complianceRuleName?: string(name='ComplianceRuleName', description='Specific risk rule names for the compliance package. This only applies when the source is CompliancePack. . For example, ECS instance migration out of VPC - ecs-move-out-vpc.', example='vpc-ecs-move-out-vpc'), content?: string(name='Content', description='The log content.', example='Start creating service instance'), logType?: string(name='LogType', description='The log type. Valid values: * serviceInstance: log generated by the service instance. * resource: log generated by ROS resources.', example='serviceInstance'), resourceId?: string(name='ResourceId', description='The resource ID.', example='si-5c6525c0589545c3****'), resourceType?: string(name='ResourceType', description='The Resouce Type.', example='ROS.Stack'), source?: string(name='Source', description='The log source. Valid values: * computeNest : logs of the deployment and upgrade of the service instance. * application: logs generated by the application. * actionTrail: logs generated by ActionTrail. * compliancePack: Logs originating from the compliance package. * ros: Logs originating from ROS. * meteringData:Logs originating from the pay-as-you-go model.', example='computeNest'), status?: string(name='Status', description='The deployment state of the service instance. Valid values: * Created * Deploying * DeployedFailed * Deployed * Upgrading * Deleting * Deleted * DeletedFailed', example='Deployed'), timestamp?: string(name='Timestamp', description='The timestamp of the service instance log.', example='2022-05-21T00:00:00Z'), } ](name='ServiceInstancesLogs', description='The logs of the service instance.'), } model ListServiceInstanceLogsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListServiceInstanceLogsResponseBody(name='body'), } /** * @summary “Query logs at various levels, including service instance application, instance, and resource.” * * @param request ListServiceInstanceLogsRequest * @param runtime runtime options for this request RuntimeOptions * @return ListServiceInstanceLogsResponse */ async function listServiceInstanceLogsWithOptions(request: ListServiceInstanceLogsRequest, runtime: Util.RuntimeOptions): ListServiceInstanceLogsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.filter)) { query['Filter'] = request.filter; } if (!Util.isUnset(request.logSource)) { query['LogSource'] = request.logSource; } if (!Util.isUnset(request.logstore)) { query['Logstore'] = request.logstore; } if (!Util.isUnset(request.maxResults)) { query['MaxResults'] = request.maxResults; } if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceInstanceId)) { query['ServiceInstanceId'] = request.serviceInstanceId; } if (!Util.isUnset(request.sortOrder)) { query['SortOrder'] = request.sortOrder; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListServiceInstanceLogs', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary “Query logs at various levels, including service instance application, instance, and resource.” * * @param request ListServiceInstanceLogsRequest * @return ListServiceInstanceLogsResponse */ async function listServiceInstanceLogs(request: ListServiceInstanceLogsRequest): ListServiceInstanceLogsResponse { var runtime = new Util.RuntimeOptions{}; return listServiceInstanceLogsWithOptions(request, runtime); } model ListServiceInstanceResourcesRequest { filters?: [ { name?: string(name='Name', description='Vaild values: - ExpireTimeStart - ExpireTimeEnd - PayType - ResourceARN', example='ResourceARN'), values?: [ string ](name='Values', description='A value of the filter condition.'), } ](name='Filters', description='The filter.'), maxResults?: int32(name='MaxResults', description='The maximum number of entries per page. Valid values: 1 to 100. Default value: 20.', example='20'), nextToken?: string(name='NextToken', description='A pagination token.', example='AAAAAc3HCuYhJi/wvpk4xOr0VLbAx7BkQzyYC+ONO+WudHGKEdB0uWSY7AGnM3qCgm/Ynge7zU6NWdbj0Tegyajyqyc='), regionId?: string(name='RegionId', description='The region ID where the service instance resides.', example='cn-hangzhou'), serviceInstanceId?: string(name='ServiceInstanceId', description='The ID of the service instance. This parameter is required.', example='si-d8a0cc2a1ee04dce****'), serviceInstanceResourceType?: string(name='ServiceInstanceResourceType', description='Service Instance resource type,include AliyunResource and ContainerResource.', example='AliyunResource'), tag?: [ { key?: string(name='Key', description='The tag key.', example='key1'), value?: string(name='Value', description='The tag value.', example='value1'), } ](name='Tag', description='The tags.'), } model ListServiceInstanceResourcesResponseBody = { maxResults?: int32(name='MaxResults', description='The number of entries per page. Valid values: 1 to 100. Default value: 20.', example='20'), nextToken?: string(name='NextToken', description='A pagination token.', example='AAAAAc3HCuYhJi/wvpk4xOr0VLbAx7BkQzyYC+ONO+WudHGKEdB0uWSY7AGnM3qCgm/Ynge7zU6NWdbj0Tegyajyqyc='), requestId?: string(name='RequestId', description='The request ID.', example='B288A0BE-D927-4888-B0F7-B35EF84B6E6F'), resources?: [ { createTime?: string(name='CreateTime', description='The time when the service instance was created.', example='2022-01-01T12:00:00'), expireTime?: string(name='ExpireTime', description='The time when the resource expires.', example='2022-03-01T12:00:00'), payType?: string(name='PayType', description='The billing method. Valid values: * Subscription * PayAsYouGo', example='Subscription'), productCode?: string(name='ProductCode', description='The code of the cloud service.', example='rds'), productType?: string(name='ProductType', description='The type of the cloud service.', example='RDS'), renewStatus?: string(name='RenewStatus', description='The renewal state. Valid values: * AutoRenewal * ManualRenewal * NotRenewal', example='AutoRenewal'), renewalPeriod?: int32(name='RenewalPeriod', description='The renewal period.', example='1'), renewalPeriodUnit?: string(name='RenewalPeriodUnit', description='The unit of the renewal period. Valid values: * Month * Year', example='Month'), resourceARN?: string(name='ResourceARN', description='The ARN of the resource.', example='arn:acs:sag:cn-hangzhou:130920852836****:ccn/ccn-b3qf0q439sq2de****'), status?: string(name='Status', description='The status of the service instance. Valid values: * Created * Deploying * DeployedFailed * Deployed * Upgrading * Deleting * Deleted * DeletedFailed', example='CREATE_COMPLETE'), } ](name='Resources', description='The list of resources.'), } model ListServiceInstanceResourcesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListServiceInstanceResourcesResponseBody(name='body'), } /** * @summary 查询服务实例资源 * * @param request ListServiceInstanceResourcesRequest * @param runtime runtime options for this request RuntimeOptions * @return ListServiceInstanceResourcesResponse */ async function listServiceInstanceResourcesWithOptions(request: ListServiceInstanceResourcesRequest, runtime: Util.RuntimeOptions): ListServiceInstanceResourcesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.filters)) { query['Filters'] = request.filters; } if (!Util.isUnset(request.maxResults)) { query['MaxResults'] = request.maxResults; } if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceInstanceId)) { query['ServiceInstanceId'] = request.serviceInstanceId; } if (!Util.isUnset(request.serviceInstanceResourceType)) { query['ServiceInstanceResourceType'] = request.serviceInstanceResourceType; } if (!Util.isUnset(request.tag)) { query['Tag'] = request.tag; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListServiceInstanceResources', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary 查询服务实例资源 * * @param request ListServiceInstanceResourcesRequest * @return ListServiceInstanceResourcesResponse */ async function listServiceInstanceResources(request: ListServiceInstanceResourcesRequest): ListServiceInstanceResourcesResponse { var runtime = new Util.RuntimeOptions{}; return listServiceInstanceResourcesWithOptions(request, runtime); } model ListServiceInstanceUpgradeHistoryRequest { maxResults?: int32(name='MaxResults', description='The number of items to return per page when paginating results. The maximum is 100, and the default is 20.', example='20'), nextToken?: string(name='NextToken', description='The token for the next query, which should be the value of the NextToken parameter from the previous API call.', example='AAAAAc3HCuYhJi/wvpk4xOr0VLbAx7BkQzyYC+ONO+WudHGKEdB0uWSY7AGnM3qCgm/Ynge7zU6NWdbj0Tegyajyqyc='), regionId?: string(name='RegionId', description='Region ID. This parameter is required.', example='cn-hangzhou'), serviceInstanceId?: string(name='ServiceInstanceId', description='Service instance ID. This parameter is required.', example='si-0e6fca6a51a54420****'), } model ListServiceInstanceUpgradeHistoryResponseBody = { maxResults?: int32(name='MaxResults', description='The number of items to return per page when paginating results. The maximum is 100, and the default is 20.', example='20'), nextToken?: string(name='NextToken', description='The token to use for the next query.', example='AAAAAc3HCuYhJi/wvpk4xOr0VLbAx7BkQzyYC+ONO+WudHGKEdB0uWSY7AGnM3qCgm/Ynge7zU6NWdbj0Tegyajyqyc='), requestId?: string(name='RequestId', description='Request ID.', example='86CAC31E-3527-562C-869F-347E931C9B25'), totalCount?: long(name='TotalCount', description='The total count of upgrade history', example='2'), upgradeHistory?: [ { endTime?: string(name='EndTime', description='End time of the upgrade.', example='2022-04-26T09:09:51Z'), fromVersion?: string(name='FromVersion', description='Version before the upgrade.', example='1'), results?: string(name='Results', description='Upgrade result.', example='{\\\\"PreUpgradeExecutionId\\\\":\\\\"exec-123\\\\"}'), startTime?: string(name='StartTime', description='Start time of the upgrade.', example='2022-04-26T08:09:51Z'), status?: string(name='Status', description='Upgrade status. Possible values: - upgrading: In progress. - UpgradeSuccessful: Upgrade successful. - UpgradeFailed: Upgrade failed.', example='UpgradeFailed'), toVersion?: string(name='ToVersion', description='Version after the upgrade.', example='3'), type?: string(name='Type', description='Upgrade type. - Upgrade - Rollback', example='Upgrade'), upgradeHistoryId?: string(name='UpgradeHistoryId', description='Upgrade history ID.', example='uh-1b21d65f75e94fa09745'), } ](name='UpgradeHistory', description='List of upgrade histories.'), } model ListServiceInstanceUpgradeHistoryResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListServiceInstanceUpgradeHistoryResponseBody(name='body'), } /** * @summary View the upgrade history of a service instance * * @param request ListServiceInstanceUpgradeHistoryRequest * @param runtime runtime options for this request RuntimeOptions * @return ListServiceInstanceUpgradeHistoryResponse */ async function listServiceInstanceUpgradeHistoryWithOptions(request: ListServiceInstanceUpgradeHistoryRequest, runtime: Util.RuntimeOptions): ListServiceInstanceUpgradeHistoryResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.maxResults)) { query['MaxResults'] = request.maxResults; } if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceInstanceId)) { query['ServiceInstanceId'] = request.serviceInstanceId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListServiceInstanceUpgradeHistory', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary View the upgrade history of a service instance * * @param request ListServiceInstanceUpgradeHistoryRequest * @return ListServiceInstanceUpgradeHistoryResponse */ async function listServiceInstanceUpgradeHistory(request: ListServiceInstanceUpgradeHistoryRequest): ListServiceInstanceUpgradeHistoryResponse { var runtime = new Util.RuntimeOptions{}; return listServiceInstanceUpgradeHistoryWithOptions(request, runtime); } model ListServiceInstancesRequest { filter?: [ { name?: string(name='Name', description='The parameter name of the filter. You can specify one or more filters. Valid values: * Name: The service name. If you want to perform a fuzzy match, specify the service name in the *xxx* format. For example, if the service name is My Service, you can set the filter value to *My* or *Service*. * ServiceInstanceId: The ID of the service instance. * ServiceId: The service ID. * UserId: The user ID. * Version: The service version. * Status: The status of the service instance. * DeployType: The deployment type of the service. * ServiceType: The service type. * OperationStartTimeBefore: The time before the hosted O\\\\&M starts. * OperationStartTimeAfter: The time after the hosted O\\\\&M starts. * OperationEndTimeBefore: The time before the hosted O\\\\&M ends. * OperationEndTimeAfter: The time after the hosted O\\\\&M ends. * OperatedServiceInstanceId: The ID of the hosted O\\\\&M instance that belongs to a private service. * OperationServiceInstanceId: The ID of the hosted O\\\\&M service instance that belongs to a hosted O\\\\&M service. * EnableInstanceOps: Whether the hosted O\\\\&M feature is enabled for service instances.', example='ServiceInstanceId'), value?: [ string ](name='Value', description='The parameter values of the filter.'), } ](name='Filter', description='The filter.'), maxResults?: int32(name='MaxResults', description='The number of entries per page. Valid values: 1 to 100. Default value: 20.', example='10'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.', example='BBBAAfu+XtuBE55iRLHEYYuojI4='), regionId?: string(name='RegionId', description='The region ID.', example='cn-hangzhou'), resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-aekzkt5buxxxxxx'), showDeleted?: boolean(name='ShowDeleted', description='Specifies whether to display the information that the service instance is deleted. Valid values: * true * false', example='false'), tag?: [ { key?: string(name='Key', description='The tag key.', example='key1'), value?: string(name='Value', description='The tag value.', example='value1'), } ](name='Tag', description='The custom tags.'), } model ListServiceInstancesResponseBody = { maxResults?: int32(name='MaxResults', description='The number of entries per page. Valid values: 1 to 100. Default value: 20.', example='20'), nextToken?: string(name='NextToken', description='The returned value of NextToken is a pagination token, which can be used in the next request to retrieve a new page of results.', example='AAAAAfu+XtuBE55iRLHEYYuojI4='), requestId?: string(name='RequestId', description='The request ID.', example='E50287CB-AABF-4877-92C0-289B339A1546'), serviceInstances?: [ { bizStatus?: string(name='BizStatus', description='The business status of the service instance. Valid values: * Normal: The service instance is normal. * Renewing: The service instance is being renewed. * RenewFailed: The service instance failed to be renewed. * Expired: The service instance expired.', example='Normal'), createTime?: string(name='CreateTime', description='The time when the service instance was created.', example='2021-05-20T00:00:00Z'), enableInstanceOps?: boolean(name='EnableInstanceOps', description='Indicates whether the service instance supports the hosted O\\\\&M feature. Valid values: * true * false', example='true'), endTime?: string(name='EndTime', description='The time when the service instance expires.', example='2022-01-01T12:00:00'), isOperated?: boolean(name='IsOperated', description='Indicates whether the hosted O\\\\&M feature is enabled for the service instance. Valid values: * true * false', example='true'), name?: string(name='Name', description='The name of the service instance.', example='TestName'), operatedServiceInstanceId?: string(name='OperatedServiceInstanceId', description='The ID of the service instance that is used to implement hosted O\\\\&M.', example='si-d6ab3a63ccbb4b17****'), operationEndTime?: string(name='OperationEndTime', description='The end of the time range during which hosted O\\\\&M is implemented.', example='2021-12-29T06:48:56Z'), operationStartTime?: string(name='OperationStartTime', description='The beginning of the time range during which hosted O\\\\&M is implemented.', example='2021-12-29T06:48:56Z'), parameters?: string(name='Parameters', description='The parameters of the service instance.', example='{"param":"value"}'), payType?: string(name='PayType', description='The billing method of the service. Valid values: * Permanent: Once you purchase the service, you can use it permanently. * Subscription: You purchase the service from Alibaba Cloud Marketplace and are charged for the service on a subscription basis. * PayAsYouGo: You purchase the service from Alibaba Cloud Marketplace and are charged for the service on a pay-as-you-go basis. * CustomFixTime: You are charged for the service based on a custom duration fixed by the service provider.', example='Subscription'), progress?: long(name='Progress', description='The deployment progress of the service instance. Unit: percentage.', example='90'), resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='si-d6ab3a63ccxxxxxx'), service?: { deployMetadata?: string(name='DeployMetadata', description='The storage configurations of the service. The format in which the deployment information of a service is stored varies based on the deployment type of the service. In this case, the deployment information is stored in the JSON string format.'), deployType?: string(name='DeployType', description='The deployment type of the service. Valid values: * ros: The service is deployed by using Resource Orchestration Service (ROS). * terraform: The service is deployed by using Terraform. * ack: The service is deployed by using Container Service for Kubernetes (ACK). * spi: The service is deployed by calling a service provider interface (SPI). * operation: The service is deployed by using a hosted O\\\\&M service.', example='ros'), enablePrivateVpcConnection?: boolean(name='EnablePrivateVpcConnection', description='Indicates whether the private connection feature is enabled. Valid values: * true * false', example='false'), publishTime?: string(name='PublishTime', description='The time when the service was published.', example='2021-05-21T00:00:00Z'), serviceId?: string(name='ServiceId', description='The service ID.', example='service-0e6fca6a51a54420****'), serviceInfos?: [ { image?: string(name='Image', description='The URL of the service icon.', example='https://example.com/service-image/c1c4a559-cc60-4af1-b976-98f356602462.png'), locale?: string(name='Locale', description='The language of the service instance.', example='zh-CN'), name?: string(name='Name', description='The service name.', example='WordPress'), shortDescription?: string(name='ShortDescription', description='The description of the service.', example='B是A公司自主设计并研发的开源分布式的关系型数据库'), } ](name='ServiceInfos', description='The information about the service.'), serviceType?: string(name='ServiceType', description='The type of the service. Valid values: * private: The service is a private service and is deployed within the account of a customer. * managed: The service is a fully managed service and is deployed within the account of a service provider. * operation: The service is a hosted O\\\\&M service. * poc: The service is a trial service.', example='private'), sourceSupplierName?: string(name='SourceSupplierName', description='The name of the distribution source service provider.', example='Company A'), status?: string(name='Status', description='The status of the service.', example='Online'), supplierName?: string(name='SupplierName', description='The name of the service provider.', example='Alibaba Cloud'), supplierUrl?: string(name='SupplierUrl', description='The URL of the service provider.', example='http://example.com'), version?: string(name='Version', description='The service version.', example='1.0'), versionName?: string(name='VersionName', description='The custom version name defined by the service provider.', example='版本A'), }(name='Service', description='The information about the service.'), serviceInstanceId?: string(name='ServiceInstanceId', description='The ID of the service instance.', example='si-d6ab3a63ccbb4b17****'), serviceType?: string(name='ServiceType', description='The type of the service. Valid values: * private: The service is a private service and is deployed within the account of a customer. * managed: The service is a fully managed service and is deployed within the account of a service provider. * operation: The service is a hosted O\\\\&M service. * poc: The service is a trial service.', example='private'), source?: string(name='Source', description='The source from which the service instance is created.', example='Supplier'), status?: string(name='Status', description='The status of the service instance. Valid values: * Created * Deploying * DeployedFailed * Deployed * Upgrading * Deleting * Deleted', example='Deployed'), statusDetail?: string(name='StatusDetail', description='The description of the deployment of the service instance.', example='deploy successfully'), tags?: [ { key?: string(name='Key', description='The tag key.', example='key1'), value?: string(name='Value', description='The tag value.', example='value1'), } ](name='Tags', description='The custom tags.'), templateName?: string(name='TemplateName', description='The template name.', example='模板1'), updateTime?: string(name='UpdateTime', description='The time when the service instance was updated.', example='2021-05-20T00:00:00Z'), userId?: long(name='UserId', description='The Alibaba Cloud account ID of the user.', example='1234567'), } ](name='ServiceInstances', description='The information about service instances.'), totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='100'), } model ListServiceInstancesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListServiceInstancesResponseBody(name='body'), } /** * @summary Queries a list of service instances. * * @param request ListServiceInstancesRequest * @param runtime runtime options for this request RuntimeOptions * @return ListServiceInstancesResponse */ async function listServiceInstancesWithOptions(request: ListServiceInstancesRequest, runtime: Util.RuntimeOptions): ListServiceInstancesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.filter)) { query['Filter'] = request.filter; } if (!Util.isUnset(request.maxResults)) { query['MaxResults'] = request.maxResults; } if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.resourceGroupId)) { query['ResourceGroupId'] = request.resourceGroupId; } if (!Util.isUnset(request.showDeleted)) { query['ShowDeleted'] = request.showDeleted; } if (!Util.isUnset(request.tag)) { query['Tag'] = request.tag; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListServiceInstances', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Queries a list of service instances. * * @param request ListServiceInstancesRequest * @return ListServiceInstancesResponse */ async function listServiceInstances(request: ListServiceInstancesRequest): ListServiceInstancesResponse { var runtime = new Util.RuntimeOptions{}; return listServiceInstancesWithOptions(request, runtime); } model ListServiceRegistrationsRequest { filter?: [ { name?: string(name='Name', description='Name of the filter field. Allowed values: - ServiceId: Service ID. - RegistrationId: Registration ID. - Status: Registration status. Allowed values: Submitted, Approved, Rejected, Canceled, and Executed.', example='Canceled'), value?: [ string ](name='Value', description='List of filter values.'), } ](name='Filter', description='Filter.'), maxResults?: int32(name='MaxResults', description='The number of items to return per page during a paginated query. The maximum is 100, and the default is 20.', example='10'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.', example='BBBAAfu+XtuBE55iRLHEYYuojI4='), regionId?: string(name='RegionId', description='Region ID. This parameter is required.', example='cn-hangzhou'), } model ListServiceRegistrationsResponseBody = { maxResults?: int32(name='MaxResults', description='Number of items per page in a paginated query. The maximum is 100, and the default is 20.', example='20'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.', example='AAAAAfu+XtuBE55iRLHEYYuojI4='), requestId?: string(name='RequestId', description='Request ID.', example='51945B04-6AA6-410D-93BA-236E0248B104'), serviceRegistrations?: [ { comment?: string(name='Comment', description='Comment.', example='some info is missing'), finishTime?: string(name='FinishTime', description='Finish time.', example='2021-05-23T00:00:00Z'), registrationId?: string(name='RegistrationId', description='Registration ID.', example='sr-001'), serviceId?: string(name='ServiceId', description='Service ID.', example='service-f4c0026a254bxxxxxxxx'), status?: string(name='Status', description='Registration status. Allowed values: - Submitted - Approved - Rejected - Canceled - Executed - Executed: Executed.', example='Rejected'), submitTime?: string(name='SubmitTime', description='Submit time.', example='2021-05-22T00:00:00Z'), } ](name='ServiceRegistrations', description='Service registration information.'), totalCount?: int32(name='TotalCount', description='Total number of records that meet the criteria.', example='100'), } model ListServiceRegistrationsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListServiceRegistrationsResponseBody(name='body'), } /** * @summary Query service registrations. * * @param request ListServiceRegistrationsRequest * @param runtime runtime options for this request RuntimeOptions * @return ListServiceRegistrationsResponse */ async function listServiceRegistrationsWithOptions(request: ListServiceRegistrationsRequest, runtime: Util.RuntimeOptions): ListServiceRegistrationsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.filter)) { query['Filter'] = request.filter; } if (!Util.isUnset(request.maxResults)) { query['MaxResults'] = request.maxResults; } if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListServiceRegistrations', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Query service registrations. * * @param request ListServiceRegistrationsRequest * @return ListServiceRegistrationsResponse */ async function listServiceRegistrations(request: ListServiceRegistrationsRequest): ListServiceRegistrationsResponse { var runtime = new Util.RuntimeOptions{}; return listServiceRegistrationsWithOptions(request, runtime); } model ListServiceSharedAccountsRequest { filter?: [ { name?: string(name='Name', description='The parameter name of the filter. You can specify one or more parameter names to query services. Valid values: * Name: the name of the service.', example='UserAliUid'), value?: [ string ](name='Value', description='The parameter value N of the filter. Valid values of N: 1 to 10.'), } ](name='Filter', description='The filters.'), maxResults?: int32(name='MaxResults', description='The number of entries per page. Valid values: 1 to 100. Default value: 20.', example='20'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.', example='AAAAAR130adlM4fHHVSWpTca/t4='), permission?: string(name='Permission', description='The permissions on the service. Valid values: * Deployable: Permissions to deploy the service. * Accessible: Permissions to access the service.', example='Accessible'), regionId?: string(name='RegionId', description='The region ID where the service instance resides. This parameter is required.', example='cn-hangzhou'), serviceId?: string(name='ServiceId', description='The service ID.', example='service-e10349089de34exxxxxx'), } model ListServiceSharedAccountsResponseBody = { maxResults?: int32(name='MaxResults', description='The number of entries per page. Valid values: 1 to 100. Default value: 20.', example='20'), nextToken?: string(name='NextToken', description='A pagination token.', example='AAAAAWns8w4MmhzeptXVRG0PUEU='), requestId?: string(name='RequestId', description='The request ID.', example='CA3AE512-6D30-549A-B52D-B9042CA8D515'), shareAccount?: [ { createTime?: string(name='CreateTime', description='The time when the service was created.', example='2021-12-28T02:47:46.000'), logo?: string(name='Logo', description='Service logo.', example='logo'), name?: string(name='Name', description='The name of the service instance. The value must meet the following requirements: * The name cannot exceed 64 characters in length. * It can contain digits, letters, hyphens (-), and underscores (_). It must start with a digit or a letter.', example='name'), permission?: string(name='Permission', description='The permissions on the service. Valid values: * Deployable: Permissions to deploy the service. * Accessible: Permissions to access the service.', example='Deployable'), serviceId?: string(name='ServiceId', description='The service ID.', example='service-e10349089de34exxxxxx'), updateTime?: string(name='UpdateTime', description='The time when the service was updated.', example='2023-02-13T02:16:03.756Z'), userAliUid?: string(name='UserAliUid', description='The user aliUid.', example='127383705xxxxxx'), } ](name='ShareAccount', description='Service shared account information.'), totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='1'), } model ListServiceSharedAccountsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListServiceSharedAccountsResponseBody(name='body'), } /** * @summary 调用ListServiceSharedAccounts查看服务共享账号列表。 * * @param request ListServiceSharedAccountsRequest * @param runtime runtime options for this request RuntimeOptions * @return ListServiceSharedAccountsResponse */ async function listServiceSharedAccountsWithOptions(request: ListServiceSharedAccountsRequest, runtime: Util.RuntimeOptions): ListServiceSharedAccountsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.filter)) { query['Filter'] = request.filter; } if (!Util.isUnset(request.maxResults)) { query['MaxResults'] = request.maxResults; } if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.permission)) { query['Permission'] = request.permission; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListServiceSharedAccounts', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary 调用ListServiceSharedAccounts查看服务共享账号列表。 * * @param request ListServiceSharedAccountsRequest * @return ListServiceSharedAccountsResponse */ async function listServiceSharedAccounts(request: ListServiceSharedAccountsRequest): ListServiceSharedAccountsResponse { var runtime = new Util.RuntimeOptions{}; return listServiceSharedAccountsWithOptions(request, runtime); } model ListServiceTestCasesRequest { filters?: [ { name?: string(name='Name', description='The parameter name of the filter. You can specify one or more filters. Valid values: **Status** **TaskId**', example='Status'), value?: [ string ](name='Value', description='The value of the filter condition.'), } ](name='Filters', description='The filters.'), maxResults?: int32(name='MaxResults', description='The number of entries per page. Valid values: 1 to 100. Default value: 20.', example='20'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.', example='AAAAAWns8w4MmhzeptXVRG0PUEU='), regionId?: string(name='RegionId', description='The region ID.', example='cn-hangzhou'), serviceId?: string(name='ServiceId', description='The service ID.', example='service-0e6fca6a51a54420****'), serviceVersion?: string(name='ServiceVersion', description='The service version.', example='draft'), } model ListServiceTestCasesResponseBody = { data?: [ { templateName?: string(name='TemplateName', description='The template name.', example='test-1'), testCaseId?: string(name='TestCaseId', description='The service test case id.', example='stc-83fcee1383354e35b151'), testCaseName?: string(name='TestCaseName', description='The service test case name.', example='case1'), testConfig?: string(name='TestConfig', description='The service test config.', example='--- parameters: PayType: "PostPaid" EcsInstanceType: "$[iact3-auto]" InstancePassword: "$[iact3-auto]"'), } ](name='Data', description='The data returned.'), maxResults?: int32(name='MaxResults', description='The number of entries per page. Valid values: 1 to 100. Default value: 20.', example='20'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.', example='AAAAAWns8w4MmhzeptXVRG0PUEU='), requestId?: string(name='RequestId', description='Request ID.', example='CA3AE512-6D30-549A-B52D-B9042CA8D515'), totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='18'), } model ListServiceTestCasesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListServiceTestCasesResponseBody(name='body'), } /** * @summary 服务测试用例列表 * * @param request ListServiceTestCasesRequest * @param runtime runtime options for this request RuntimeOptions * @return ListServiceTestCasesResponse */ async function listServiceTestCasesWithOptions(request: ListServiceTestCasesRequest, runtime: Util.RuntimeOptions): ListServiceTestCasesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.filters)) { query['Filters'] = request.filters; } if (!Util.isUnset(request.maxResults)) { query['MaxResults'] = request.maxResults; } if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.serviceVersion)) { query['ServiceVersion'] = request.serviceVersion; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListServiceTestCases', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary 服务测试用例列表 * * @param request ListServiceTestCasesRequest * @return ListServiceTestCasesResponse */ async function listServiceTestCases(request: ListServiceTestCasesRequest): ListServiceTestCasesResponse { var runtime = new Util.RuntimeOptions{}; return listServiceTestCasesWithOptions(request, runtime); } model ListServiceTestTaskLogsRequest { maxResults?: int32(name='MaxResults', description='The number of items to return per page when paginating results. The maximum is 100, and the default is 20.', example='20'), nextToken?: string(name='NextToken', description='A pagination token.', example='AAAAAWns8w4MmhzeptXVRG0PUEU='), sortOrder?: string(name='SortOrder', description='Sort Order. Possible values: + Ascending: Ascending order + Descending (default value): Descending order', example='Ascending'), taskId?: string(name='TaskId', description='The task ID.', example='stt-568c2c5a687a409b977e'), } model ListServiceTestTaskLogsResponseBody = { maxResults?: int32(name='MaxResults', description='The number of items to return per page when paginating results. The maximum is 100, and the default is 20.', example='20'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.', example='AAAAAW8kZY+u1sYOaYf5JmgmDQQ='), requestId?: string(name='RequestId', description='The request ID.', example='EDEE055B-D5F4-5B92-8F21-999D408F1214'), taskLogs?: [ { content?: string(name='Content', description='The log content.', example='log content'), timestamp?: string(name='Timestamp', description='The UTC timestamp when the response is returned. Use the UTC time format: yyyy-MM-ddTHH:mmZ', example='2022-12-12T20:00:09Z'), } ](name='TaskLogs', description='The service test task logs.'), } model ListServiceTestTaskLogsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListServiceTestTaskLogsResponseBody(name='body'), } /** * @summary 获取服务测试实时日志 * * @param request ListServiceTestTaskLogsRequest * @param runtime runtime options for this request RuntimeOptions * @return ListServiceTestTaskLogsResponse */ async function listServiceTestTaskLogsWithOptions(request: ListServiceTestTaskLogsRequest, runtime: Util.RuntimeOptions): ListServiceTestTaskLogsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.maxResults)) { query['MaxResults'] = request.maxResults; } if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.sortOrder)) { query['SortOrder'] = request.sortOrder; } if (!Util.isUnset(request.taskId)) { query['TaskId'] = request.taskId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListServiceTestTaskLogs', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary 获取服务测试实时日志 * * @param request ListServiceTestTaskLogsRequest * @return ListServiceTestTaskLogsResponse */ async function listServiceTestTaskLogs(request: ListServiceTestTaskLogsRequest): ListServiceTestTaskLogsResponse { var runtime = new Util.RuntimeOptions{}; return listServiceTestTaskLogsWithOptions(request, runtime); } model ListServiceTestTasksRequest { filter?: [ { name?: string(name='Name', description='The parameter name of the filter. You can specify one or more parameter names to query services. Valid values: * Status: the status of the task. * TaskId: the task id.', example='Status'), value?: [ string ](name='Value', description='The parameter value N of the filter. Valid values of N: 1 to 10.'), } ](name='Filter', description='The filters.'), maxResults?: int32(name='MaxResults', description='Number of items per page in a paginated query. The maximum is 100, and the default is 20.', example='20'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.', example='AAAAAfu+XtuBE55iRLHEYYuojI4='), regionId?: string(name='RegionId', description='The region ID.', example='cn-hangzhou'), serviceId?: string(name='ServiceId', description='The service ID.', example='service-062ae8e13b394dd5b63c'), serviceVersion?: string(name='ServiceVersion', description='The service version.', example='draft'), } model ListServiceTestTasksResponseBody = { count?: int32(name='Count', description='The total number of entries returned.', example='9'), maxResults?: int32(name='MaxResults', description='The number of items to return per page when paginating results. The maximum is 100, and the default is 20.', example='1'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.', example='AAAAAfu+XtuBE55iRLHEYYuojI4='), requestId?: string(name='RequestId', description='The request ID.', example='51945B04-6AA6-410D-93BA-236E0248B104'), serviceTestTasks?: [ { createTime?: string(name='CreateTime', description='The time when the task was created.', example='2024-02-26T02:16:35Z'), status?: string(name='Status', description='the status of service task.', example='Success'), taskId?: string(name='TaskId', description='The task ID.', example='sttt-000h5nd4yrg59ucurzy1'), taskName?: string(name='TaskName', description='The name of the task.', example='dadadad'), taskRegionId?: string(name='TaskRegionId', description='The task region id.', example='cn-beijing'), } ](name='ServiceTestTasks', description='The service test tasks.'), } model ListServiceTestTasksResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListServiceTestTasksResponseBody(name='body'), } /** * @summary 获取任务执行列表 * * @param request ListServiceTestTasksRequest * @param runtime runtime options for this request RuntimeOptions * @return ListServiceTestTasksResponse */ async function listServiceTestTasksWithOptions(request: ListServiceTestTasksRequest, runtime: Util.RuntimeOptions): ListServiceTestTasksResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.filter)) { query['Filter'] = request.filter; } if (!Util.isUnset(request.maxResults)) { query['MaxResults'] = request.maxResults; } if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.serviceVersion)) { query['ServiceVersion'] = request.serviceVersion; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListServiceTestTasks', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary 获取任务执行列表 * * @param request ListServiceTestTasksRequest * @return ListServiceTestTasksResponse */ async function listServiceTestTasks(request: ListServiceTestTasksRequest): ListServiceTestTasksResponse { var runtime = new Util.RuntimeOptions{}; return listServiceTestTasksWithOptions(request, runtime); } model ListServiceUsagesRequest { filter?: [ { name?: string(name='Name', description='The parameter name of the filter. You can specify one or more filters. Valid values: * ServiceId: the ID of the service. * ServiceName: the service name. * Status: the state of the service. * SupplierName: the name of the service provider.', example='ServiceId'), value?: [ string ](name='Value', description='The parameter value N of the filter. Valid values of N: 1 to 10.'), } ](name='Filter', description='The filter.'), maxResults?: int32(name='MaxResults', description='The number of entries per page. Valid values: 1 to 100. Default value: 20.', example='20'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.', example='AAAAAWns8w4MmhzeptXVRG0PUEU='), supplierRole?: string(name='SupplierRole', description='The role of the service provider.', example='Supplier'), } model ListServiceUsagesResponseBody = { maxResults?: int32(name='MaxResults', description='The number of entries per page. Valid values: 1 to 100. Default value: 20.', example='20'), nextToken?: string(name='NextToken', description='The returned value of NextToken is a pagination token, which can be used in the next request to retrieve a new page of results.', example='AAAAAYChudnQUoBH+mGWFpb6oP0='), requestId?: string(name='RequestId', description='The request ID.', example='18AD0960-A9FE-1AC8-ADF8-22131Fxxxxxx'), serviceUsages?: [ { comments?: string(name='Comments', description='The comment on the approval.', example='Reject'), createTime?: string(name='CreateTime', description='The time when the application was created.', example='2022-05-25T02:02:02Z'), serviceId?: string(name='ServiceId', description='The service ID.', example='service-c9f36ec6d19b4exxxxxx'), serviceName?: string(name='ServiceName', description='The service name.', example='ServiceTest'), status?: string(name='Status', description='The status of the service application. Valid values: * Submitted: The application is submitted or is to be approved. * Approved: The application is approved. * Rejected: The application is rejected. * Canceled: The application is canceled.', example='Submitted'), supplierName?: string(name='SupplierName', description='The name of the service provider.', example='SupplierAAA'), updateTime?: string(name='UpdateTime', description='The time when the application was updated.', example='2022-05-25T02:02:02Z'), userAliUid?: long(name='UserAliUid', description='The ID of the Alibaba Cloud account.', example='127383705958xxxx'), userInformation?: map[string]string(name='UserInformation', description='The user information.'), } ](name='ServiceUsages', description='The service applications.'), totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='1'), } model ListServiceUsagesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListServiceUsagesResponseBody(name='body'), } /** * @summary Queries the applications for using a service. * * @param request ListServiceUsagesRequest * @param runtime runtime options for this request RuntimeOptions * @return ListServiceUsagesResponse */ async function listServiceUsagesWithOptions(request: ListServiceUsagesRequest, runtime: Util.RuntimeOptions): ListServiceUsagesResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListServiceUsages', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'GET', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Queries the applications for using a service. * * @param request ListServiceUsagesRequest * @return ListServiceUsagesResponse */ async function listServiceUsages(request: ListServiceUsagesRequest): ListServiceUsagesResponse { var runtime = new Util.RuntimeOptions{}; return listServiceUsagesWithOptions(request, runtime); } model ListServicesRequest { allVersions?: boolean(name='AllVersions', description='Specifies whether to return all versions of a service. Default value: false, which specifies that only the default version of a service is returned.', example='false'), filter?: [ { name?: string(name='Name', description='The parameter name of the filter. You can specify one or more parameter names to query services. Valid values: * ServiceId: the ID of the service. * Name: the name of the service. * Status: the state of the service. * SupplierName: the name of the service provider.', example='Status'), value?: [ string ](name='Value', description='The parameter values of the filter.'), } ](name='Filter', description='The filters.'), maxResults?: int32(name='MaxResults', description='The number of entries per page. Valid values: 1 to 100. Default value: 20.', example='10'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.', example='BBBAAfu+XtuBE55iRLHEYYuojI4='), regionId?: string(name='RegionId', description='The region ID. This parameter is required.', example='cn-hangzhou'), resourceGroupId?: string(name='ResourceGroupId', description='The resource group ID.', example='rg-aekzkt5buxxxxxx'), tag?: [ { key?: string(name='Key', description='The tag key.', example='key1'), value?: string(name='Value', description='The tag value.', example='value1'), } ](name='Tag', description='The custom tags.'), } model ListServicesResponseBody = { maxResults?: int32(name='MaxResults', description='The number of entries per page. Valid values: 1 to 100. Default value: 20.', example='1'), nextToken?: string(name='NextToken', description='A pagination token.', example='AAAAAfu+XtuBE55iRLHEYYuojI4='), requestId?: string(name='RequestId', description='The request ID.', example='51945B04-6AA6-410D-93BA-236E0248B104'), services?: [ { approvalType?: string(name='ApprovalType', description='The approval type for applications for using the service. Valid values: * Manual: The applications are manual reviewed. * AutoPass: The applications are automatically approved.', example='AutoPass'), artifactId?: string(name='ArtifactId', description='The ID of the artifact.', example='artifact-21ca53ac16a643xxxxxx'), artifactVersion?: string(name='ArtifactVersion', description='The version of the artifact.', example='draft'), buildInfo?: string(name='BuildInfo', description='The informathon for build service.', example='{ "RepoUrl": "https://github.com/user/repo.git", "Brancn": "main"}'), categories?: string(name='Categories', description='The category of the service.', example='OpenSource'), commodity?: { commodityCode?: string(name='CommodityCode', description='The commodity code.', example='cmjj00xxxx'), saasBoostMetadata?: string(name='SaasBoostMetadata', description='The configuration metadata related to Saas Boost.', example='{ // Specifies whether to associate the service with the SaaS Boost commodity. Default value: false. "Enabled":true/false // The public endpoint of the SaaS Boost instance. "PublicAccessUrl":"https://example.com" }'), type?: string(name='Type', description='The platform type. Valid values: * marketplace: Alibaba Cloud Marketplace. * Css: Lingxiao. * SaasBoost: Saas Boost.', example='Marketplace'), }(name='Commodity', description='The commodity details.'), commodityCode?: string(name='CommodityCode', description='The commodity code of the service in Alibaba Cloud Marketplace.', example='cmjj00xxxx'), createTime?: string(name='CreateTime', description='The time when the service was created.', example='2021-05-20T00:00:00Z'), defaultVersion?: boolean(name='DefaultVersion', description='Indicates whether the version is the default version. Valid values: * false * true', example='true'), deployType?: string(name='DeployType', description='The deployment type of the service. Valid values: * ros: The service is deployed by using Resource Orchestration Service (ROS). * terraform: The service is deployed by using Terraform. * spi: The service is deployed by calling the Service Provider Interface (SPI). * operation: The service is deployed by using a hosted O\\\\&M service. * container: The service is deployed by using a container. *', example='ros'), hasBeta?: boolean(name='HasBeta', description='Indicates whether the service has a beta version. Valid values: * true * false', example='true'), hasDraft?: boolean(name='HasDraft', description='Indicates whether the service has a draft version. Valid values: * true * false', example='true'), latestResellSourceServiceVersion?: string(name='LatestResellSourceServiceVersion', description='The latest version of the distribution source service.', example='1'), publishTime?: string(name='PublishTime', description='The time when the service was published.', example='2021-05-21T00:00:00Z'), relationType?: string(name='RelationType', description='The purpose of the artifact. Valid values: * ServiceDeployment: The artifact is used to create service instances. * ServiceUpgrade: The artifact is used to upgrade service instances.', example='ServiceDeployment'), resellApplyStatus?: string(name='ResellApplyStatus', description='The state of distribution authorization of the service. Valid values: * CanApply: Distributors can apply for distribution permissions. * Applied: The application for distribution permissions is submitted. * Approved: The application for distribution permissions is approved.', example='CanApply'), resellServiceId?: string(name='ResellServiceId', description='The ID of the distribution service.', example='service-70a3b15bb62643xxxxxx'), resourceGroupId?: string(name='ResourceGroupId', description='The resource group ID.', example='rg-aekz5b555xxxxxx'), serviceDiscoverable?: string(name='ServiceDiscoverable', description='Indicates whether the service is visible. Valid values: * INVISIBLE * DISCOVERABLE', example='INVISIBLE'), serviceId?: string(name='ServiceId', description='The service ID.', example='service-70a3b15bb62643xxxxxx'), serviceInfos?: [ { image?: string(name='Image', description='The URL of the service icon.', example='http://img.tidb.oss.url'), locale?: string(name='Locale', description='The language of the service. Valid values: * zh-CN: Chinese. * en-US: English.', example='zh-CN'), name?: string(name='Name', description='The name of the service.', example='SpringBoot-ECS容器版'), shortDescription?: string(name='ShortDescription', description='The description of the service.', example='B是A公司自主设计并研发的开源分布式的关系型数据库'), } ](name='ServiceInfos', description='The information about the service.'), serviceType?: string(name='ServiceType', description='The type of the service. Valid values: * private: The service is a private service and is deployed within the account of a customer. * managed: The service is a fully managed service and is deployed within the account of a service provider. * operation: The service is a hosted O\\\\&M service.', example='private'), shareType?: string(name='ShareType', description='The permission type of the deployment URL. Valid values: * Public: All users can go to the URL to create a formal service instance or a trial service instance. * Restricted: Only users in the whitelist can go to the URL to create a formal service instance or a trial service instance. * OnlyFormalRestricted: Only users in the whitelist can go to the URL to create a formal service instance. * OnlyTrailRestricted: Only users in the whitelist can go to the URL to create a trial service instance. * Hidden: Users not in the whitelist cannot see the service details page when they go to the URL and cannot request deployment permissions.', example='Public'), sourceImage?: string(name='SourceImage', description='The source image.', example='centos_7'), sourceServiceId?: string(name='SourceServiceId', description='The ID of the distribution source service.', example='service-70a3b15bb62643xxxxxx'), sourceServiceVersion?: string(name='SourceServiceVersion', description='The version of the distribution source service.', example='1'), sourceSupplierName?: string(name='SourceSupplierName', description='The name of the distribution source service provider.', example='SourceSupplier'), status?: string(name='Status', description='The state of the service. Valid values: * Draft: The service is a draft. * Submitted: The service is submitted for review. You cannot modify services in this state. * Approved: The service is approved. You cannot modify services in this state. You can publish services in this state. * Launching: The service is being published. * Online: The service is published. * Offline: The service is unpublished.', example='Online'), supplierName?: string(name='SupplierName', description='The name of the service provider.', example='Alibaba Cloud'), supplierUrl?: string(name='SupplierUrl', description='The URL of the service provider.', example='http://example.com'), tags?: [ { key?: string(name='Key', description='The tag key.', example='key1'), value?: string(name='Value', description='The tag value.', example='value1'), } ](name='Tags', description='The service tags.'), tenantType?: string(name='TenantType', description='The tenant type of the managed service. Valid values: * SingleTenant * MultiTenant', example='SingleTenant'), trialType?: string(name='TrialType', description='The trial policy. Valid values: * Trial: Trials are supported. * NotTrial: Trials are not supported.', example='Trial'), updateTime?: string(name='UpdateTime', description='The time when the service was modified.', example='2021-05-21T00:00:00Z'), version?: string(name='Version', description='The version of the service.', example='1.0'), versionName?: string(name='VersionName', description='The custom version name defined by the service provider.', example='v2.0.0'), virtualInternetService?: string(name='VirtualInternetService', description='Indicates whether the service is a virtual Internet service. Valid values: * false * true', example='false'), } ](name='Services', description='The services.'), totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='100'), } model ListServicesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListServicesResponseBody(name='body'), } /** * @summary Queries a list of services. * * @param request ListServicesRequest * @param runtime runtime options for this request RuntimeOptions * @return ListServicesResponse */ async function listServicesWithOptions(request: ListServicesRequest, runtime: Util.RuntimeOptions): ListServicesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.allVersions)) { query['AllVersions'] = request.allVersions; } if (!Util.isUnset(request.filter)) { query['Filter'] = request.filter; } if (!Util.isUnset(request.maxResults)) { query['MaxResults'] = request.maxResults; } if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.resourceGroupId)) { query['ResourceGroupId'] = request.resourceGroupId; } if (!Util.isUnset(request.tag)) { query['Tag'] = request.tag; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListServices', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Queries a list of services. * * @param request ListServicesRequest * @return ListServicesResponse */ async function listServices(request: ListServicesRequest): ListServicesResponse { var runtime = new Util.RuntimeOptions{}; return listServicesWithOptions(request, runtime); } model ListSupplierRegistrationsRequest { filter?: [ { name?: string(name='Name', description='Name of the filter field. Allowed values: - SupplierUid: The aliUid of supplier. - SupplierName: The name of supplier. - RegistrationId: Registration ID. - Status: Registration status. Allowed values: Submitted, Approved, Rejected.', example='SupplierUid'), value?: [ string ](name='Value', description='Filter value.'), } ](name='Filter', description='The filter.'), maxResults?: int32(name='MaxResults', description='Number of items per page in a paginated query. The maximum is 100, and the default is 20.', example='20'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results.', example='AAAAAYChudnQUoBH+mGWFpb6oP0='), regionId?: string(name='RegionId', description='The region ID. This parameter is required.', example='cn-hangzhou'), } model ListSupplierRegistrationsResponseBody = { maxResults?: int32(name='MaxResults', description='The number of entries per page. Valid values: 1 to 100. Default value: 20.', example='20'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results.', example='AAAAAdx9kBO7qKpr9My/+XQo0oY='), requestId?: string(name='RequestId', description='The request ID.', example='C6CC568D-xxxx-xxxx-xxxx-08EB8E9F9F20'), supplierRegistrations?: [ { comment?: string(name='Comment', description='The comment of this registration.', example='empty'), contactEmail?: string(name='ContactEmail', description='Contact email', example='test@163.com'), contactNumber?: string(name='ContactNumber', description='Contact number', example='135xxxxxxxx'), contactPerson?: string(name='ContactPerson', description='Contact person', example='Mike'), contactPersonTitle?: string(name='ContactPersonTitle', description='Contact person tiltle.', example='CTO'), enableResellerMode?: boolean(name='EnableResellerMode', description='Whether to enable the resell mode.', example='false'), productAnnualRevenue?: string(name='ProductAnnualRevenue', description='Annual product revenue', example='empty'), productBusiness?: string(name='ProductBusiness', description='The business of product.', example='AI'), productDeliveryTypes?: string(name='ProductDeliveryTypes', description='Product delivery type,Valid values: SaaS License API DesktopSoftware Others', example='SaaS'), productPublishTime?: string(name='ProductPublishTime', description='The publish time of product.', example='2024.10.24'), productSellTypes?: string(name='ProductSellTypes', description='Product sell type, Valid values: - Direct - Channel', example='Direct'), registrationId?: string(name='RegistrationId', description='The registration ID.', example='sr-xxx'), resellBusinessDesc?: string(name='ResellBusinessDesc', description='The description of resell business.', example='empty'), status?: string(name='Status', description='The deployment state of the registration. Valid values: - Submitted - Approved - Rejected', example='Submitted'), submitTime?: string(name='SubmitTime', description='The submit time of this registration.', example='2025-01-22 09:47:58'), supplierDesc?: string(name='SupplierDesc', description='The description of service provider.', example='Test supplier'), supplierLogo?: string(name='SupplierLogo', description='The Logo of service provider.', example='https://service-info-public.oss-cn-hangzhou.aliyuncs.com/xxx/service-xxx/xxx.png'), supplierName?: string(name='SupplierName', description='The name of the service provider.', example='Aliibaba Cloud'), supplierNameEn?: string(name='SupplierNameEn', description='The english name of the service provider.', example='Alibaba Cloud ComputeNest'), supplierUid?: string(name='SupplierUid', description='The Alibaba Cloud account ID of the service provider.', example='1256xxx23434'), supplierUrl?: string(name='SupplierUrl', description='The URL of the service provider.', example='https://www.guangbao-uni.com'), } ](name='SupplierRegistrations', description='The supplier registrations'), totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='3'), } model ListSupplierRegistrationsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListSupplierRegistrationsResponseBody(name='body'), } /** * @summary 查询服务商入职审核列表 * * @param request ListSupplierRegistrationsRequest * @param runtime runtime options for this request RuntimeOptions * @return ListSupplierRegistrationsResponse */ async function listSupplierRegistrationsWithOptions(request: ListSupplierRegistrationsRequest, runtime: Util.RuntimeOptions): ListSupplierRegistrationsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.filter)) { query['Filter'] = request.filter; } if (!Util.isUnset(request.maxResults)) { query['MaxResults'] = request.maxResults; } if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListSupplierRegistrations', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary 查询服务商入职审核列表 * * @param request ListSupplierRegistrationsRequest * @return ListSupplierRegistrationsResponse */ async function listSupplierRegistrations(request: ListSupplierRegistrationsRequest): ListSupplierRegistrationsResponse { var runtime = new Util.RuntimeOptions{}; return listSupplierRegistrationsWithOptions(request, runtime); } model ListTagKeysRequest { nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.', example='AAAAAfu+XtuBE55iRLHEYYuojI4='), regionId?: string(name='RegionId', description='The region ID. This parameter is required.', example='cn-hangzhou'), resourceType?: string(name='ResourceType', description='The type of the resource. Valid values: - service - serviceinstance - artifact This parameter is required.', example='service'), } model ListTagKeysResponseBody = { keys?: [ string ](name='Keys', description='The tag keys.'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results.', example='AAAAAZ9FmxgN6wKfeK/GOKRnnjU='), requestId?: string(name='RequestId', description='The request ID.', example='8872ACE6-0297-54A4-8AAD-3A8623EC6C5D'), } model ListTagKeysResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListTagKeysResponseBody(name='body'), } /** * @summary 查询标签键列表 * * @param request ListTagKeysRequest * @param runtime runtime options for this request RuntimeOptions * @return ListTagKeysResponse */ async function listTagKeysWithOptions(request: ListTagKeysRequest, runtime: Util.RuntimeOptions): ListTagKeysResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.resourceType)) { query['ResourceType'] = request.resourceType; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListTagKeys', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary 查询标签键列表 * * @param request ListTagKeysRequest * @return ListTagKeysResponse */ async function listTagKeys(request: ListTagKeysRequest): ListTagKeysResponse { var runtime = new Util.RuntimeOptions{}; return listTagKeysWithOptions(request, runtime); } model ListTagResourcesRequest { nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results.', example='AAAAAfu+XtuBE55iRLHEYYuojI4='), regionId?: string(name='RegionId', description='Region ID. This parameter is required.', example='cn-hangzhou'), resourceId?: [ string ](name='ResourceId', description='The resource IDs. You can specify at most 50 resource IDs in each call.'), resourceType?: string(name='ResourceType', description='The resource type. Valid value: - service - serviceinstance - artifact This parameter is required.', example='service'), tag?: [ { key?: string(name='Key', description='The tag key.', example='Usage'), value?: string(name='Value', description='The tag value.', example='test'), } ](name='Tag', description='The tags.'), } model ListTagResourcesResponseBody = { nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results.', example='AAAAAfu+XtuBE55iRLHEYYuojI4='), requestId?: string(name='RequestId', description='The request ID.', example='A361BA9E-xxxx-xxxx-xxxx-C26E5180456E'), tagResources?: [ { resourceId?: string(name='ResourceId', description='Resource ID', example='service-xxx'), resourceType?: string(name='ResourceType', description='The resource type. Valid value: - service - serviceinstance - artifact', example='service'), tagKey?: string(name='TagKey', description='The tag key.', example='usage'), tagValue?: string(name='TagValue', description='The tag value.', example='test'), } ](name='TagResources', description='The resources and their tags.'), } model ListTagResourcesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListTagResourcesResponseBody(name='body'), } /** * @summary 查询资源标签 * * @param request ListTagResourcesRequest * @param runtime runtime options for this request RuntimeOptions * @return ListTagResourcesResponse */ async function listTagResourcesWithOptions(request: ListTagResourcesRequest, runtime: Util.RuntimeOptions): ListTagResourcesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.resourceId)) { query['ResourceId'] = request.resourceId; } if (!Util.isUnset(request.resourceType)) { query['ResourceType'] = request.resourceType; } if (!Util.isUnset(request.tag)) { query['Tag'] = request.tag; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListTagResources', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary 查询资源标签 * * @param request ListTagResourcesRequest * @return ListTagResourcesResponse */ async function listTagResources(request: ListTagResourcesRequest): ListTagResourcesResponse { var runtime = new Util.RuntimeOptions{}; return listTagResourcesWithOptions(request, runtime); } model ListTagValuesRequest { key?: string(name='Key', description='The tag key. This parameter is required.', example='ECS'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.', example='AAAAAfmTH5rcd4YFfob4P0uDAAc='), regionId?: string(name='RegionId', description='The region ID. This parameter is required.', example='cn-hangzhou'), resourceType?: string(name='ResourceType', description='The type of the resource. Valid values: - service - service instance - artifact This parameter is required.', example='service'), } model ListTagValuesResponseBody = { nextToken?: string(name='NextToken', description='A pagination token.', example='AAAAAVz7BQqj2xtiNSC3d3RAD38='), requestId?: string(name='RequestId', description='The request ID.', example='0631D623-D917-1C2D-ACD6-5B3B19XXXXXX'), values?: [ string ](name='Values', description='The information of the tag values.'), } model ListTagValuesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListTagValuesResponseBody(name='body'), } /** * @summary 查询标签值列表 * * @param request ListTagValuesRequest * @param runtime runtime options for this request RuntimeOptions * @return ListTagValuesResponse */ async function listTagValuesWithOptions(request: ListTagValuesRequest, runtime: Util.RuntimeOptions): ListTagValuesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.key)) { query['Key'] = request.key; } if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.resourceType)) { query['ResourceType'] = request.resourceType; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListTagValues', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary 查询标签值列表 * * @param request ListTagValuesRequest * @return ListTagValuesResponse */ async function listTagValues(request: ListTagValuesRequest): ListTagValuesResponse { var runtime = new Util.RuntimeOptions{}; return listTagValuesWithOptions(request, runtime); } model ModifyServiceInstanceResourcesRequest { resources?: string(name='Resources', description='The imported resources.', example='{ "RegionId": "cn-hangzhou", "Type": "ResourceIds", "ResourceIds": { "ALIYUN::ECS::INSTANCE": ["i-xxx", "i-yyy"], "ALIYUN::RDS::INSTANCE": ["rm-xxx", "rm-yyy"], "ALIYUN::VPC::VPC": ["vpc-xxx", "vpc-yyy"], "ALIYUN::SLB::INSTANCE": ["lb-xxx", "lb-yyy"] } }'), serviceInstanceId?: string(name='ServiceInstanceId', description='The ID of the service instance. This parameter is required.', example='si-d8a0cc2a1ee04dce****'), serviceInstanceResourcesAction?: string(name='ServiceInstanceResourcesAction', description='The type of operation performed on the service instance resource. Valid values: * Import: The resource is imported. * UnImport: The resource import is canceled.', example='Import'), } model ModifyServiceInstanceResourcesResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='46577928-3162-15A6-9084-69820EB9xxxx'), } model ModifyServiceInstanceResourcesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ModifyServiceInstanceResourcesResponseBody(name='body'), } /** * @summary Modifies the resource information about a service instance. * * @param request ModifyServiceInstanceResourcesRequest * @param runtime runtime options for this request RuntimeOptions * @return ModifyServiceInstanceResourcesResponse */ async function modifyServiceInstanceResourcesWithOptions(request: ModifyServiceInstanceResourcesRequest, runtime: Util.RuntimeOptions): ModifyServiceInstanceResourcesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.resources)) { query['Resources'] = request.resources; } if (!Util.isUnset(request.serviceInstanceId)) { query['ServiceInstanceId'] = request.serviceInstanceId; } if (!Util.isUnset(request.serviceInstanceResourcesAction)) { query['ServiceInstanceResourcesAction'] = request.serviceInstanceResourcesAction; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ModifyServiceInstanceResources', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Modifies the resource information about a service instance. * * @param request ModifyServiceInstanceResourcesRequest * @return ModifyServiceInstanceResourcesResponse */ async function modifyServiceInstanceResources(request: ModifyServiceInstanceResourcesRequest): ModifyServiceInstanceResourcesResponse { var runtime = new Util.RuntimeOptions{}; return modifyServiceInstanceResourcesWithOptions(request, runtime); } model PreLaunchServiceRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.', example='10CM943JP0EN9D51H'), regionId?: string(name='RegionId', description='The region ID. This parameter is required.', example='cn-hangzhou'), serviceId?: string(name='ServiceId', description='The service ID. This parameter is required.', example='service-f7024a22ea5149xxxxxx'), } model PreLaunchServiceResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='4DB0F536-B3BE-4F0D-BD29-E83FB56D550C'), } model PreLaunchServiceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: PreLaunchServiceResponseBody(name='body'), } /** * @summary 预发布服务 * * @param request PreLaunchServiceRequest * @param runtime runtime options for this request RuntimeOptions * @return PreLaunchServiceResponse */ async function preLaunchServiceWithOptions(request: PreLaunchServiceRequest, runtime: Util.RuntimeOptions): PreLaunchServiceResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'PreLaunchService', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary 预发布服务 * * @param request PreLaunchServiceRequest * @return PreLaunchServiceResponse */ async function preLaunchService(request: PreLaunchServiceRequest): PreLaunchServiceResponse { var runtime = new Util.RuntimeOptions{}; return preLaunchServiceWithOptions(request, runtime); } model PushMeteringDataRequest { metering?: string(name='Metering', description='The metering data. Parameters in the example value: * InstanceId: the ID of an instance in Alibaba Cloud Marketplace. Parameter type: STRING. * StartTime: the time when the metering operation started. Set the parameter to a UNIX timestamp. Unit: seconds. Parameter type: LONG. * EndTime: the time when the metering operation ended. Set the parameter to a UNIX timestamp. Unit: seconds. Parameter type: LONG. * Entities: the metering entities. Parameter type: LIST. * Key: the name of the metering item. Parameter type: STRING. * Frequency: the number of times the instance was used. * Period: the usage duration of the instance. Unit: seconds. Note: The metering unit is second, whereas the billing unit is hour. Therefore, when bills are generated, seconds are converted to hours. For example, the usage metered from 19:00 to 20:00 is 1800 seconds and the price is USD 1 per hour. In this case, the hourly bill for 19:00 to 20:00 is calculated by using the following formula: 1800/3600 x 1 = 0.5. If the result is a decimal, only the first two decimal places are retained. - Storage: The used storage space. Unit: bytes. Note: The metering unit is byte, whereas the billing unit is MB. Therefore, when bills are generated, bytes are converted to megabytes. For example, the usage metered from 19:00 to 20:00 is 524,288 bytes and the price is USD 1 per MB. In this case, the hourly bill for 19:00 to 20:00 is calculated by using the following formula: 524288/1024/1024 x 1 = 0.5. If the result is a decimal, only the first two decimal places are retained. - NetworkOut: the upstream traffic consumed. Unit: bit. Note: The metering unit is bit, whereas the billing unit is Mbit. Therefore, when bills are generated, bits are converted to megabits. For example, the usage metered from 19:00 to 20:00 is 524,288 bits and the price is USD 1 per Mbit. In this case, the hourly bill for 19:00 to 20:00 is calculated by using the following formula: 524288/1024/1024 x 1 = 0.5. If the result is a decimal, only the first two decimal places are retained. - NetworkIn: the downstream traffic consumed. Unit: bit. Note: The metering unit is bit, whereas the billing unit is Mbit. Therefore, when bills are generated, bits are converted to megabits. For example, the usage metered from 19:00 to 20:00 is 524,288 bits and the price is USD 1 per Mbit. In this case, the hourly bill for 19:00 to 20:00 is calculated by using the following formula: 524288/1024/1024 x 1 = 0.5. If the result is a decimal, only the first two decimal places are retained. - Character: the number of characters. - DailyActiveUser: the number of daily active users (DAU). - PeriodMin: the usage duration of the instance. Unit: minutes. - VirtualCpu: the number of virtual CPU cores. * Value: the value of the metering item. The value is equal to or greater than 0. Parameter type: INTEGER. **Note**: * If bills are generated for the commodity in real time, the difference between the values of StartTime and EndTime is not limited. However, the time specified by EndTime must be later than that specified by StartTime. * If bills are generated for the commodity by billing cycle, such as by hour, by day, or by month, the difference between the values of StartTime and EndTime must be greater than 5 minutes. * In a request for pushing multiple metering data records, the values of InstanceId must indicate instances of the same commodity. You cannot push metering data of instances of multiple commodities at a time. This parameter is required.', example='[{\\\\"StartTime\\\\":1681264800,\\\\"EndTime\\\\":1681268400,\\\\"Entities\\\\":[{\\\\"Key\\\\":\\\\"Unit\\\\",\\\\"Value\\\\":\\\\"0\\\\"}]}]'), serviceInstanceId?: string(name='ServiceInstanceId', description='The service instance ID. This parameter is required.', example='si-0e6fca6a51a54420****'), } model PushMeteringDataResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='94E89857-B994-44B6-9C4F-DBD200E9XXXX'), } model PushMeteringDataResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: PushMeteringDataResponseBody(name='body'), } /** * @summary Pushes metering data of an Alibaba Cloud Marketplace commodity. * * @param request PushMeteringDataRequest * @param runtime runtime options for this request RuntimeOptions * @return PushMeteringDataResponse */ async function pushMeteringDataWithOptions(request: PushMeteringDataRequest, runtime: Util.RuntimeOptions): PushMeteringDataResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.metering)) { query['Metering'] = request.metering; } if (!Util.isUnset(request.serviceInstanceId)) { query['ServiceInstanceId'] = request.serviceInstanceId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'PushMeteringData', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Pushes metering data of an Alibaba Cloud Marketplace commodity. * * @param request PushMeteringDataRequest * @return PushMeteringDataResponse */ async function pushMeteringData(request: PushMeteringDataRequest): PushMeteringDataResponse { var runtime = new Util.RuntimeOptions{}; return pushMeteringDataWithOptions(request, runtime); } model RegisterServiceRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.', example='10CM943JP0EN9D51H'), regionId?: string(name='RegionId', description='The region ID. This parameter is required.', example='cn-hangzhou'), serviceId?: string(name='ServiceId', description='The service ID. This parameter is required.', example='service-f7024a22ea5149xxxxxx'), } model RegisterServiceResponseBody = { registrationId?: string(name='RegistrationId', description='The registration ID.', example='sr-72dd5071e90c40xxxxxx'), requestId?: string(name='RequestId', description='The request ID.', example='A361BA9E-2713-52C8-AFFC-C26E5180456E'), } model RegisterServiceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: RegisterServiceResponseBody(name='body'), } /** * @summary Registers an artifact. * * @param request RegisterServiceRequest * @param runtime runtime options for this request RuntimeOptions * @return RegisterServiceResponse */ async function registerServiceWithOptions(request: RegisterServiceRequest, runtime: Util.RuntimeOptions): RegisterServiceResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'RegisterService', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Registers an artifact. * * @param request RegisterServiceRequest * @return RegisterServiceResponse */ async function registerService(request: RegisterServiceRequest): RegisterServiceResponse { var runtime = new Util.RuntimeOptions{}; return registerServiceWithOptions(request, runtime); } model RejectServiceUsageRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.', example='10CM943JP0EN9D51H'), comments?: string(name='Comments', description='Reject comments.', example='Thanks for your application, please add your industry information.'), serviceId?: string(name='ServiceId', description='The service ID. This parameter is required.', example='service-2117508c874c41xxxxxx'), type?: int32(name='Type', description='The share type of the service. Default value: SharedAccount. Valid values: * SharedAccount: The service is shared by multiple accounts. * Reseller: The service is distributed.', example='SharedAccount'), userAliUid?: long(name='UserAliUid', description='User ali uid. This parameter is required.', example='1563457855xxxxxx'), } model RejectServiceUsageResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='4DB0F536-B3BE-4F0D-BD29-E83FB56D550C'), } model RejectServiceUsageResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: RejectServiceUsageResponseBody(name='body'), } /** * @summary Reject service usage. * * @param request RejectServiceUsageRequest * @param runtime runtime options for this request RuntimeOptions * @return RejectServiceUsageResponse */ async function rejectServiceUsageWithOptions(request: RejectServiceUsageRequest, runtime: Util.RuntimeOptions): RejectServiceUsageResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.comments)) { query['Comments'] = request.comments; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.type)) { query['Type'] = request.type; } if (!Util.isUnset(request.userAliUid)) { query['UserAliUid'] = request.userAliUid; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'RejectServiceUsage', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Reject service usage. * * @param request RejectServiceUsageRequest * @return RejectServiceUsageResponse */ async function rejectServiceUsage(request: RejectServiceUsageRequest): RejectServiceUsageResponse { var runtime = new Util.RuntimeOptions{}; return rejectServiceUsageWithOptions(request, runtime); } model ReleaseArtifactRequest { artifactId?: string(name='ArtifactId', description='The ID of the artifact. This parameter is required.', example='artifact-9feded91880e4c78xxxx'), clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.', example='788E7CP0EN9D51P'), } model ReleaseArtifactResponseBody = { artifactId?: string(name='ArtifactId', description='The ID of the artifact.', example='artifact-9feded91880e4c78xxxx'), artifactProperty?: string(name='ArtifactProperty', description='The content of the artifact.', example='"{\\\\"Url\\\\":\\\\"https://computenest-artifacts-draft-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/130920852836xxxx/cn-hangzhou/service-8072a04e5a134382xxxx/165095355xxxx/changes.txt\\\\",\\\\"ConfigurationMetadata\\\\":\\\\"{\\\\\\\\\\\\"WorkDir\\\\\\\\\\\\":\\\\\\\\\\\\"/root\\\\\\\\\\\\",\\\\\\\\\\\\"Platform\\\\\\\\\\\\":\\\\\\\\\\\\"Linux\\\\\\\\\\\\",\\\\\\\\\\\\"CommandType\\\\\\\\\\\\":\\\\\\\\\\\\"RunShellScript\\\\\\\\\\\\",\\\\\\\\\\\\"UpgradeScript\\\\\\\\\\\\":\\\\\\\\\\\\"cd /root\\\\\\\\\\\\\\\\ncp changes.txt cpchanges.txt\\\\\\\\\\\\\\\\nmv changes.txt mvchangge.txt\\\\\\\\\\\\"}\\\\"}"'), artifactType?: string(name='ArtifactType', description='The type of the artifact.', example='File'), artifactVersion?: string(name='ArtifactVersion', description='The version of the artifact.', example='draft'), description?: string(name='Description', description='The description of the artifact.', example='Description'), gmtModified?: string(name='GmtModified', description='The time when the artifact was modified.', example='1650954178000'), requestId?: string(name='RequestId', description='The request ID.', example='3818BA7D-3F50-1A44-9FF3-04A52A59XXXX'), status?: string(name='Status', description='The state of the artifact. Valid values: * Created: The artifact is created. * Scanning: The artifact is being scanned. * ScanFailed: The artifact failed to be scanned. * Delivering: The artifact is being distributed. * Available: The artifact is available. * Deleted: The artifact is deleted.', example='Created'), versionName?: string(name='VersionName', description='The version name of the artifact.', example='V1.0'), } model ReleaseArtifactResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ReleaseArtifactResponseBody(name='body'), } /** * @summary Publishes an artifact. * * @param request ReleaseArtifactRequest * @param runtime runtime options for this request RuntimeOptions * @return ReleaseArtifactResponse */ async function releaseArtifactWithOptions(request: ReleaseArtifactRequest, runtime: Util.RuntimeOptions): ReleaseArtifactResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.artifactId)) { query['ArtifactId'] = request.artifactId; } if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ReleaseArtifact', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Publishes an artifact. * * @param request ReleaseArtifactRequest * @return ReleaseArtifactResponse */ async function releaseArtifact(request: ReleaseArtifactRequest): ReleaseArtifactResponse { var runtime = new Util.RuntimeOptions{}; return releaseArtifactWithOptions(request, runtime); } model RemoveServiceSharedAccountsRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.', example='10CM943JP0EN9D51H'), regionId?: string(name='RegionId', description='The region ID. This parameter is required.', example='cn-hangzhou'), serviceId?: string(name='ServiceId', description='The service ID. This parameter is required.', example='service-0e6fca6a51a54420****'), type?: string(name='Type', description='The share type of the service. Default value: SharedAccount. Valid values: * SharedAccount: The service is shared by multiple accounts. * Reseller: The service is distributed.', example='SharedAccount'), userAliUids?: [ long ](name='UserAliUids', description='Whitelist accounts for service sharing. This parameter is required.'), } model RemoveServiceSharedAccountsResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='4DB0F536-B3BE-4F0D-BD29-E83FB56D550C'), } model RemoveServiceSharedAccountsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: RemoveServiceSharedAccountsResponseBody(name='body'), } /** * @summary Remove service shared account. * * @param request RemoveServiceSharedAccountsRequest * @param runtime runtime options for this request RuntimeOptions * @return RemoveServiceSharedAccountsResponse */ async function removeServiceSharedAccountsWithOptions(request: RemoveServiceSharedAccountsRequest, runtime: Util.RuntimeOptions): RemoveServiceSharedAccountsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.type)) { query['Type'] = request.type; } if (!Util.isUnset(request.userAliUids)) { query['UserAliUids'] = request.userAliUids; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'RemoveServiceSharedAccounts', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Remove service shared account. * * @param request RemoveServiceSharedAccountsRequest * @return RemoveServiceSharedAccountsResponse */ async function removeServiceSharedAccounts(request: RemoveServiceSharedAccountsRequest): RemoveServiceSharedAccountsResponse { var runtime = new Util.RuntimeOptions{}; return removeServiceSharedAccountsWithOptions(request, runtime); } model RestartServiceInstanceRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.', example='10CM943JP0EN9****'), regionId?: string(name='RegionId', description='The region ID where the service instance resides. This parameter is required.', example='cn-hangzhou'), serviceInstanceId?: string(name='ServiceInstanceId', description='The ID of the service instance. This parameter is required.', example='si-d6ab3a63ccbb4b17****'), } model RestartServiceInstanceResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='B1A0198B-F316-1B72-B8DD-28B6F6D6XXXX'), } model RestartServiceInstanceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: RestartServiceInstanceResponseBody(name='body'), } /** * @summary When the service instance is Deployed, call the RestartServiceInstance interface to restart the service instance. * * @param request RestartServiceInstanceRequest * @param runtime runtime options for this request RuntimeOptions * @return RestartServiceInstanceResponse */ async function restartServiceInstanceWithOptions(request: RestartServiceInstanceRequest, runtime: Util.RuntimeOptions): RestartServiceInstanceResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceInstanceId)) { query['ServiceInstanceId'] = request.serviceInstanceId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'RestartServiceInstance', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary When the service instance is Deployed, call the RestartServiceInstance interface to restart the service instance. * * @param request RestartServiceInstanceRequest * @return RestartServiceInstanceResponse */ async function restartServiceInstance(request: RestartServiceInstanceRequest): RestartServiceInstanceResponse { var runtime = new Util.RuntimeOptions{}; return restartServiceInstanceWithOptions(request, runtime); } model RollbackServiceInstanceRequest { clientToken?: string(name='ClientToken', description='Ensures idempotence of the request. Generate a value from your client to ensure it is unique across different requests. **ClientToken** supports only ASCII characters and cannot exceed 64 characters.', example='10CM943JP0EN9D51H'), regionId?: string(name='RegionId', description='Region ID.', example='cn-hangzhou'), serviceInstanceId?: string(name='ServiceInstanceId', description='Service instance ID. You can obtain the service instance ID by calling [ListServiceInstances - Query Service Instance List](https://help.aliyun.com/document_detail/396200.html).', example='si-3a8f9a75da074f52b969'), } model RollbackServiceInstanceResponseBody = { requestId?: string(name='RequestId', description='Request ID.', example='EE9EF87D-46F8-5AF6-9A65-6B034E204136'), serviceInstanceId?: string(name='ServiceInstanceId', description='Service instance ID.', example='si-5289e1d6d0c14397881d'), status?: string(name='Status', description='The deployment status of the service instance. Possible values: - Created: Created - Deploying: Deploying - DeployedFailed: Deployment Failed - Deployed: Deployed - Upgrading: Upgrading - UpgradeRollbacking: Rolling Back - Deleting: Deleting - Deleted: Deleted - DeletedFailed: Deletion Failed', example='UpgradeRollbacking'), } model RollbackServiceInstanceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: RollbackServiceInstanceResponseBody(name='body'), } /** * @summary Rollback Service Instance * * @param request RollbackServiceInstanceRequest * @param runtime runtime options for this request RuntimeOptions * @return RollbackServiceInstanceResponse */ async function rollbackServiceInstanceWithOptions(request: RollbackServiceInstanceRequest, runtime: Util.RuntimeOptions): RollbackServiceInstanceResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceInstanceId)) { query['ServiceInstanceId'] = request.serviceInstanceId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'RollbackServiceInstance', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Rollback Service Instance * * @param request RollbackServiceInstanceRequest * @return RollbackServiceInstanceResponse */ async function rollbackServiceInstance(request: RollbackServiceInstanceRequest): RollbackServiceInstanceResponse { var runtime = new Util.RuntimeOptions{}; return rollbackServiceInstanceWithOptions(request, runtime); } model StartServiceInstanceRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.', example='10CM943JP0EN9****'), regionId?: string(name='RegionId', description='The region ID where the service instance resides. This parameter is required.', example='cn-hangzhou'), serviceInstanceId?: string(name='ServiceInstanceId', description='The ID of the service instance. This parameter is required.', example='si-d6ab3a63ccbb4b17****'), } model StartServiceInstanceResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='2E91D771-0183-52CE-86CB-882D99B2CB77'), } model StartServiceInstanceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: StartServiceInstanceResponseBody(name='body'), } /** * @summary When the service instance status is Stopped (Stopped) or StartFailed (Startup failed), the StartServiceInstance interface is invoked to start the service instance. * * @param request StartServiceInstanceRequest * @param runtime runtime options for this request RuntimeOptions * @return StartServiceInstanceResponse */ async function startServiceInstanceWithOptions(request: StartServiceInstanceRequest, runtime: Util.RuntimeOptions): StartServiceInstanceResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceInstanceId)) { query['ServiceInstanceId'] = request.serviceInstanceId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'StartServiceInstance', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary When the service instance status is Stopped (Stopped) or StartFailed (Startup failed), the StartServiceInstance interface is invoked to start the service instance. * * @param request StartServiceInstanceRequest * @return StartServiceInstanceResponse */ async function startServiceInstance(request: StartServiceInstanceRequest): StartServiceInstanceResponse { var runtime = new Util.RuntimeOptions{}; return startServiceInstanceWithOptions(request, runtime); } model StopServiceInstanceRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.', example='10CM943JP0EN9****'), regionId?: string(name='RegionId', description='The region id where the service instance resides. This parameter is required.', example='cn-hangzhou'), serviceInstanceId?: string(name='ServiceInstanceId', description='The ID of the service instance. This parameter is required.', example='si-c39ed4779cec449f****'), } model StopServiceInstanceResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='49A369EF-A302-5006-B0CE-94CED47C38CF'), } model StopServiceInstanceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: StopServiceInstanceResponseBody(name='body'), } /** * @summary When the service instance is Deployed and StopFailed, call the StopServiceInstance interface to stop the service instance. * * @param request StopServiceInstanceRequest * @param runtime runtime options for this request RuntimeOptions * @return StopServiceInstanceResponse */ async function stopServiceInstanceWithOptions(request: StopServiceInstanceRequest, runtime: Util.RuntimeOptions): StopServiceInstanceResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceInstanceId)) { query['ServiceInstanceId'] = request.serviceInstanceId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'StopServiceInstance', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary When the service instance is Deployed and StopFailed, call the StopServiceInstance interface to stop the service instance. * * @param request StopServiceInstanceRequest * @return StopServiceInstanceResponse */ async function stopServiceInstance(request: StopServiceInstanceRequest): StopServiceInstanceResponse { var runtime = new Util.RuntimeOptions{}; return stopServiceInstanceWithOptions(request, runtime); } model TagResourcesRequest { regionId?: string(name='RegionId', description='The region ID. This parameter is required.', example='cn-hangzhou'), resourceId?: [ string ](name='ResourceId', description='The resource IDs. You can specify at most 50 resource IDs in each call. This parameter is required.'), resourceType?: string(name='ResourceType', description='The resource type. Valid value: - service - serviceinstance - artifact This parameter is required.', example='service'), tag?: [ { key?: string(name='Key', description='The tag key.', example='Key1'), value?: string(name='Value', description='The tag value.', example='Value1'), } ](name='Tag', description='The tags.'), } model TagResourcesResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='06BF8F22-02DC-4750-83DF-3FFC11C065EA'), } model TagResourcesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: TagResourcesResponseBody(name='body'), } /** * @summary 给资源打标签 * * @param request TagResourcesRequest * @param runtime runtime options for this request RuntimeOptions * @return TagResourcesResponse */ async function tagResourcesWithOptions(request: TagResourcesRequest, runtime: Util.RuntimeOptions): TagResourcesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.resourceId)) { query['ResourceId'] = request.resourceId; } if (!Util.isUnset(request.resourceType)) { query['ResourceType'] = request.resourceType; } if (!Util.isUnset(request.tag)) { query['Tag'] = request.tag; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'TagResources', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary 给资源打标签 * * @param request TagResourcesRequest * @return TagResourcesResponse */ async function tagResources(request: TagResourcesRequest): TagResourcesResponse { var runtime = new Util.RuntimeOptions{}; return tagResourcesWithOptions(request, runtime); } model UnTagResourcesRequest { all?: boolean(name='All', description='Specifies whether to remove all tags from the resource. Valid values: * **true** * **false** > If you specify both the All and TagKey.N parameters, the All parameter does not take effect.', example='false'), regionId?: string(name='RegionId', description='The region ID. This parameter is required.', example='cn-hangzhou'), resourceId?: [ string ](name='ResourceId', description='The resource IDs. You can specify at most 50 resource IDs in each call. This parameter is required.'), resourceType?: string(name='ResourceType', description='The type of the resource. valid value: - service - serviceinstance - artifact This parameter is required.', example='service'), tagKey?: [ string ](name='TagKey', description='The tag keys. You can specify 1 to 20 tag keys.'), } model UnTagResourcesResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='06BF8F22-02DC-4750-83DF-3FFC11C065EA'), } model UnTagResourcesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UnTagResourcesResponseBody(name='body'), } /** * @summary 资源解绑标签 * * @param request UnTagResourcesRequest * @param runtime runtime options for this request RuntimeOptions * @return UnTagResourcesResponse */ async function unTagResourcesWithOptions(request: UnTagResourcesRequest, runtime: Util.RuntimeOptions): UnTagResourcesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.all)) { query['All'] = request.all; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.resourceId)) { query['ResourceId'] = request.resourceId; } if (!Util.isUnset(request.resourceType)) { query['ResourceType'] = request.resourceType; } if (!Util.isUnset(request.tagKey)) { query['TagKey'] = request.tagKey; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'UnTagResources', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary 资源解绑标签 * * @param request UnTagResourcesRequest * @return UnTagResourcesResponse */ async function unTagResources(request: UnTagResourcesRequest): UnTagResourcesResponse { var runtime = new Util.RuntimeOptions{}; return unTagResourcesWithOptions(request, runtime); } model UpdateArtifactRequest { artifactBuildProperty?: { buildArgs?: [ { argumentName?: string(name='ArgumentName', description='The name of a specific build argument.', example='ENV'), argumentValue?: string(name='ArgumentValue', description='The value of a specific build argument.', example='nginx:latest'), } ](name='BuildArgs', description='The build arguments used during the image build process. > This parameter is available only if the ArtifactBuildType is Dockerfile type.'), codeRepo?: { branch?: string(name='Branch', description='The name of the branch in the code repository.', example='main'), endpoint?: string(name='Endpoint', description='The endpoint. The URL address used to access the privately deployed GitLab instance.', example='http://121.40.25.0'), orgId?: string(name='OrgId', description='The organization ID.', example='455231'), owner?: string(name='Owner', description='The owner of the code repository. > This parameter is available only if the git repository is private.', example='aliyun-computenest'), platform?: string(name='Platform', description='The platform type. Valid values: - github - gitee - gitlab - codeup', example='github'), repoId?: long(name='RepoId', description='The repository ID.', example='103'), repoName?: string(name='RepoName', description='The name of the repository.', example='aliyun-computenest/quickstart-Lobexxx'), }(name='CodeRepo', description='The address of the code repository. > This parameter is available only if the ArtifactBuildType is Dockerfile or Buildpacks type.'), commandContent?: string(name='CommandContent', description='The command content. > This parameter is available only if the deployment package is a ecs image type.', example='echo "start run command"'), commandType?: string(name='CommandType', description='The command type. Valid values: * RunBatScript: batch command, applicable to Windows instances. * RunPowerShellScript: PowerShell command, applicable to Windows instances. * RunShellScript: shell command, applicable to Linux instances. > This parameter is available only if the deployment package is a ecs image type.', example='RunShellScript'), dockerfilePath?: string(name='DockerfilePath', description='The relative path to the Dockerfile within the code repository. > This parameter is available only if the ArtifactBuildType is Dockerfile type.', example='./file/Dockerfile'), regionId?: string(name='RegionId', description='The region ID where the source mirror image is located. > This parameter is available only if the deployment package is a ecs image type.', example='cn-hangzhou'), sourceContainerImage?: string(name='SourceContainerImage', description='The pull location of the source container image. This is used for the command docker pull ${SourceContainerImage}. > This parameter is available only if the ArtifactBuildType is ContainerImage type.', example='pytorch/pytorch:2.5.1-cuda12.4-cudnn9-devel'), sourceImageId?: string(name='SourceImageId', description='The source image id. Supported Types: - Image ID: Pass the Image ID of the Ecs image directly. - OOS Common Parameter Name: Obtain the corresponding Image ID automatically by using the OOS common parameter name. > This parameter is available only if the deployment package is a ecs image type.', example='Image ID:m-t4nhenrdc38pe4***** ubuntu_22_04_x64_20G_alibase_20240926.vhd OOS Common Parameter Name:aliyun/services/computenest/images/aliyun_3_2104_python_3_11'), }(name='ArtifactBuildProperty', description='The build properties of the artifact, utilized for hosting and building the deployment package.'), artifactId?: string(name='ArtifactId', description='The ID of the deployment package. This parameter is required.', example='artifact-eea08d1e2d3a43aexxxx'), artifactProperty?: { commodityCode?: string(name='CommodityCode', description='The commodity code of the service in Alibaba Cloud Marketplace. > This parameter is available only if the deployment package is an image.', example='cmjj00xxxx'), commodityVersion?: string(name='CommodityVersion', description='The commodity version of the service in Alibaba Cloud Marketplace. > This parameter is available only if the deployment package is an image.', example='V1.0'), imageId?: string(name='ImageId', description='The image ID. > This parameter is available only if the deployment package is an image.', example='m-0xij191j9cuev6ucxxxx'), regionId?: string(name='RegionId', description='The region ID. > This parameter is available only if the deployment package is an image.', example='cn-hangzhou'), repoId?: string(name='RepoId', description='The ID of the Container Registry repository. > This parameter is available only if the deployment package is a container image or of the Helm chart type.', example='crr-yy4g68uhi39ttkm8'), repoName?: string(name='RepoName', description='The name of the Container Registry repository. > This parameter is available only if the deployment package is a container image or of the Helm chart type.', example='volcanosh/vc-webhook-manager'), repoType?: string(name='RepoType', description='The type of the repository.Valid values: * `Public`: a public repository. * `Private`: a private repository. > This parameter is available only if the deployment package is a container image or of the Helm chart type.', example='Public'), tag?: string(name='Tag', description='The version tag of the image repository. > This parameter is available only if the deployment package is a container image or of the Helm chart type.', example='v1'), url?: string(name='Url', description='The URL of the deployment package object. > Note This parameter is available only if the deployment package is an file.', example='https://service-info-private.oss-cn-hangzhou.aliyuncs.com/1309208528xxxxxx/template/2e1ce8fc-xxxx-481c-9e8e-789ba9db487d.json'), }(name='ArtifactProperty', description='The properties of the deployment package.'), clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.', example='10CM943JP0EN9D51H'), description?: string(name='Description', description='The description of the deployment package.', example='Description'), permissionType?: string(name='PermissionType', description='Permission fields are applicable to container image artifact and Helm Chart artifact. They can only change from Automatic to Public. Options: Public Automatic', example='Public'), supportRegionIds?: [ string ](name='SupportRegionIds', description='The IDs of the regions that support the deployment package.'), versionName?: string(name='VersionName', description='The version name of the deployment package.', example='v1'), } model UpdateArtifactShrinkRequest { artifactBuildPropertyShrink?: string(name='ArtifactBuildProperty', description='The build properties of the artifact, utilized for hosting and building the deployment package.'), artifactId?: string(name='ArtifactId', description='The ID of the deployment package. This parameter is required.', example='artifact-eea08d1e2d3a43aexxxx'), artifactPropertyShrink?: string(name='ArtifactProperty', description='The properties of the deployment package.'), clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.', example='10CM943JP0EN9D51H'), description?: string(name='Description', description='The description of the deployment package.', example='Description'), permissionType?: string(name='PermissionType', description='Permission fields are applicable to container image artifact and Helm Chart artifact. They can only change from Automatic to Public. Options: Public Automatic', example='Public'), supportRegionIds?: [ string ](name='SupportRegionIds', description='The IDs of the regions that support the deployment package.'), versionName?: string(name='VersionName', description='The version name of the deployment package.', example='v1'), } model UpdateArtifactResponseBody = { artifactBuildProperty?: string(name='ArtifactBuildProperty', description='The build properties of the artifact, utilized for hosting and building the deployment package.', example='"{\\\\"RegionId\\\\":\\\\"xxx\\\\", \\\\"SourceImageId\\\\":\\\\"xxx\\\\", \\\\"\\\\":\\\\"xxx\\\\", \\\\"CommandType\\\\":\\\\"xxx\\\\", \\\\"CommandContent\\\\":\\\\"xxx\\\\"}"'), artifactBuildType?: string(name='ArtifactBuildType', description='The type of the deployment package to be built.', example='Dockerfile'), artifactId?: string(name='ArtifactId', description='The ID of the deployment package.', example='artifact-eea08d1e2d3a43aexxxx'), artifactProperty?: string(name='ArtifactProperty', description='The properties of the deployment package.', example='{\\\\"CommodityCode\\\\":\\\\"cmjj0005xxxx\\\\",\\\\"CommodityVersion\\\\":\\\\"V2022xxxx\\\\"}'), artifactType?: string(name='ArtifactType', description='The type of the deployment package.', example='EcsImage'), artifactVersion?: string(name='ArtifactVersion', description='The version of the deployment package.', example='2'), description?: string(name='Description', description='The description of the deployment package.', example='Description'), gmtModified?: string(name='GmtModified', description='The time when the deployment package was modified.', example='2022-10-20T02:19:55Z'), requestId?: string(name='RequestId', description='The request ID.', example='B1A0198B-F316-1B72-B8DD-28B6F6D6XXXX'), status?: string(name='Status', description='The status of the deployment package. Valid values: * Created: The deployment package is created. * Scanning: The deployment package is being scanned. * ScanFailed: The deployment package failed to be scanned. * Delivering: The deployment package is being distributed. * Available: The deployment package is available. * Deleted: The deployment package is deleted.', example='Available'), statusDetail?: string(name='StatusDetail', description='The status of the deployment package.', example='"/usr/local/share/aliyun-assist/work/script/t-hz04zm90y6og0sg.sh: line 1: pip: command not found"'), supportRegionIds?: string(name='SupportRegionIds', description='The ID of the region that supports the deployment package.', example='[ "cn-beijing", "cn-hangzhou", "cn-shanghai" ]'), versionName?: string(name='VersionName', description='The name of the deployment package.', example='v1'), } model UpdateArtifactResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UpdateArtifactResponseBody(name='body'), } /** * @summary Updates a deployment package. * * @param tmpReq UpdateArtifactRequest * @param runtime runtime options for this request RuntimeOptions * @return UpdateArtifactResponse */ async function updateArtifactWithOptions(tmpReq: UpdateArtifactRequest, runtime: Util.RuntimeOptions): UpdateArtifactResponse { Util.validateModel(tmpReq); var request = new UpdateArtifactShrinkRequest{}; OpenApiUtil.convert(tmpReq, request); if (!Util.isUnset(tmpReq.artifactBuildProperty)) { request.artifactBuildPropertyShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.artifactBuildProperty, 'ArtifactBuildProperty', 'json'); } if (!Util.isUnset(tmpReq.artifactProperty)) { request.artifactPropertyShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.artifactProperty, 'ArtifactProperty', 'json'); } var query = {}; if (!Util.isUnset(request.artifactBuildPropertyShrink)) { query['ArtifactBuildProperty'] = request.artifactBuildPropertyShrink; } if (!Util.isUnset(request.artifactId)) { query['ArtifactId'] = request.artifactId; } if (!Util.isUnset(request.artifactPropertyShrink)) { query['ArtifactProperty'] = request.artifactPropertyShrink; } if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.description)) { query['Description'] = request.description; } if (!Util.isUnset(request.permissionType)) { query['PermissionType'] = request.permissionType; } if (!Util.isUnset(request.supportRegionIds)) { query['SupportRegionIds'] = request.supportRegionIds; } if (!Util.isUnset(request.versionName)) { query['VersionName'] = request.versionName; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'UpdateArtifact', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Updates a deployment package. * * @param request UpdateArtifactRequest * @return UpdateArtifactResponse */ async function updateArtifact(request: UpdateArtifactRequest): UpdateArtifactResponse { var runtime = new Util.RuntimeOptions{}; return updateArtifactWithOptions(request, runtime); } model UpdateServiceRequest { alarmMetadata?: string(name='AlarmMetadata', description='The alert configurations of the service. > This parameter takes effect only when you specify an alert policy for **PolicyNames**.', example='{\\\\"CmsTemplateId\\\\":1162921,\\\\"TemplateUrl\\\\":\\\\"https://service-info-private.oss-cn-hangzhou.aliyuncs.com/1760465342xxxxxx/template/c072ef50-6c03-4d9c-8f0e-d1c440xxxxxx.json\\\\"}'), approvalType?: string(name='ApprovalType', description='The approval type of the service usage application. Valid values: * Manual: The application is manually approved. * AutoPass: The application is automatically approved.', example='Manual'), buildParameters?: string(name='BuildParameters'), clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.', example='788E7CP0EN9D51P'), commodity?: { componentsMappings?: [ { mappings?: map[string]string(name='Mappings', description='This parameter is not available to the public.'), templateName?: string(name='TemplateName', description='This parameter is not available to the public.', example='This parameter is not available to the public.'), } ](name='ComponentsMappings', description='This parameter is not available to the public.'), meteringEntityExtraInfos?: [ { entityId?: string(name='EntityId', description='Metering entity ID.', example='cmgj0006xxxx-Memory-1'), metricName?: string(name='MetricName', description='Metric name, required when type is ComputeNestBill or ComputeNestPrometheus.', example='VirtualCpu/ecs.InstanceType'), promql?: string(name='Promql', description='Promql statement.', example='avg_over_time(sum(rate(container_cpu_usage_seconds_total{namespace=~"ALIYUN::StackName"}[2m]))[1h:10s])'), type?: string(name='Type', description='Type. Valid values: - Custom - ComputeNestBill - ComputeNestPrometheus - ComputeNestTime', example='Custom'), } ](name='MeteringEntityExtraInfos', description='Metering entity extra information.'), meteringEntityMappings?: [ { entityIds?: [ string ](name='EntityIds', description='Metering entity IDs.'), specificationName?: string(name='SpecificationName', description='The specification name.', example='This parameter is not publicly accessible.'), templateName?: string(name='TemplateName', description='The template name.', example='The service ID.'), } ](name='MeteringEntityMappings', description='Binding relationship between templates/specifications and metering dimensions (marketplace - PayAsYouGo)'), saasBoostConfig?: string(name='SaasBoostConfig', description='SaaS Boost configuration.', example='{}'), specificationMappings?: [ { specificationCode?: string(name='SpecificationCode', description='Specification code.', example='yuncode5767800001'), specificationName?: string(name='SpecificationName', description='The name of the package specification.', example='Type, value: * **Custom** * **ComputeNestBill** * **ComputeNestPrometheus** * **ComputeNestTime**'), templateName?: string(name='TemplateName', description='The template name.', example='Product Specifications and Template/specification mapping Relationships (Cloud Marketplace - Subscription/Permanent Use)'), } ](name='SpecificationMappings', description='Product specifications and template/package mappings (Used in marketplace - subscription scenario)'), }(name='Commodity', description='The commodity details.'), complianceMetadata?: { compliancePacks?: [ string ](name='CompliancePacks', description='The compliance pack.'), }(name='ComplianceMetadata', description='Compliance check metadata.'), deployMetadata?: string(name='DeployMetadata', description='The deployment configurations of the service. The format in which the deployment information of a service is stored varies based on the deployment type of the service. In this case, the deployment information is stored in the JSON string format.', example='{\\\\"EstimateTime\\\\":null,\\\\"SupplierDeployMetadata\\\\":{\\\\"DeployTimeout\\\\":7200},\\\\"EnableVnc\\\\":false}'), deployType?: string(name='DeployType', description='The deployment type of the service. Valid values: ros: The service is deployed by using Resource Orchestration Service (ROS). terraform: The service is deployed by using Terraform. ack: The service is deployed by using Container Service for Kubernetes (ACK). spi: The service is deployed by calling a service provider interface (SPI). operation: The service is deployed by using a hosted O&M service.', example='ros'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run for the request to check information such as the permissions and instance status. Valid values: * true: performs a dry run for the request, but does not update a service. * false: performs a dry run for the request, and update a service if the request passes the dry run.', example='false'), duration?: long(name='Duration', description='The duration for which hosted O\\\\&M is implemented. Unit: seconds.', example='259200'), isSupportOperated?: boolean(name='IsSupportOperated', description='Specifies whether to enable the hosted O\\\\&M feature for the service. Default value: false. Valid values: * true * false > This parameter is required if you set **ServiceType** to **private**.', example='false'), licenseMetadata?: string(name='LicenseMetadata', description='The license metadata.', example='Metering Item Configuration Information (Cloud Marketplace - Pay-As-You-Go Use)'), logMetadata?: string(name='LogMetadata', description='The logging configurations.', example='Specifies whether to support distribution. Valid values: * false * true'), operationMetadata?: string(name='OperationMetadata', description='The hosted O\\\\&M configurations.', example='{\\\\"PrometheusConfigMap\\\\":{\\\\"Custom_Image_Ecs\\\\":{\\\\"EnablePrometheus\\\\":false}}}'), policyNames?: string(name='PolicyNames', description='The policy name. The name can be up to 128 characters in length. Separate multiple names with commas (,). Only hosted O\\\\&M policies are supported.', example='policyName1, policyName2'), regionId?: string(name='RegionId', description='Region ID. This parameter is required.', example='cn-hangzhou'), resellable?: boolean(name='Resellable', description='Whether resell is supported.', example='false'), serviceId?: string(name='ServiceId', description='The service ID. This parameter is required.', example='service-1dda29c3eca648xxxxxx'), serviceInfo?: [ { agreements?: [ { name?: string(name='Name', description='Protocol name.', example='Name'), url?: string(name='Url', description='Protocol url.', example='https://aliyun.com/xxxxxxxx.html'), } ](name='Agreements', description='Protocol document information about the service.'), image?: string(name='Image', description='The URL of the service icon.', example='http://img.tidb.oss.url'), locale?: string(name='Locale', description='The language of the service. Valid values: * zh-CN: Chinese * en-US: English', example='zh-CN'), longDescriptionUrl?: string(name='LongDescriptionUrl', description='The URL of the detailed description of the service.', example='http://description.tidb.oss.url'), name?: string(name='Name', description='The service name.', example='Metric Name, filled in when Type is ComputeNestBill or ComputeNestPrometheus'), shortDescription?: string(name='ShortDescription', description='The description of the service.', example='The URL of the detailed description of the service.'), softwares?: [ { name?: string(name='Name', description='The name of the software.', example='MySQL'), version?: string(name='Version', description='The version of the software.', example='5.7'), } ](name='Softwares', description='The list of the software in the service.'), } ](name='ServiceInfo', description='The service details.'), serviceType?: string(name='ServiceType', description='The service type. Valid values: * private: The service is a private service and is deployed within the account of a customer. * managed: The service is a fully managed service and is deployed within the account of a service provider. * operation: The service is a hosted O\\\\&M service.', example='private'), serviceVersion?: string(name='ServiceVersion', description='The service version.', example='1'), shareType?: string(name='ShareType', description='The permission type of the deployment URL. Valid values: * Public: All users can go to the URL to create a service instance or a trial service instance. * Restricted: Only users in the whitelist can go to the URL to create a service instance or a trial service instance. * OnlyFormalRestricted: Only users in the whitelist can go to the URL to create a service instance. * OnlyTrailRestricted: Only users in the whitelist can go to the URL to create a trial service instance. * Hidden: Users not in the whitelist cannot see the service details page when they go to the URL and cannot request deployment permissions.', example='Public'), tenantType?: string(name='TenantType', description='The type of the tenant. Valid values: * SingleTenant * MultiTenant', example='SingleTenant'), trialDuration?: int32(name='TrialDuration', description='The trial duration. Unit: day. The maximum trial duration cannot exceed 30 days.', example='7'), updateOption?: { updateArtifact?: boolean(name='UpdateArtifact', description='Whether to update artifact.', example='true'), updateFrom?: string(name='UpdateFrom', description='Update from. Valid values: - CODE - PARAMETERS', example='PARAMETERS'), }(name='UpdateOption', description='The update option.'), upgradeMetadata?: string(name='UpgradeMetadata', description='The metadata about the upgrade.', example='{\\\\"Description\\\\":\\\\"xxx\\\\",\\\\"SupportRollback\\\\":true,\\\\"SupportUpgradeFromVersions\\\\":[],\\\\"UpgradeComponents\\\\":[\\\\"Configuration\\\\"]}'), versionName?: string(name='VersionName', description='The version name.', example='Draft'), } model UpdateServiceShrinkRequest { alarmMetadata?: string(name='AlarmMetadata', description='The alert configurations of the service. > This parameter takes effect only when you specify an alert policy for **PolicyNames**.', example='{\\\\"CmsTemplateId\\\\":1162921,\\\\"TemplateUrl\\\\":\\\\"https://service-info-private.oss-cn-hangzhou.aliyuncs.com/1760465342xxxxxx/template/c072ef50-6c03-4d9c-8f0e-d1c440xxxxxx.json\\\\"}'), approvalType?: string(name='ApprovalType', description='The approval type of the service usage application. Valid values: * Manual: The application is manually approved. * AutoPass: The application is automatically approved.', example='Manual'), buildParameters?: string(name='BuildParameters'), clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.', example='788E7CP0EN9D51P'), commodityShrink?: string(name='Commodity', description='The commodity details.'), complianceMetadataShrink?: string(name='ComplianceMetadata', description='Compliance check metadata.'), deployMetadata?: string(name='DeployMetadata', description='The deployment configurations of the service. The format in which the deployment information of a service is stored varies based on the deployment type of the service. In this case, the deployment information is stored in the JSON string format.', example='{\\\\"EstimateTime\\\\":null,\\\\"SupplierDeployMetadata\\\\":{\\\\"DeployTimeout\\\\":7200},\\\\"EnableVnc\\\\":false}'), deployType?: string(name='DeployType', description='The deployment type of the service. Valid values: ros: The service is deployed by using Resource Orchestration Service (ROS). terraform: The service is deployed by using Terraform. ack: The service is deployed by using Container Service for Kubernetes (ACK). spi: The service is deployed by calling a service provider interface (SPI). operation: The service is deployed by using a hosted O&M service.', example='ros'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run for the request to check information such as the permissions and instance status. Valid values: * true: performs a dry run for the request, but does not update a service. * false: performs a dry run for the request, and update a service if the request passes the dry run.', example='false'), duration?: long(name='Duration', description='The duration for which hosted O\\\\&M is implemented. Unit: seconds.', example='259200'), isSupportOperated?: boolean(name='IsSupportOperated', description='Specifies whether to enable the hosted O\\\\&M feature for the service. Default value: false. Valid values: * true * false > This parameter is required if you set **ServiceType** to **private**.', example='false'), licenseMetadata?: string(name='LicenseMetadata', description='The license metadata.', example='Metering Item Configuration Information (Cloud Marketplace - Pay-As-You-Go Use)'), logMetadata?: string(name='LogMetadata', description='The logging configurations.', example='Specifies whether to support distribution. Valid values: * false * true'), operationMetadata?: string(name='OperationMetadata', description='The hosted O\\\\&M configurations.', example='{\\\\"PrometheusConfigMap\\\\":{\\\\"Custom_Image_Ecs\\\\":{\\\\"EnablePrometheus\\\\":false}}}'), policyNames?: string(name='PolicyNames', description='The policy name. The name can be up to 128 characters in length. Separate multiple names with commas (,). Only hosted O\\\\&M policies are supported.', example='policyName1, policyName2'), regionId?: string(name='RegionId', description='Region ID. This parameter is required.', example='cn-hangzhou'), resellable?: boolean(name='Resellable', description='Whether resell is supported.', example='false'), serviceId?: string(name='ServiceId', description='The service ID. This parameter is required.', example='service-1dda29c3eca648xxxxxx'), serviceInfo?: [ { agreements?: [ { name?: string(name='Name', description='Protocol name.', example='Name'), url?: string(name='Url', description='Protocol url.', example='https://aliyun.com/xxxxxxxx.html'), } ](name='Agreements', description='Protocol document information about the service.'), image?: string(name='Image', description='The URL of the service icon.', example='http://img.tidb.oss.url'), locale?: string(name='Locale', description='The language of the service. Valid values: * zh-CN: Chinese * en-US: English', example='zh-CN'), longDescriptionUrl?: string(name='LongDescriptionUrl', description='The URL of the detailed description of the service.', example='http://description.tidb.oss.url'), name?: string(name='Name', description='The service name.', example='Metric Name, filled in when Type is ComputeNestBill or ComputeNestPrometheus'), shortDescription?: string(name='ShortDescription', description='The description of the service.', example='The URL of the detailed description of the service.'), softwares?: [ { name?: string(name='Name', description='The name of the software.', example='MySQL'), version?: string(name='Version', description='The version of the software.', example='5.7'), } ](name='Softwares', description='The list of the software in the service.'), } ](name='ServiceInfo', description='The service details.'), serviceType?: string(name='ServiceType', description='The service type. Valid values: * private: The service is a private service and is deployed within the account of a customer. * managed: The service is a fully managed service and is deployed within the account of a service provider. * operation: The service is a hosted O\\\\&M service.', example='private'), serviceVersion?: string(name='ServiceVersion', description='The service version.', example='1'), shareType?: string(name='ShareType', description='The permission type of the deployment URL. Valid values: * Public: All users can go to the URL to create a service instance or a trial service instance. * Restricted: Only users in the whitelist can go to the URL to create a service instance or a trial service instance. * OnlyFormalRestricted: Only users in the whitelist can go to the URL to create a service instance. * OnlyTrailRestricted: Only users in the whitelist can go to the URL to create a trial service instance. * Hidden: Users not in the whitelist cannot see the service details page when they go to the URL and cannot request deployment permissions.', example='Public'), tenantType?: string(name='TenantType', description='The type of the tenant. Valid values: * SingleTenant * MultiTenant', example='SingleTenant'), trialDuration?: int32(name='TrialDuration', description='The trial duration. Unit: day. The maximum trial duration cannot exceed 30 days.', example='7'), updateOptionShrink?: string(name='UpdateOption', description='The update option.'), upgradeMetadata?: string(name='UpgradeMetadata', description='The metadata about the upgrade.', example='{\\\\"Description\\\\":\\\\"xxx\\\\",\\\\"SupportRollback\\\\":true,\\\\"SupportUpgradeFromVersions\\\\":[],\\\\"UpgradeComponents\\\\":[\\\\"Configuration\\\\"]}'), versionName?: string(name='VersionName', description='The version name.', example='Draft'), } model UpdateServiceResponseBody = { dryRunResult?: { rolePolicy?: { missingPolicy?: [ { action?: [ string ](name='Action', description='The Actions.'), resource?: string(name='Resource', description='The responses.', example='*'), serviceName?: string(name='ServiceName', description='The service name.', example='ecs'), } ](name='MissingPolicy', description='The missing ram policy for deploying role.'), policy?: string(name='Policy', description='The required ram policy for deploying role.', example='{ "Statement": [{ "Action": ["oos:CancelExecutions", "oos:DeleteExecutions", "oos:GetTemplate", "oos:ListExecutions", "oos:ListTemplates", "oos:NotifyExecution", "oos:StartExecution"], "Effect": "Allow", "Resource": "*" }, { "Action": ["ram:PassRole"], "Effect": "Allow", "Resource": "*" }, { "Action": ["ros:CreateStack", "ros:GetStack", "ros:UpdateStack", "ros:ListStackEvents", "ros:ListStackResources", "ros:ListStackResources", "ros:DeleteStack", "ram:GetRole"], "Effect": "Allow", "Resource": "*" }], "Version": "1" }'), }(name='RolePolicy', description='The required ram policy for deploying role.'), }(name='DryRunResult', description='The dry run result.'), requestId?: string(name='RequestId', description='The hosted O\\\\&M configurations.', example='DF0F666F-FBBC-55C3-A368-C955DE7B4839'), } model UpdateServiceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UpdateServiceResponseBody(name='body'), } /** * @summary Update a service. * * @param tmpReq UpdateServiceRequest * @param runtime runtime options for this request RuntimeOptions * @return UpdateServiceResponse */ async function updateServiceWithOptions(tmpReq: UpdateServiceRequest, runtime: Util.RuntimeOptions): UpdateServiceResponse { Util.validateModel(tmpReq); var request = new UpdateServiceShrinkRequest{}; OpenApiUtil.convert(tmpReq, request); if (!Util.isUnset(tmpReq.commodity)) { request.commodityShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.commodity, 'Commodity', 'json'); } if (!Util.isUnset(tmpReq.complianceMetadata)) { request.complianceMetadataShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.complianceMetadata, 'ComplianceMetadata', 'json'); } if (!Util.isUnset(tmpReq.updateOption)) { request.updateOptionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.updateOption, 'UpdateOption', 'json'); } var query = {}; if (!Util.isUnset(request.alarmMetadata)) { query['AlarmMetadata'] = request.alarmMetadata; } if (!Util.isUnset(request.approvalType)) { query['ApprovalType'] = request.approvalType; } if (!Util.isUnset(request.buildParameters)) { query['BuildParameters'] = request.buildParameters; } if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.commodityShrink)) { query['Commodity'] = request.commodityShrink; } if (!Util.isUnset(request.complianceMetadataShrink)) { query['ComplianceMetadata'] = request.complianceMetadataShrink; } if (!Util.isUnset(request.deployMetadata)) { query['DeployMetadata'] = request.deployMetadata; } if (!Util.isUnset(request.deployType)) { query['DeployType'] = request.deployType; } if (!Util.isUnset(request.dryRun)) { query['DryRun'] = request.dryRun; } if (!Util.isUnset(request.duration)) { query['Duration'] = request.duration; } if (!Util.isUnset(request.isSupportOperated)) { query['IsSupportOperated'] = request.isSupportOperated; } if (!Util.isUnset(request.licenseMetadata)) { query['LicenseMetadata'] = request.licenseMetadata; } if (!Util.isUnset(request.logMetadata)) { query['LogMetadata'] = request.logMetadata; } if (!Util.isUnset(request.operationMetadata)) { query['OperationMetadata'] = request.operationMetadata; } if (!Util.isUnset(request.policyNames)) { query['PolicyNames'] = request.policyNames; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.resellable)) { query['Resellable'] = request.resellable; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.serviceInfo)) { query['ServiceInfo'] = request.serviceInfo; } if (!Util.isUnset(request.serviceType)) { query['ServiceType'] = request.serviceType; } if (!Util.isUnset(request.serviceVersion)) { query['ServiceVersion'] = request.serviceVersion; } if (!Util.isUnset(request.shareType)) { query['ShareType'] = request.shareType; } if (!Util.isUnset(request.tenantType)) { query['TenantType'] = request.tenantType; } if (!Util.isUnset(request.trialDuration)) { query['TrialDuration'] = request.trialDuration; } if (!Util.isUnset(request.updateOptionShrink)) { query['UpdateOption'] = request.updateOptionShrink; } if (!Util.isUnset(request.upgradeMetadata)) { query['UpgradeMetadata'] = request.upgradeMetadata; } if (!Util.isUnset(request.versionName)) { query['VersionName'] = request.versionName; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'UpdateService', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Update a service. * * @param request UpdateServiceRequest * @return UpdateServiceResponse */ async function updateService(request: UpdateServiceRequest): UpdateServiceResponse { var runtime = new Util.RuntimeOptions{}; return updateServiceWithOptions(request, runtime); } model UpdateServiceInstanceAttributeRequest { endTime?: string(name='EndTime', description='The time when the service instance expires. Use the UTC time format: yyyy-MM-ddTHH:mmZ', example='2023-12-25T02:28:40Z'), licenseData?: { customData?: string(name='CustomData', description='The Custom Data', example='{"Test"}'), }(name='LicenseData', description='The License Data'), reason?: string(name='Reason', description='Application reason, currently used for trial application extension.', example='\\\\"\\\\"'), regionId?: string(name='RegionId', description='The region ID. This parameter is required.', example='cn-hangzhou'), serviceInstanceId?: string(name='ServiceInstanceId', description='The service instance ID. This parameter is required.', example='si-3df88e962cdexxxxxxxx'), } model UpdateServiceInstanceAttributeShrinkRequest { endTime?: string(name='EndTime', description='The time when the service instance expires. Use the UTC time format: yyyy-MM-ddTHH:mmZ', example='2023-12-25T02:28:40Z'), licenseDataShrink?: string(name='LicenseData', description='The License Data'), reason?: string(name='Reason', description='Application reason, currently used for trial application extension.', example='\\\\"\\\\"'), regionId?: string(name='RegionId', description='The region ID. This parameter is required.', example='cn-hangzhou'), serviceInstanceId?: string(name='ServiceInstanceId', description='The service instance ID. This parameter is required.', example='si-3df88e962cdexxxxxxxx'), } model UpdateServiceInstanceAttributeResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='0CB2E0A9-B4DF-5C16-86AD-C511C483144B'), } model UpdateServiceInstanceAttributeResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UpdateServiceInstanceAttributeResponseBody(name='body'), } /** * @summary Updates the properties of a service instance. * * @param tmpReq UpdateServiceInstanceAttributeRequest * @param runtime runtime options for this request RuntimeOptions * @return UpdateServiceInstanceAttributeResponse */ async function updateServiceInstanceAttributeWithOptions(tmpReq: UpdateServiceInstanceAttributeRequest, runtime: Util.RuntimeOptions): UpdateServiceInstanceAttributeResponse { Util.validateModel(tmpReq); var request = new UpdateServiceInstanceAttributeShrinkRequest{}; OpenApiUtil.convert(tmpReq, request); if (!Util.isUnset(tmpReq.licenseData)) { request.licenseDataShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.licenseData, 'LicenseData', 'json'); } var query = {}; if (!Util.isUnset(request.endTime)) { query['EndTime'] = request.endTime; } if (!Util.isUnset(request.licenseDataShrink)) { query['LicenseData'] = request.licenseDataShrink; } if (!Util.isUnset(request.reason)) { query['Reason'] = request.reason; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceInstanceId)) { query['ServiceInstanceId'] = request.serviceInstanceId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'UpdateServiceInstanceAttribute', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Updates the properties of a service instance. * * @param request UpdateServiceInstanceAttributeRequest * @return UpdateServiceInstanceAttributeResponse */ async function updateServiceInstanceAttribute(request: UpdateServiceInstanceAttributeRequest): UpdateServiceInstanceAttributeResponse { var runtime = new Util.RuntimeOptions{}; return updateServiceInstanceAttributeWithOptions(request, runtime); } model UpdateServiceInstanceSpecRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.', example='10CM943JP0EN9D51H'), enableUserPrometheus?: boolean(name='EnableUserPrometheus', description='Specifies whether to enable Prometheus on the customer side. Valid values: * true * false', example='true'), operationName?: string(name='OperationName', description='The name of the configuration update operation.', example='package modify'), parameters?: map[string]any(name='Parameters', description='The configuration parameters of the service instance.', example='{\\\\"EcsInstanceParameter\\\\":\\\\"4vCPU 8GiB\\\\",\\\\"ZoneId\\\\":\\\\"cn-heyuan-a\\\\",\\\\"SystemDiskSize\\\\":50,\\\\"DataDiskSize\\\\":150,\\\\"InternetMaxBandwidthOut\\\\":2,\\\\"RegionId\\\\":\\\\"cn-heyuan\\\\"}'), predefinedParametersName?: string(name='PredefinedParametersName', description='The name of the specification package.', example='package one'), serviceInstanceId?: string(name='ServiceInstanceId', description='The service instance ID.', example='si-0e6fca6a51a54420****'), } model UpdateServiceInstanceSpecShrinkRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.', example='10CM943JP0EN9D51H'), enableUserPrometheus?: boolean(name='EnableUserPrometheus', description='Specifies whether to enable Prometheus on the customer side. Valid values: * true * false', example='true'), operationName?: string(name='OperationName', description='The name of the configuration update operation.', example='package modify'), parametersShrink?: string(name='Parameters', description='The configuration parameters of the service instance.', example='{\\\\"EcsInstanceParameter\\\\":\\\\"4vCPU 8GiB\\\\",\\\\"ZoneId\\\\":\\\\"cn-heyuan-a\\\\",\\\\"SystemDiskSize\\\\":50,\\\\"DataDiskSize\\\\":150,\\\\"InternetMaxBandwidthOut\\\\":2,\\\\"RegionId\\\\":\\\\"cn-heyuan\\\\"}'), predefinedParametersName?: string(name='PredefinedParametersName', description='The name of the specification package.', example='package one'), serviceInstanceId?: string(name='ServiceInstanceId', description='The service instance ID.', example='si-0e6fca6a51a54420****'), } model UpdateServiceInstanceSpecResponseBody = { orderId?: string(name='OrderId', description='The order ID.', example='2306175xxxxxxxx'), requestId?: string(name='RequestId', description='The request ID.', example='DF0F666F-FBBC-55C3-A368-C955DE7B4839'), } model UpdateServiceInstanceSpecResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UpdateServiceInstanceSpecResponseBody(name='body'), } /** * @summary Updates the configurations of a service instance. * * @param tmpReq UpdateServiceInstanceSpecRequest * @param runtime runtime options for this request RuntimeOptions * @return UpdateServiceInstanceSpecResponse */ async function updateServiceInstanceSpecWithOptions(tmpReq: UpdateServiceInstanceSpecRequest, runtime: Util.RuntimeOptions): UpdateServiceInstanceSpecResponse { Util.validateModel(tmpReq); var request = new UpdateServiceInstanceSpecShrinkRequest{}; OpenApiUtil.convert(tmpReq, request); if (!Util.isUnset(tmpReq.parameters)) { request.parametersShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.parameters, 'Parameters', 'json'); } var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.enableUserPrometheus)) { query['EnableUserPrometheus'] = request.enableUserPrometheus; } if (!Util.isUnset(request.operationName)) { query['OperationName'] = request.operationName; } if (!Util.isUnset(request.parametersShrink)) { query['Parameters'] = request.parametersShrink; } if (!Util.isUnset(request.predefinedParametersName)) { query['PredefinedParametersName'] = request.predefinedParametersName; } if (!Util.isUnset(request.serviceInstanceId)) { query['ServiceInstanceId'] = request.serviceInstanceId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'UpdateServiceInstanceSpec', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Updates the configurations of a service instance. * * @param request UpdateServiceInstanceSpecRequest * @return UpdateServiceInstanceSpecResponse */ async function updateServiceInstanceSpec(request: UpdateServiceInstanceSpecRequest): UpdateServiceInstanceSpecResponse { var runtime = new Util.RuntimeOptions{}; return updateServiceInstanceSpecWithOptions(request, runtime); } model UpdateServiceTestCaseRequest { regionId?: string(name='RegionId', description='The region ID.', example='cn-hangzhou'), testCaseId?: string(name='TestCaseId', description='The service test case id. This parameter is required.', example='stc-2deec15c20b24aaf9f16'), testCaseName?: string(name='TestCaseName', description='The service test case name. This parameter is required.', example='case1'), testConfig?: string(name='TestConfig', description='The service test config. This parameter is required.', example='--- parameters: PayType: "PostPaid" EcsInstanceType: "$[iact3-auto]" InstancePassword: "$[iact3-auto]"'), } model UpdateServiceTestCaseResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='DB1FA13E-1087-5654-84D5-58A0ACAD1B18'), } model UpdateServiceTestCaseResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UpdateServiceTestCaseResponseBody(name='body'), } /** * @summary 修改服务测试用例 * * @param request UpdateServiceTestCaseRequest * @param runtime runtime options for this request RuntimeOptions * @return UpdateServiceTestCaseResponse */ async function updateServiceTestCaseWithOptions(request: UpdateServiceTestCaseRequest, runtime: Util.RuntimeOptions): UpdateServiceTestCaseResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.testCaseId)) { query['TestCaseId'] = request.testCaseId; } if (!Util.isUnset(request.testCaseName)) { query['TestCaseName'] = request.testCaseName; } if (!Util.isUnset(request.testConfig)) { query['TestConfig'] = request.testConfig; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'UpdateServiceTestCase', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary 修改服务测试用例 * * @param request UpdateServiceTestCaseRequest * @return UpdateServiceTestCaseResponse */ async function updateServiceTestCase(request: UpdateServiceTestCaseRequest): UpdateServiceTestCaseResponse { var runtime = new Util.RuntimeOptions{}; return updateServiceTestCaseWithOptions(request, runtime); } model UpdateSharedAccountPermissionRequest { clientToken?: string(name='ClientToken', description='Client token, used to ensure the idempotence of requests. Generate a unique value for this parameter from your client to ensure it is unique across different requests. ClientToken supports only ASCII characters.', example='10CM943JP0EN9D51H'), permission?: string(name='Permission', description='Permission type. Possible values: - Deployable: Can be deployed. - Accessible: Can be accessed. - AccessibleIncludeBeta: Can access all versions, including Beta versions. - DeployableIncludeBeta: Can deploy all versions, including Beta versions. - Authorized: Authorized (for reselling scenarios) - Unauthorized: Unauthorized (for reselling scenarios) This parameter is required.', example='Deployable'), regionId?: string(name='RegionId', description='Region ID. This parameter is required.', example='cn-hangzhou'), serviceId?: string(name='ServiceId', description='Service ID. This parameter is required.', example='service-0d6e1d846e4c4axxxxxx'), type?: string(name='Type', description='Service sharing type, with a default value of SharedAccount. Available options: - SharedAccount: Regular sharing type. - Reseller: Reselling sharing type.', example='SharedAccount'), userAliUid?: long(name='UserAliUid', description='Whitelist account for service sharing. This parameter is required.', example='1563457855xxxxxx'), } model UpdateSharedAccountPermissionResponseBody = { requestId?: string(name='RequestId', description='RequestId', example='C68B41B4-A646-5680-8A33-67884E3823A8'), } model UpdateSharedAccountPermissionResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UpdateSharedAccountPermissionResponseBody(name='body'), } /** * @summary Update Service Sharing Permissions * * @param request UpdateSharedAccountPermissionRequest * @param runtime runtime options for this request RuntimeOptions * @return UpdateSharedAccountPermissionResponse */ async function updateSharedAccountPermissionWithOptions(request: UpdateSharedAccountPermissionRequest, runtime: Util.RuntimeOptions): UpdateSharedAccountPermissionResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.permission)) { query['Permission'] = request.permission; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.type)) { query['Type'] = request.type; } if (!Util.isUnset(request.userAliUid)) { query['UserAliUid'] = request.userAliUid; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'UpdateSharedAccountPermission', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Update Service Sharing Permissions * * @param request UpdateSharedAccountPermissionRequest * @return UpdateSharedAccountPermissionResponse */ async function updateSharedAccountPermission(request: UpdateSharedAccountPermissionRequest): UpdateSharedAccountPermissionResponse { var runtime = new Util.RuntimeOptions{}; return updateSharedAccountPermissionWithOptions(request, runtime); } model UpdateSupplierInformationRequest { deliverySettings?: { ossBucketName?: string(name='OssBucketName', description='The name of the OSS bucket.', example='mybucket'), ossEnabled?: boolean(name='OssEnabled', description='Specifies whether to enable screencast delivery to Object Storage Service (OSS). Valid values: * true * false', example='false'), ossExpirationDays?: long(name='OssExpirationDays', description='The number of days for which the screencasts are saved.', example='7'), ossPath?: string(name='OssPath', description='The OSS path.', example='path1/path2/'), }(name='DeliverySettings', description='The delivery settings.'), operationIp?: string(name='OperationIp', description='The Ip of operation.', example='192.xxx.xxx.xxx/16,192.xxx.xxx.xxx'), operationMfaPresent?: boolean(name='OperationMfaPresent', description='The MFA of operation.', example='true'), regionId?: string(name='RegionId', description='Region ID. This parameter is required.', example='cn-hangzhou'), supplierDesc?: string(name='SupplierDesc', description='The description of service provider.', example='Test supplier'), supplierLogo?: string(name='SupplierLogo', description='The Logo of service provider.', example='http://example.aliyundoc.com/cover/34DB-4F4C-9373-003AA060****.png'), supplierUrl?: string(name='SupplierUrl', description='The URL of the service provider.', example='http://www.xxx.xxx.cn'), supportContacts?: [ { type?: string(name='Type', description='The type of contact information', example='Email'), value?: string(name='Value', description='The value of contact information', example='supplier@example.com'), } ](name='SupportContacts', description='Contact information of the service provider'), } model UpdateSupplierInformationResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='51945B04-6AA6-410D-93BA-236E0248B104'), supplierDesc?: string(name='SupplierDesc', description='The description of service provider.', example='Test supplier'), supplierName?: string(name='SupplierName', description='The name of the service provider.', example='Alibaba Cloud'), supplierUrl?: string(name='SupplierUrl', description='The URL of the service provider.', example='http://www.xxx.xxx.cn'), } model UpdateSupplierInformationResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UpdateSupplierInformationResponseBody(name='body'), } /** * @summary 更新供应商全局信息 * * @param request UpdateSupplierInformationRequest * @param runtime runtime options for this request RuntimeOptions * @return UpdateSupplierInformationResponse */ async function updateSupplierInformationWithOptions(request: UpdateSupplierInformationRequest, runtime: Util.RuntimeOptions): UpdateSupplierInformationResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.deliverySettings)) { query['DeliverySettings'] = request.deliverySettings; } if (!Util.isUnset(request.operationIp)) { query['OperationIp'] = request.operationIp; } if (!Util.isUnset(request.operationMfaPresent)) { query['OperationMfaPresent'] = request.operationMfaPresent; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.supplierDesc)) { query['SupplierDesc'] = request.supplierDesc; } if (!Util.isUnset(request.supplierLogo)) { query['SupplierLogo'] = request.supplierLogo; } if (!Util.isUnset(request.supplierUrl)) { query['SupplierUrl'] = request.supplierUrl; } if (!Util.isUnset(request.supportContacts)) { query['SupportContacts'] = request.supportContacts; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'UpdateSupplierInformation', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary 更新供应商全局信息 * * @param request UpdateSupplierInformationRequest * @return UpdateSupplierInformationResponse */ async function updateSupplierInformation(request: UpdateSupplierInformationRequest): UpdateSupplierInformationResponse { var runtime = new Util.RuntimeOptions{}; return updateSupplierInformationWithOptions(request, runtime); } model UpgradeServiceInstanceRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.', example='10CM943JP0EN9D51H'), dryRun?: string(name='DryRun', description='Specifies whether to perform only a dry run for the request to check information such as the permissions and instance status. Valid values: * true: performs a dry run for the request, but does not create a service instance. * false: performs a dry run for the request, and creates a service instance if the request passes the dry run.', example='false'), parameters?: map[string]any(name='Parameters', description='The configuration parameters of the service instance.', example='{ "param": "value" }'), regionId?: string(name='RegionId', description='The region ID.', example='cn-hangzhou'), serviceInstanceId?: string(name='ServiceInstanceId', description='The ID of the service instance.', example='si-5cbae874da0e47xxxxxx'), serviceVersion?: string(name='ServiceVersion', description='The service version.', example='2'), } model UpgradeServiceInstanceShrinkRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.', example='10CM943JP0EN9D51H'), dryRun?: string(name='DryRun', description='Specifies whether to perform only a dry run for the request to check information such as the permissions and instance status. Valid values: * true: performs a dry run for the request, but does not create a service instance. * false: performs a dry run for the request, and creates a service instance if the request passes the dry run.', example='false'), parametersShrink?: string(name='Parameters', description='The configuration parameters of the service instance.', example='{ "param": "value" }'), regionId?: string(name='RegionId', description='The region ID.', example='cn-hangzhou'), serviceInstanceId?: string(name='ServiceInstanceId', description='The ID of the service instance.', example='si-5cbae874da0e47xxxxxx'), serviceVersion?: string(name='ServiceVersion', description='The service version.', example='2'), } model UpgradeServiceInstanceResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='F224E002-AB0E-5FD9-A87E-54AEE56F6CAE'), serviceInstanceId?: string(name='ServiceInstanceId', description='The ID of the service instance.', example='si-5cbae874da0e47xxxxxx'), status?: string(name='Status', description='The deployment state of the service instance. Valid values: * Created * Deploying * DeployedFailed * Deployed * Upgrading * Deleting * Deleted * DeletedFailed', example='Created'), upgradeRequiredParameters?: [ string ](name='UpgradeRequiredParameters', description='The parameters required for the upgrade.'), } model UpgradeServiceInstanceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UpgradeServiceInstanceResponseBody(name='body'), } /** * @summary Upgrades a service instance. * * @param tmpReq UpgradeServiceInstanceRequest * @param runtime runtime options for this request RuntimeOptions * @return UpgradeServiceInstanceResponse */ async function upgradeServiceInstanceWithOptions(tmpReq: UpgradeServiceInstanceRequest, runtime: Util.RuntimeOptions): UpgradeServiceInstanceResponse { Util.validateModel(tmpReq); var request = new UpgradeServiceInstanceShrinkRequest{}; OpenApiUtil.convert(tmpReq, request); if (!Util.isUnset(tmpReq.parameters)) { request.parametersShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.parameters, 'Parameters', 'json'); } var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.dryRun)) { query['DryRun'] = request.dryRun; } if (!Util.isUnset(request.parametersShrink)) { query['Parameters'] = request.parametersShrink; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceInstanceId)) { query['ServiceInstanceId'] = request.serviceInstanceId; } if (!Util.isUnset(request.serviceVersion)) { query['ServiceVersion'] = request.serviceVersion; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'UpgradeServiceInstance', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Upgrades a service instance. * * @param request UpgradeServiceInstanceRequest * @return UpgradeServiceInstanceResponse */ async function upgradeServiceInstance(request: UpgradeServiceInstanceRequest): UpgradeServiceInstanceResponse { var runtime = new Util.RuntimeOptions{}; return upgradeServiceInstanceWithOptions(request, runtime); } model WithdrawServiceRequest { clientToken?: string(name='ClientToken', description='Client token, used to ensure the idempotence of requests. Generate a unique value for this parameter from your client to ensure it is unique across different requests. ClientToken supports only ASCII characters.', example='788E7CP0EN9D51P'), regionId?: string(name='RegionId', description='Region ID. This parameter is required.', example='cn-hangzhou'), serviceId?: string(name='ServiceId', description='Service ID. This parameter is required.', example='service-0e6fca6a51a544xxxxxx'), serviceVersion?: string(name='ServiceVersion', description='Service version. This parameter is required.', example='1.0'), } model WithdrawServiceResponseBody = { requestId?: string(name='RequestId', description='Request ID.', example='4DB0F536-B3BE-4F0D-BD29-E83FB56D550C'), } model WithdrawServiceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: WithdrawServiceResponseBody(name='body'), } /** * @summary Withdraw service version. * * @param request WithdrawServiceRequest * @param runtime runtime options for this request RuntimeOptions * @return WithdrawServiceResponse */ async function withdrawServiceWithOptions(request: WithdrawServiceRequest, runtime: Util.RuntimeOptions): WithdrawServiceResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.serviceVersion)) { query['ServiceVersion'] = request.serviceVersion; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'WithdrawService', version = '2021-05-21', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * @summary Withdraw service version. * * @param request WithdrawServiceRequest * @return WithdrawServiceResponse */ async function withdrawService(request: WithdrawServiceRequest): WithdrawServiceResponse { var runtime = new Util.RuntimeOptions{}; return withdrawServiceWithOptions(request, runtime); }