ververica-20220718/main.tea (6,517 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('ververica', @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 Artifact { jarArtifact?: JarArtifact(name='jarArtifact'), kind?: string(name='kind', example='SQLSCRIPT'), pythonArtifact?: PythonArtifact(name='pythonArtifact'), sqlArtifact?: SqlArtifact(name='sqlArtifact'), } model AsyncDraftDeployResult { artifactValidationDetail?: ValidateStatementResult(name='artifactValidationDetail'), deploymentId?: string(name='deploymentId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), message?: string(name='message', example='"Validation error: SQL validate failed"'), success?: boolean(name='success', example='true'), ticketStatus?: string(name='ticketStatus', example='FINISHED'), } model AsyncResourcePlanOperationResult { message?: string(name='message', example='""'), plan?: string(name='plan', example='{\\"ssgProfiles\\":[{\\"name\\":\\"default\\",\\"cpu\\":1.13,\\"heap\\":\\"1 gb\\",\\"offHeap\\":\\"32 mb\\",\\"managed\\":{},\\"extended\\":{}}],\\"nodes\\":[{\\"id\\":1,\\"type\\":\\"StreamExecTableSourceScan\\",\\"desc\\":\\"Source: datagen_source[78]\\",\\"profile\\":{\\"group\\":\\"default\\",\\"parallelism\\":1,\\"maxParallelism\\":32768,\\"minParallelism\\":1}},{\\"id\\":2,\\"type\\":\\"StreamExecSink\\",\\"desc\\":\\"Sink: blackhole_sink[79]\\",\\"profile\\":{\\"group\\":\\"default\\",\\"parallelism\\":1,\\"maxParallelism\\":32768,\\"minParallelism\\":1}}],\\"edges\\":[{\\"source\\":1,\\"target\\":2,\\"mode\\":\\"PIPELINED\\",\\"strategy\\":\\"FORWARD\\"}],\\"vertices\\":{\\"717c7b8afebbfb7137f6f0f99beb2a94\\":[1,2]}}'), ticketStatus?: string(name='ticketStatus', example='FINISHED'), } model BasicResourceSetting { jobmanagerResourceSettingSpec?: BasicResourceSettingSpec(name='jobmanagerResourceSettingSpec'), parallelism?: long(name='parallelism', example='4'), taskmanagerResourceSettingSpec?: BasicResourceSettingSpec(name='taskmanagerResourceSettingSpec'), } model BasicResourceSettingSpec { cpu?: double(name='cpu', example='2.0'), memory?: string(name='memory', example='4Gi'), } model BatchResourceSetting { basicResourceSetting?: BasicResourceSetting(name='basicResourceSetting'), maxSlot?: long(name='maxSlot', example='10'), } model BriefDeploymentTarget { mode?: string(name='mode'), name?: string(name='name'), } model BriefResourceSetting { batchResourceSetting?: BatchResourceSetting(name='batchResourceSetting'), flinkConf?: map[string]any(name='flinkConf'), streamingResourceSetting?: StreamingResourceSetting(name='streamingResourceSetting'), } model Catalog { name?: string(name='name'), properties?: map[string]any(name='properties'), } model Connector { creator?: string(name='creator'), creatorName?: string(name='creatorName'), dependencies?: [ string ](name='dependencies'), lookup?: boolean(name='lookup'), modifier?: string(name='modifier'), modifierName?: string(name='modifierName'), name?: string(name='name'), properties?: [ Property ](name='properties'), sink?: boolean(name='sink'), source?: boolean(name='source'), supportedFormats?: [ string ](name='supportedFormats'), type?: string(name='type'), } model CreateUdfArtifactResult { collidingClasses?: [ UdfClass ](name='collidingClasses'), createSuccess?: boolean(name='createSuccess'), message?: string(name='message'), udfArtifact?: UdfArtifact(name='udfArtifact'), } model Database { comment?: string(name='comment'), name?: string(name='name'), properties?: map[string]any(name='properties'), } model DeleteUdfArtifactResult { deleteSuccess?: boolean(name='deleteSuccess'), message?: string(name='message'), referencedClasses?: [ UdfClass ](name='referencedClasses'), } model Deployment { artifact?: Artifact(name='artifact'), batchResourceSetting?: BatchResourceSetting(name='batchResourceSetting'), createdAt?: string(name='createdAt'), creator?: string(name='creator', example='27846363877456****'), creatorName?: string(name='creatorName', example='****@streamcompute.onaliyun.com'), deploymentHasChanged?: boolean(name='deploymentHasChanged', example='true'), deploymentId?: string(name='deploymentId', example='00000000-0000-0000-0000-000000000001'), deploymentTarget?: BriefDeploymentTarget(name='deploymentTarget'), description?: string(name='description', example='this is a deployment description'), engineVersion?: string(name='engineVersion', example='vvr-6.0.0-flink-1.15'), executionMode?: string(name='executionMode', example='STREAMING | BATCH'), flinkConf?: map[string]any(name='flinkConf', example='{"taskmanager.numberOfTaskSlots":"1"}'), jobSummary?: JobSummary(name='jobSummary'), labels?: map[string]any(name='labels'), localVariables?: [ LocalVariable ](name='localVariables'), logging?: Logging(name='logging'), modifiedAt?: string(name='modifiedAt'), modifier?: string(name='modifier', example='27846363877456****'), modifierName?: string(name='modifierName', example='****@streamcompute.onaliyun.com'), name?: string(name='name', example='deploymentName'), namespace?: string(name='namespace', example='default-namespace'), referencedDeploymentDraftId?: string(name='referencedDeploymentDraftId', example='00000000-0000-0000-0000-000000000003'), streamingResourceSetting?: StreamingResourceSetting(name='streamingResourceSetting'), workspace?: string(name='workspace', example='edcef******b4f'), } model DeploymentDraft { artifact?: Artifact(name='artifact'), createdAt?: long(name='createdAt'), creator?: string(name='creator', example='27846363877456****'), creatorName?: string(name='creatorName', example='****@streamcompute.onaliyun.com'), deploymentDraftId?: string(name='deploymentDraftId', example='00000000-0000-0000-0000-00000012****'), engineVersion?: string(name='engineVersion', example='vvr-6.0.7-flink-1.15'), executionMode?: string(name='executionMode', example='STREAMING'), labels?: map[string]any(name='labels'), localVariables?: [ LocalVariable ](name='localVariables'), lock?: Lock(name='lock'), modifiedAt?: long(name='modifiedAt'), modifier?: string(name='modifier', example='27846363877456****'), modifierName?: string(name='modifierName', example='****@streamcompute.onaliyun.com'), name?: string(name='name', example='test-draft'), namespace?: string(name='namespace', example='default-namespace'), parentId?: string(name='parentId', example='00000000-0000-0000-0000-00000013****'), referencedDeploymentId?: string(name='referencedDeploymentId', example='00000000-0000-0000-0000-0000012312****'), workspace?: string(name='workspace', example='edcef******b4f'), } model DeploymentRestoreStrategy { allowNonRestoredState?: boolean(name='allowNonRestoredState', example='TRUE'), jobStartTimeInMs?: long(name='jobStartTimeInMs', example='1660293803155'), kind?: string(name='kind', example='LATEST_STATE'), savepointId?: string(name='savepointId', example='354dde66-a3ae-463e-967a-0b4107fd****'), } model DeploymentTarget { name?: string(name='name', example='deployment target'), namespace?: string(name='namespace', example='namespace'), quota?: ResourceQuota(name='quota'), } model DraftDeployParams { deploymentDraftId?: string(name='deploymentDraftId'), deploymentTarget?: BriefDeploymentTarget(name='deploymentTarget'), skipValidate?: boolean(name='skipValidate', example='false'), } model DraftDeployResult { artifactValidationDetail?: ValidateStatementResult(name='artifactValidationDetail'), deploymentId?: string(name='deploymentId', example='58718c99-3b29-4c5e-93bb-c9fc4ec6****'), message?: string(name='message', example='""'), success?: boolean(name='success', example='true'), } model Edge { columnLineage?: [ Relation ](name='columnLineage'), tableLineage?: [ Relation ](name='tableLineage'), } model EditableNamespace { namespace?: string(name='Namespace'), role?: string(name='Role'), workspaceId?: string(name='WorkspaceId'), } model EngineVersionMetadata { engineVersion?: string(name='engineVersion', description='This parameter is required.', example='vvr-6.0.0-flink-1.15'), features?: EngineVersionSupportedFeatures(name='features'), status?: string(name='status', description='This parameter is required.', example='STABLE'), } model EngineVersionMetadataIndex { defaultEngineVersion?: string(name='defaultEngineVersion', example='vvr-6.0.1-flink-1.15'), engineVersionMetadata?: [ EngineVersionMetadata ](name='engineVersionMetadata'), } model EngineVersionSupportedFeatures { supportNativeSavepoint?: boolean(name='supportNativeSavepoint', example='true'), useForSqlDeployments?: boolean(name='useForSqlDeployments', example='true'), } model ErrorDetails { columnNumber?: string(name='columnNumber'), endColumnNumber?: string(name='endColumnNumber'), endLineNumber?: string(name='endLineNumber'), invalidflinkConf?: [ string ](name='invalidflinkConf'), lineNumber?: string(name='lineNumber'), message?: string(name='message'), } model Event { createdAt?: string(name='createdAt'), deploymentId?: string(name='deploymentId', example='00000000-0000-0000-0000-000000680003'), eventId?: string(name='eventId', example='00000000-0000-0000-0000-000000000001'), eventName?: string(name='eventName', example='STATE_TRANSITION_IS_COMPLETED'), jobId?: string(name='jobId', example='00000000-0000-0000-0000-000000005043'), message?: string(name='message'), namespace?: string(name='namespace', example='default-namespace'), workspace?: string(name='workspace', example='edcef******b4f'), } model ExpertResourceSetting { jobmanagerResourceSettingSpec?: BasicResourceSettingSpec(name='jobmanagerResourceSettingSpec'), resourcePlan?: string(name='resourcePlan'), } model Folder { createdAt?: long(name='createdAt'), folderId?: string(name='folderId', example='00000000-0000-0000-0000-0000012312****'), modifiedAt?: long(name='modifiedAt'), name?: string(name='name', example='test'), namespace?: string(name='namespace', example='default-namespace'), parentId?: string(name='parentId', example='00000000-0000-0000-0000-0000012390****'), subFolder?: [ SubFolder ](name='subFolder'), workspace?: string(name='workspace', example='edcef******b4f'), } model GetLineageInfoParams { depth?: long(name='depth'), direction?: string(name='direction'), id?: string(name='id'), idType?: string(name='idType'), isColumnLevel?: boolean(name='isColumnLevel'), isTemporary?: boolean(name='isTemporary'), namespace?: string(name='namespace'), workspace?: string(name='workspace'), } model HotUpdateJobFailureInfo { failureSeverity?: string(name='failureSeverity'), message?: string(name='message'), reason?: string(name='reason'), } model HotUpdateJobParams { rescaleJobParam?: RescaleJobParam(name='rescaleJobParam'), updateJobConfigParam?: UpdateJobConfigParam(name='updateJobConfigParam'), } model HotUpdateJobResult { hotUpdateParams?: HotUpdateJobParams(name='hotUpdateParams'), jobHotUpdateId?: string(name='jobHotUpdateId'), jobId?: string(name='jobId'), status?: HotUpdateJobStatus(name='status'), targetResourceSetting?: BriefResourceSetting(name='targetResourceSetting'), } model HotUpdateJobStatus { failure?: HotUpdateJobFailureInfo(name='failure'), requestId?: string(name='requestId'), status?: string(name='status'), } model JarArtifact { additionalDependencies?: [ string ](name='additionalDependencies'), entryClass?: string(name='entryClass', example='org.apapche.flink.test'), jarUri?: string(name='jarUri', example='https://oss//bucket//test.jar'), mainArgs?: string(name='mainArgs'), } model Job { artifact?: Artifact(name='artifact'), batchResourceSetting?: BatchResourceSetting(name='batchResourceSetting'), createdAt?: string(name='createdAt'), creator?: string(name='creator', example='27846363877456****'), creatorName?: string(name='creatorName', example='****@streamcompute.onaliyun.com'), deploymentId?: string(name='deploymentId', example='354dde66-a3ae-463e-967a-0b4107fd****'), deploymentName?: string(name='deploymentName', example='flinktest'), endTime?: long(name='endTime', example='1660277235'), engineVersion?: string(name='engineVersion', example='vvr-4.0.14-flink-1.13'), executionMode?: string(name='executionMode', example='BATCH'), flinkConf?: map[string]any(name='flinkConf'), jobId?: string(name='jobId', example='354dde66-a3ae-463e-967a-0b4107fd****'), localVariables?: [ LocalVariable ](name='localVariables'), logging?: Logging(name='logging'), metric?: JobMetric(name='metric'), modifiedAt?: string(name='modifiedAt'), modifier?: string(name='modifier', example='27846363877456****'), modifierName?: string(name='modifierName', example='****@streamcompute.onaliyun.com'), namespace?: string(name='namespace', example='namespacetest'), restoreStrategy?: DeploymentRestoreStrategy(name='restoreStrategy'), sessionClusterName?: string(name='sessionClusterName', example='preview'), startTime?: long(name='startTime', example='1660190835'), status?: JobStatus(name='status'), streamingResourceSetting?: StreamingResourceSetting(name='streamingResourceSetting'), userFlinkConf?: map[string]any(name='userFlinkConf'), workspace?: string(name='workspace', example='edcef******b4f'), } model JobDiagnosis { diagnoseId?: string(name='diagnoseId'), diagnoseTime?: long(name='diagnoseTime'), namespace?: string(name='namespace'), riskLevel?: string(name='riskLevel'), symptoms?: JobDiagnosisSymptoms(name='symptoms'), workspace?: string(name='workspace'), } model JobDiagnosisSymptom { description?: string(name='description'), name?: string(name='name'), recommendation?: string(name='recommendation'), } model JobDiagnosisSymptoms { autopilot?: JobDiagnosisSymptom(name='autopilot'), others?: [ JobDiagnosisSymptom ](name='others'), runtime?: [ JobDiagnosisSymptom ](name='runtime'), startup?: [ JobDiagnosisSymptom ](name='startup'), state?: [ JobDiagnosisSymptom ](name='state'), troubleshooting?: [ JobDiagnosisSymptom ](name='troubleshooting'), } model JobFailure { failedAt?: long(name='failedAt', example='1660120062'), message?: string(name='message'), reason?: string(name='reason'), } model JobInfo { id?: string(name='id'), properties?: map[string]any(name='properties'), } model JobMetric { totalCpu?: double(name='totalCpu', example='2'), totalMemoryByte?: long(name='totalMemoryByte', example='4096'), } model JobStartParameters { deploymentId?: string(name='deploymentId'), jobId?: string(name='jobId'), localVariables?: [ LocalVariable ](name='localVariables'), resourceQueueName?: string(name='resourceQueueName', example='default-queue'), restoreStrategy?: DeploymentRestoreStrategy(name='restoreStrategy'), } model JobStatus { currentJobStatus?: string(name='currentJobStatus', example='RUNNING'), failure?: JobFailure(name='failure'), healthScore?: int32(name='healthScore'), riskLevel?: string(name='riskLevel'), running?: JobStatusRunning(name='running'), } model JobStatusRunning { observedFlinkJobRestarts?: long(name='observedFlinkJobRestarts', example='4'), observedFlinkJobStatus?: string(name='observedFlinkJobStatus', example='RUNNING'), } model JobSummary { cancelled?: int32(name='cancelled', example='1'), cancelling?: int32(name='cancelling', example='1'), failed?: int32(name='failed', example='1'), finished?: int32(name='finished', example='1'), running?: int32(name='running', example='1'), starting?: int32(name='starting', example='1'), } model LineageColumn { columnName?: string(name='columnName'), columnNativeType?: string(name='columnNativeType'), columnType?: string(name='columnType'), createdAt?: long(name='createdAt'), creator?: string(name='creator'), description?: string(name='description'), id?: string(name='id'), modifiedAt?: long(name='modifiedAt'), modifier?: string(name='modifier'), nullable?: boolean(name='nullable'), } model LineageInfo { edges?: Edge(name='edges'), jobInfos?: [ JobInfo ](name='jobInfos'), nodes?: [ Node ](name='nodes'), } model LineageTable { columns?: [ LineageColumn ](name='columns'), id?: string(name='id'), properties?: map[string]any(name='properties'), tableName?: string(name='tableName'), with?: map[string]any(name='with'), } model LocalVariable { name?: string(name='name', example='test'), value?: string(name='value', example='datagen'), } model Lock { holderId?: string(name='holderId'), holderName?: string(name='holderName'), id?: string(name='id'), namespace?: string(name='namespace'), workspace?: string(name='workspace'), } model Log4jLogger { loggerLevel?: string(name='loggerLevel', example='ERROR'), loggerName?: string(name='loggerName', example='StdOutErrConsoleAppender'), } model LogReservePolicy { expirationDays?: long(name='expirationDays', example='7'), openHistory?: boolean(name='openHistory', example='true'), } model Logging { log4j2ConfigurationTemplate?: string(name='log4j2ConfigurationTemplate', example='xml格式文本'), log4jLoggers?: [ Log4jLogger ](name='log4jLoggers'), logReservePolicy?: LogReservePolicy(name='logReservePolicy'), loggingProfile?: string(name='loggingProfile', example='oss'), } model Member { member?: string(name='member', description='This parameter is required.', example='user: 181319557522****'), role?: string(name='role', example='VIEWER'), } model MetadataInfo { key?: string(name='key'), virtual?: boolean(name='virtual'), } model Node { catalogName?: string(name='catalogName'), connector?: string(name='connector'), databaseName?: string(name='databaseName'), id?: string(name='id'), isTemporary?: boolean(name='isTemporary'), tables?: [ LineageTable ](name='tables'), } model PeriodicSchedulingPolicy { isFinished?: boolean(name='isFinished'), onlyOnceTriggerTime?: long(name='onlyOnceTriggerTime', example='1723195800000'), onlyOnceTriggerTimeIsExpired?: boolean(name='onlyOnceTriggerTimeIsExpired', example='true'), periodicSchedulingLevel?: string(name='periodicSchedulingLevel', example='DAY'), periodicSchedulingValues?: [ int32 ](name='periodicSchedulingValues'), periodicTriggerTime?: long(name='periodicTriggerTime', example='1723199340000'), resourceSetting?: BriefResourceSetting(name='resourceSetting'), } model PrimaryKey { columns?: [ string ](name='columns'), constraintName?: string(name='constraintName'), } model Property { defaultValue?: string(name='defaultValue'), definesFormat?: boolean(name='definesFormat'), description?: string(name='description'), key?: string(name='key'), required?: boolean(name='required'), sensitive?: boolean(name='sensitive'), } model PythonArtifact { additionalDependencies?: [ string ](name='additionalDependencies'), additionalPythonArchives?: [ string ](name='additionalPythonArchives'), additionalPythonLibraries?: [ string ](name='additionalPythonLibraries'), entryModule?: string(name='entryModule'), mainArgs?: string(name='mainArgs'), pythonArtifactUri?: string(name='pythonArtifactUri', example='https://oss//bucket//test.py'), } model Relation { destination?: string(name='destination'), jobId?: string(name='jobId'), source?: string(name='source'), } model RescaleJobParam { jobParallelism?: long(name='jobParallelism'), } model ResourceQuota { limit?: ResourceSpec(name='limit'), used?: ResourceSpec(name='used'), } model ResourceSpec { cpu?: double(name='cpu', example='1.0'), memory?: string(name='memory', example='4Gi'), } model Savepoint { createdAt?: long(name='createdAt', example='1659066711'), deploymentId?: string(name='deploymentId', example='1d716b22-6aad-4be2-85c2-50cfc757****'), description?: string(name='description'), jobId?: string(name='jobId', example='5af678c0-7db0-4650-94c2-d2604f0a****'), modifiedAt?: long(name='modifiedAt', example='1659069473'), namespace?: string(name='namespace', example='namespacetest'), nativeFormat?: boolean(name='nativeFormat', example='TRUE'), savepointId?: string(name='savepointId', example='354dde66-a3ae-463e-967a-0b4107fd****'), savepointLocation?: string(name='savepointLocation', example='https://oss/bucket/flink/flink-jobs/namespaces/vvp-team/deployments/5a19a71b-1c42-4f34-94fd-86cf60782c81/checkpoints/sp-3285'), savepointOrigin?: string(name='savepointOrigin', example='USER_REQUEST'), status?: SavepointStatus(name='status'), stopWithDrainEnabled?: boolean(name='stopWithDrainEnabled', example='TRUE'), } model SavepointFailure { failedAt?: long(name='failedAt', example='1655006835'), message?: string(name='message'), reason?: string(name='reason'), } model SavepointStatus { failure?: SavepointFailure(name='failure'), state?: string(name='state', example='COMPLETED'), } model ScheduledPlan { createdAt?: string(name='createdAt', example='1723197248'), creator?: string(name='creator', example='27846363877456****'), creatorName?: string(name='creatorName', example='****@streamcompute.onaliyun.com'), deploymentId?: string(name='deploymentId', example='00000000-0000-0000-0000-000000000001'), modifiedAt?: string(name='modifiedAt', example='1723197248'), modifier?: string(name='modifier', example='27846363877456****'), modifierName?: string(name='modifierName', example='****@streamcompute.onaliyun.com'), name?: string(name='name', example='test-scheduled-plan'), namespace?: string(name='namespace', example='default-namespace'), origin?: string(name='origin', example='USER_DEFINED'), periodicSchedulingPolicies?: [ PeriodicSchedulingPolicy ](name='periodicSchedulingPolicies'), scheduledPlanId?: string(name='scheduledPlanId', example='f3b4ec1e-85dc-4b1d-9726-1d7f4c37****'), status?: string(name='status', example='FINISHED'), updatedByUser?: boolean(name='updatedByUser', example='true'), workspace?: string(name='workspace', example='edcef******b4f'), } model ScheduledPlanAppliedInfo { deploymentId?: string(name='deploymentId', example='00000000-0000-0000-0000-000000000001'), expectedState?: string(name='expectedState', example='RUNNING'), modifiedAt?: string(name='modifiedAt', example='1723197248'), modifier?: string(name='modifier', example='27846363877456****'), modifierName?: string(name='modifierName', example='****@streamcompute.onaliyun.com'), namespace?: string(name='namespace', example='default-namespace'), scheduledPlanId?: string(name='scheduledPlanId', example='f3b4ec1e-85dc-4b1d-9726-1d7f4c37****'), scheduledPlanName?: string(name='scheduledPlanName', example='test-scheduled-plan'), statusState?: string(name='statusState', example='WAITING'), workspace?: string(name='workspace', example='edcef******b4f'), } model ScheduledPlanExecutedInfo { createdAt?: string(name='createdAt', example='1723197248'), creator?: string(name='creator', example='27846363877456****'), creatorName?: string(name='creatorName', example='****@streamcompute.onaliyun.com'), deploymentId?: string(name='deploymentId', example='00000000-0000-0000-0000-000000000001'), jobResourceUpgradingId?: string(name='jobResourceUpgradingId', example='0e6d3bab-2277-4ed1-b573-9de6413d****'), modifiedAt?: string(name='modifiedAt', example='1723197248'), modifier?: string(name='modifier', example='27846363877456****'), modifierName?: string(name='modifierName', example='****@streamcompute.onaliyun.com'), name?: string(name='name', example='test-scheduled-plan'), namespace?: string(name='namespace', example='default-namespace'), origin?: string(name='origin', example='SCHEDULED_PLAN'), originJobId?: string(name='originJobId', example='f8a2d5d9-9fc5-4273-bfcc-2a3cd354****'), status?: ScheduledPlanExecutedStatus(name='status'), workspace?: string(name='workspace', example='edcef******b4f'), } model ScheduledPlanExecutedStatus { restartType?: string(name='restartType', example='HOT_UPDATE'), statusState?: string(name='statusState', example='UPGRADED'), } model Schema { columns?: [ TableColumn ](name='columns'), primaryKey?: PrimaryKey(name='primaryKey'), watermarkSpecs?: [ WatermarkSpec ](name='watermarkSpecs'), } model SessionCluster { basicResourceSetting?: BasicResourceSetting(name='basicResourceSetting'), createdAt?: long(name='createdAt'), creator?: string(name='creator', example='27846363877456****'), creatorName?: string(name='creatorName', example='****@streamcompute.onaliyun.com'), deploymentTargetName?: string(name='deploymentTargetName', example='default-queue'), engineVersion?: string(name='engineVersion', example='vvr-6.0.7-flink-1.15'), flinkConf?: map[string]any(name='flinkConf', example='{"taskmanager.numberOfTaskSlots":"1"}'), labels?: map[string]any(name='labels'), logging?: Logging(name='logging'), modifiedAt?: long(name='modifiedAt'), modifier?: string(name='modifier', example='27846363877456****'), modifierName?: string(name='modifierName', example='****@streamcompute.onaliyun.com'), name?: string(name='name', example='test-sessionCluster'), namespace?: string(name='namespace', example='default-namespace'), sessionClusterId?: string(name='sessionClusterId', example='1f68a52c-1760-43c6-97fb-afe0674b****'), status?: SessionClusterStatus(name='status'), workspace?: string(name='workspace', example='edcef******b4f'), } model SessionClusterFailureInfo { failedAt?: long(name='failedAt'), message?: string(name='message'), reason?: string(name='reason'), } model SessionClusterRunningInfo { lastUpdateTime?: long(name='lastUpdateTime'), referenceDeploymentIds?: [ string ](name='referenceDeploymentIds'), startedAt?: long(name='startedAt'), } model SessionClusterStatus { currentSessionClusterStatus?: string(name='currentSessionClusterStatus'), failure?: SessionClusterFailureInfo(name='failure'), running?: SessionClusterRunningInfo(name='running'), } model SqlArtifact { additionalDependencies?: [ string ](name='additionalDependencies'), sqlScript?: string(name='sqlScript'), } model SqlStatementExecuteResult { errorDetails?: ErrorDetails(name='errorDetails'), executeSuccess?: boolean(name='executeSuccess'), statement?: string(name='statement'), } model SqlStatementValidationResult { errorDetails?: ErrorDetails(name='errorDetails'), message?: string(name='message'), success?: boolean(name='success'), validationResult?: string(name='validationResult'), } model SqlStatementWithContext { additionalDependencies?: [ string ](name='additionalDependencies'), batchMode?: boolean(name='batchMode', description='This parameter is required.'), flinkConfiguration?: map[string]any(name='flinkConfiguration'), statement?: string(name='statement', description='This parameter is required.'), versionName?: string(name='versionName'), } model StartJobRequestBody { deploymentId?: string(name='deploymentId', example='5a19a71b-1c42-4f34-94fd-86cf60782c81'), resourceSettingSpec?: BriefResourceSetting(name='resourceSettingSpec'), restoreStrategy?: DeploymentRestoreStrategy(name='restoreStrategy'), } model StopJobRequestBody { stopStrategy?: string(name='stopStrategy', description='This parameter is required.', example='NONE'), } model StreamingResourceSetting { basicResourceSetting?: BasicResourceSetting(name='basicResourceSetting'), expertResourceSetting?: ExpertResourceSetting(name='expertResourceSetting'), resourceSettingMode?: string(name='resourceSettingMode', example='EXPERT'), } model SubFolder { folderId?: string(name='folderId', example='a579aec9-1d5e-3382-9d65-9887ff6cfaff'), name?: string(name='name', example='test'), parentId?: string(name='parentId', example='95c0787c-408f-4e1f-88ba-ef0a84a2c2ee'), } model Table { comment?: string(name='comment'), name?: string(name='name'), partitionKeys?: [ string ](name='partitionKeys'), properties?: map[string]any(name='properties'), schema?: Schema(name='schema'), } model TableColumn { expression?: string(name='expression'), metadataInfo?: MetadataInfo(name='metadataInfo'), name?: string(name='name'), nullable?: boolean(name='nullable'), type?: string(name='type'), } model TableMeta { catalogName?: string(name='catalogName'), databaseName?: string(name='databaseName'), tableName?: string(name='tableName'), } model UdfArtifact { artifactType?: string(name='artifactType'), createdAt?: long(name='createdAt'), creator?: string(name='creator'), dependencyJarUris?: [ string ](name='dependencyJarUris'), jarUrl?: string(name='jarUrl'), modifiedAt?: long(name='modifiedAt'), name?: string(name='name'), namespace?: string(name='namespace'), udfClasses?: [ UdfClass ](name='udfClasses'), } model UdfClass { className?: string(name='className'), classType?: string(name='classType'), functionNames?: [ string ](name='functionNames'), udfArtifactName?: string(name='udfArtifactName'), } model UdfFunction { className?: string(name='className'), functionName?: string(name='functionName'), udfArtifactName?: string(name='udfArtifactName'), } model UpdateJobConfigParam { newFlinkConf?: map[string]any(name='newFlinkConf'), } model UpdateUdfArtifactResult { collidingClasses?: [ UdfClass ](name='collidingClasses'), message?: string(name='message'), missingClasses?: [ UdfClass ](name='missingClasses'), udfArtifact?: UdfArtifact(name='udfArtifact'), updateSuccess?: boolean(name='updateSuccess'), } model ValidateStatementResult { errorDetails?: ValidationErrorDetails(name='errorDetails'), validationResult?: string(name='validationResult', example='"there have some errors""'), } model ValidationErrorDetails { columnNumber?: string(name='columnNumber'), endColumnNumber?: string(name='endColumnNumber'), endLineNumber?: string(name='endLineNumber'), lineNumber?: string(name='lineNumber'), message?: string(name='message'), } model Variable { description?: string(name='description', example='This is a variable description'), kind?: string(name='kind', description='This parameter is required.', example='Plain'), name?: string(name='name', description='This parameter is required.', example='variableName'), value?: string(name='value', description='This parameter is required.', example='variableValue'), } model WatermarkSpec { column?: string(name='column'), watermarkExpression?: string(name='watermarkExpression'), } model ApplyScheduledPlanHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bd5d90a****'), } model ApplyScheduledPlanResponseBody = { data?: ScheduledPlanAppliedInfo(name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), } model ApplyScheduledPlanResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ApplyScheduledPlanResponseBody(name='body'), } /** * @summary 执行定时计划 * * @param headers ApplyScheduledPlanHeaders * @param runtime runtime options for this request RuntimeOptions * @return ApplyScheduledPlanResponse */ async function applyScheduledPlanWithOptions(namespace: string, scheduledPlanId: string, headers: ApplyScheduledPlanHeaders, runtime: Util.RuntimeOptions): ApplyScheduledPlanResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'ApplyScheduledPlan', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/scheduled-plans/${OpenApiUtil.getEncodeParam(scheduledPlanId)}%3Aapply`, method = 'POST', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary 执行定时计划 * * @return ApplyScheduledPlanResponse */ async function applyScheduledPlan(namespace: string, scheduledPlanId: string): ApplyScheduledPlanResponse { var runtime = new Util.RuntimeOptions{}; var headers = new ApplyScheduledPlanHeaders{}; return applyScheduledPlanWithOptions(namespace, scheduledPlanId, headers, runtime); } model CreateDeploymentHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model CreateDeploymentRequest { body?: Deployment(name='body', description='The content of the deployment. This parameter is required.'), } model CreateDeploymentResponseBody = { data?: Deployment(name='data', description='* If the value of success was true, the deployment that you created was returned. * If the value of success was false, a null value was returned.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The value was fixed to 200.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model CreateDeploymentResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CreateDeploymentResponseBody(name='body'), } /** * @summary Creates a deployment. * * @param request CreateDeploymentRequest * @param headers CreateDeploymentHeaders * @param runtime runtime options for this request RuntimeOptions * @return CreateDeploymentResponse */ async function createDeploymentWithOptions(namespace: string, request: CreateDeploymentRequest, headers: CreateDeploymentHeaders, runtime: Util.RuntimeOptions): CreateDeploymentResponse { Util.validateModel(request); var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, body = OpenApiUtil.parseToMap(request.body), }; var params = new OpenApi.Params{ action = 'CreateDeployment', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/deployments`, method = 'POST', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Creates a deployment. * * @param request CreateDeploymentRequest * @return CreateDeploymentResponse */ async function createDeployment(namespace: string, request: CreateDeploymentRequest): CreateDeploymentResponse { var runtime = new Util.RuntimeOptions{}; var headers = new CreateDeploymentHeaders{}; return createDeploymentWithOptions(namespace, request, headers, runtime); } model CreateDeploymentDraftHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bd5d90a****'), } model CreateDeploymentDraftRequest { body?: DeploymentDraft(name='body', description='This parameter is required.'), } model CreateDeploymentDraftResponseBody = { data?: DeploymentDraft(name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), } model CreateDeploymentDraftResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CreateDeploymentDraftResponseBody(name='body'), } /** * @summary create a deploymentDraft * * @param request CreateDeploymentDraftRequest * @param headers CreateDeploymentDraftHeaders * @param runtime runtime options for this request RuntimeOptions * @return CreateDeploymentDraftResponse */ async function createDeploymentDraftWithOptions(namespace: string, request: CreateDeploymentDraftRequest, headers: CreateDeploymentDraftHeaders, runtime: Util.RuntimeOptions): CreateDeploymentDraftResponse { Util.validateModel(request); var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, body = OpenApiUtil.parseToMap(request.body), }; var params = new OpenApi.Params{ action = 'CreateDeploymentDraft', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/deployment-drafts`, method = 'POST', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary create a deploymentDraft * * @param request CreateDeploymentDraftRequest * @return CreateDeploymentDraftResponse */ async function createDeploymentDraft(namespace: string, request: CreateDeploymentDraftRequest): CreateDeploymentDraftResponse { var runtime = new Util.RuntimeOptions{}; var headers = new CreateDeploymentDraftHeaders{}; return createDeploymentDraftWithOptions(namespace, request, headers, runtime); } model CreateDeploymentTargetHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bda1c4a****'), } model CreateDeploymentTargetRequest { body?: ResourceSpec(name='body'), deploymentTargetName?: string(name='deploymentTargetName', description='This parameter is required.', example='test-dt'), } model CreateDeploymentTargetResponseBody = { data?: DeploymentTarget(name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), } model CreateDeploymentTargetResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CreateDeploymentTargetResponseBody(name='body'), } /** * @summary 创建deploymentTarget * * @param request CreateDeploymentTargetRequest * @param headers CreateDeploymentTargetHeaders * @param runtime runtime options for this request RuntimeOptions * @return CreateDeploymentTargetResponse */ async function createDeploymentTargetWithOptions(namespace: string, request: CreateDeploymentTargetRequest, headers: CreateDeploymentTargetHeaders, runtime: Util.RuntimeOptions): CreateDeploymentTargetResponse { Util.validateModel(request); var query : map[string]any = {}; if (!Util.isUnset(request.deploymentTargetName)) { query['deploymentTargetName'] = request.deploymentTargetName; } var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, query = OpenApiUtil.query(query), body = OpenApiUtil.parseToMap(request.body), }; var params = new OpenApi.Params{ action = 'CreateDeploymentTarget', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/deployment-targets`, method = 'POST', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary 创建deploymentTarget * * @param request CreateDeploymentTargetRequest * @return CreateDeploymentTargetResponse */ async function createDeploymentTarget(namespace: string, request: CreateDeploymentTargetRequest): CreateDeploymentTargetResponse { var runtime = new Util.RuntimeOptions{}; var headers = new CreateDeploymentTargetHeaders{}; return createDeploymentTargetWithOptions(namespace, request, headers, runtime); } model CreateFolderHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bda1c4a****'), } model CreateFolderRequest { body?: Folder(name='body'), } model CreateFolderResponseBody = { data?: Folder(name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), } model CreateFolderResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CreateFolderResponseBody(name='body'), } /** * @summary create a folder * * @param request CreateFolderRequest * @param headers CreateFolderHeaders * @param runtime runtime options for this request RuntimeOptions * @return CreateFolderResponse */ async function createFolderWithOptions(namespace: string, request: CreateFolderRequest, headers: CreateFolderHeaders, runtime: Util.RuntimeOptions): CreateFolderResponse { Util.validateModel(request); var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, body = OpenApiUtil.parseToMap(request.body), }; var params = new OpenApi.Params{ action = 'CreateFolder', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/folder`, method = 'POST', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary create a folder * * @param request CreateFolderRequest * @return CreateFolderResponse */ async function createFolder(namespace: string, request: CreateFolderRequest): CreateFolderResponse { var runtime = new Util.RuntimeOptions{}; var headers = new CreateFolderHeaders{}; return createFolderWithOptions(namespace, request, headers, runtime); } model CreateMemberHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='ca84d539167d4d'), } model CreateMemberRequest { body?: Member(name='body', description='The mappings between the ID and permissions of the member.'), } model CreateMemberResponseBody = { data?: Member(name='data', description='* If the value of success was false, a null value was returned. * If the value of success was true, the authorization information was returned.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The status code returned. The value was fixed to 200. The status code 200 indicates that the request was successful.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='F989CA70-2925-5A94-92B7-20F5762B71C8'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='True'), } model CreateMemberResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CreateMemberResponseBody(name='body'), } /** * @summary Adds a user to a namespace as a member and grants permissions to the user. * * @param request CreateMemberRequest * @param headers CreateMemberHeaders * @param runtime runtime options for this request RuntimeOptions * @return CreateMemberResponse */ async function createMemberWithOptions(namespace: string, request: CreateMemberRequest, headers: CreateMemberHeaders, runtime: Util.RuntimeOptions): CreateMemberResponse { Util.validateModel(request); var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, body = OpenApiUtil.parseToMap(request.body), }; var params = new OpenApi.Params{ action = 'CreateMember', version = '2022-07-18', protocol = 'HTTPS', pathname = `/gateway/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/members`, method = 'POST', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Adds a user to a namespace as a member and grants permissions to the user. * * @param request CreateMemberRequest * @return CreateMemberResponse */ async function createMember(namespace: string, request: CreateMemberRequest): CreateMemberResponse { var runtime = new Util.RuntimeOptions{}; var headers = new CreateMemberHeaders{}; return createMemberWithOptions(namespace, request, headers, runtime); } model CreateSavepointHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model CreateSavepointRequest { deploymentId?: string(name='deploymentId', description='The deployment ID. This parameter is required.', example='58718c99-3b29-4c5e-93bb-c9fc4ec6****'), description?: string(name='description', description='The description of the savepoint.'), nativeFormat?: boolean(name='nativeFormat', description='Specifies whether to use the native format mode. Valid values: * true: The native format mode is used. * false: The native format mode is not used.', example='true'), } model CreateSavepointResponseBody = { data?: Savepoint(name='data', description='* If the value of success was true, the savepoint that was created was returned. * If the value of success was false, a null value was returned.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The value was fixed to 200.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model CreateSavepointResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CreateSavepointResponseBody(name='body'), } /** * @summary Creates a savepoint. * * @param request CreateSavepointRequest * @param headers CreateSavepointHeaders * @param runtime runtime options for this request RuntimeOptions * @return CreateSavepointResponse */ async function createSavepointWithOptions(namespace: string, request: CreateSavepointRequest, headers: CreateSavepointHeaders, runtime: Util.RuntimeOptions): CreateSavepointResponse { Util.validateModel(request); var body : map[string]any = {}; if (!Util.isUnset(request.deploymentId)) { body['deploymentId'] = request.deploymentId; } if (!Util.isUnset(request.description)) { body['description'] = request.description; } if (!Util.isUnset(request.nativeFormat)) { body['nativeFormat'] = request.nativeFormat; } var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, body = OpenApiUtil.parseToMap(body), }; var params = new OpenApi.Params{ action = 'CreateSavepoint', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/savepoints`, method = 'POST', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Creates a savepoint. * * @param request CreateSavepointRequest * @return CreateSavepointResponse */ async function createSavepoint(namespace: string, request: CreateSavepointRequest): CreateSavepointResponse { var runtime = new Util.RuntimeOptions{}; var headers = new CreateSavepointHeaders{}; return createSavepointWithOptions(namespace, request, headers, runtime); } model CreateScheduledPlanHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bd5d90a****'), } model CreateScheduledPlanRequest { body?: ScheduledPlan(name='body'), } model CreateScheduledPlanResponseBody = { data?: ScheduledPlan(name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-ABCD-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='True'), } model CreateScheduledPlanResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CreateScheduledPlanResponseBody(name='body'), } /** * @summary 创建定时执行计划 * * @param request CreateScheduledPlanRequest * @param headers CreateScheduledPlanHeaders * @param runtime runtime options for this request RuntimeOptions * @return CreateScheduledPlanResponse */ async function createScheduledPlanWithOptions(namespace: string, request: CreateScheduledPlanRequest, headers: CreateScheduledPlanHeaders, runtime: Util.RuntimeOptions): CreateScheduledPlanResponse { Util.validateModel(request); var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, body = OpenApiUtil.parseToMap(request.body), }; var params = new OpenApi.Params{ action = 'CreateScheduledPlan', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/scheduled-plans`, method = 'POST', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary 创建定时执行计划 * * @param request CreateScheduledPlanRequest * @return CreateScheduledPlanResponse */ async function createScheduledPlan(namespace: string, request: CreateScheduledPlanRequest): CreateScheduledPlanResponse { var runtime = new Util.RuntimeOptions{}; var headers = new CreateScheduledPlanHeaders{}; return createScheduledPlanWithOptions(namespace, request, headers, runtime); } model CreateSessionClusterHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bd5d90a****'), } model CreateSessionClusterRequest { body?: SessionCluster(name='body'), } model CreateSessionClusterResponseBody = { data?: SessionCluster(name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), } model CreateSessionClusterResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CreateSessionClusterResponseBody(name='body'), } /** * @summary 创建session集群 * * @param request CreateSessionClusterRequest * @param headers CreateSessionClusterHeaders * @param runtime runtime options for this request RuntimeOptions * @return CreateSessionClusterResponse */ async function createSessionClusterWithOptions(namespace: string, request: CreateSessionClusterRequest, headers: CreateSessionClusterHeaders, runtime: Util.RuntimeOptions): CreateSessionClusterResponse { Util.validateModel(request); var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, body = OpenApiUtil.parseToMap(request.body), }; var params = new OpenApi.Params{ action = 'CreateSessionCluster', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/sessionclusters`, method = 'POST', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary 创建session集群 * * @param request CreateSessionClusterRequest * @return CreateSessionClusterResponse */ async function createSessionCluster(namespace: string, request: CreateSessionClusterRequest): CreateSessionClusterResponse { var runtime = new Util.RuntimeOptions{}; var headers = new CreateSessionClusterHeaders{}; return createSessionClusterWithOptions(namespace, request, headers, runtime); } model CreateUdfArtifactHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model CreateUdfArtifactRequest { body?: UdfArtifact(name='body', description='The resource file of the UDF. This parameter is required.'), } model CreateUdfArtifactResponseBody = { data?: CreateUdfArtifactResult(name='data', description='The result of creating an artifact configuration for the UDF.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The status code returned. The value was fixed to 200. The status code 200 indicates that the request was successful.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='True'), } model CreateUdfArtifactResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CreateUdfArtifactResponseBody(name='body'), } /** * @summary Parses all user-defined function (UDF) methods in your JAR or Python file and creates an artifact configuration for a UDF. * * @param request CreateUdfArtifactRequest * @param headers CreateUdfArtifactHeaders * @param runtime runtime options for this request RuntimeOptions * @return CreateUdfArtifactResponse */ async function createUdfArtifactWithOptions(namespace: string, request: CreateUdfArtifactRequest, headers: CreateUdfArtifactHeaders, runtime: Util.RuntimeOptions): CreateUdfArtifactResponse { Util.validateModel(request); var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, body = OpenApiUtil.parseToMap(request.body), }; var params = new OpenApi.Params{ action = 'CreateUdfArtifact', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/udfartifacts`, method = 'POST', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Parses all user-defined function (UDF) methods in your JAR or Python file and creates an artifact configuration for a UDF. * * @param request CreateUdfArtifactRequest * @return CreateUdfArtifactResponse */ async function createUdfArtifact(namespace: string, request: CreateUdfArtifactRequest): CreateUdfArtifactResponse { var runtime = new Util.RuntimeOptions{}; var headers = new CreateUdfArtifactHeaders{}; return createUdfArtifactWithOptions(namespace, request, headers, runtime); } model CreateVariableHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bda1c4a****'), } model CreateVariableRequest { body?: Variable(name='body', description='The parameter that is used to create the variable. This parameter is required.'), } model CreateVariableResponseBody = { data?: Variable(name='data', description='* If the value of success was true, the variable that you created was returned. * If the value of success was false, a null value was returned.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The value was fixed to 200.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-ABCD-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model CreateVariableResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CreateVariableResponseBody(name='body'), } /** * @summary Creates a variable. * * @param request CreateVariableRequest * @param headers CreateVariableHeaders * @param runtime runtime options for this request RuntimeOptions * @return CreateVariableResponse */ async function createVariableWithOptions(namespace: string, request: CreateVariableRequest, headers: CreateVariableHeaders, runtime: Util.RuntimeOptions): CreateVariableResponse { Util.validateModel(request); var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, body = OpenApiUtil.parseToMap(request.body), }; var params = new OpenApi.Params{ action = 'CreateVariable', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/variables`, method = 'POST', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Creates a variable. * * @param request CreateVariableRequest * @return CreateVariableResponse */ async function createVariable(namespace: string, request: CreateVariableRequest): CreateVariableResponse { var runtime = new Util.RuntimeOptions{}; var headers = new CreateVariableHeaders{}; return createVariableWithOptions(namespace, request, headers, runtime); } model DeleteCustomConnectorHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model DeleteCustomConnectorResponseBody = { data?: [ TableMeta ](name='data', description='If the value of success was true, a list of deployments in which custom connectors were deleted was returned. If the value of success was false, a null value was returned.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The status code returned. The value was fixed to 200. The status code 200 indicates that the request was successful.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model DeleteCustomConnectorResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeleteCustomConnectorResponseBody(name='body'), } /** * @summary Deletes a registered custom connector from a workspace. * * @param headers DeleteCustomConnectorHeaders * @param runtime runtime options for this request RuntimeOptions * @return DeleteCustomConnectorResponse */ async function deleteCustomConnectorWithOptions(namespace: string, connectorName: string, headers: DeleteCustomConnectorHeaders, runtime: Util.RuntimeOptions): DeleteCustomConnectorResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'DeleteCustomConnector', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/connectors/${OpenApiUtil.getEncodeParam(connectorName)}`, method = 'DELETE', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Deletes a registered custom connector from a workspace. * * @return DeleteCustomConnectorResponse */ async function deleteCustomConnector(namespace: string, connectorName: string): DeleteCustomConnectorResponse { var runtime = new Util.RuntimeOptions{}; var headers = new DeleteCustomConnectorHeaders{}; return deleteCustomConnectorWithOptions(namespace, connectorName, headers, runtime); } model DeleteDeploymentHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model DeleteDeploymentResponseBody = { errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The value was fixed to 200.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model DeleteDeploymentResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeleteDeploymentResponseBody(name='body'), } /** * @summary Deletes a deployment based on the deployment ID. * * @param headers DeleteDeploymentHeaders * @param runtime runtime options for this request RuntimeOptions * @return DeleteDeploymentResponse */ async function deleteDeploymentWithOptions(namespace: string, deploymentId: string, headers: DeleteDeploymentHeaders, runtime: Util.RuntimeOptions): DeleteDeploymentResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'DeleteDeployment', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/deployments/${OpenApiUtil.getEncodeParam(deploymentId)}`, method = 'DELETE', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Deletes a deployment based on the deployment ID. * * @return DeleteDeploymentResponse */ async function deleteDeployment(namespace: string, deploymentId: string): DeleteDeploymentResponse { var runtime = new Util.RuntimeOptions{}; var headers = new DeleteDeploymentHeaders{}; return deleteDeploymentWithOptions(namespace, deploymentId, headers, runtime); } model DeleteDeploymentDraftHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bd5d90a****'), } model DeleteDeploymentDraftResponseBody = { errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), } model DeleteDeploymentDraftResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeleteDeploymentDraftResponseBody(name='body'), } /** * @summary delete a deploymentDraft * * @param headers DeleteDeploymentDraftHeaders * @param runtime runtime options for this request RuntimeOptions * @return DeleteDeploymentDraftResponse */ async function deleteDeploymentDraftWithOptions(namespace: string, deploymentDraftId: string, headers: DeleteDeploymentDraftHeaders, runtime: Util.RuntimeOptions): DeleteDeploymentDraftResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'DeleteDeploymentDraft', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/deployment-drafts/${OpenApiUtil.getEncodeParam(deploymentDraftId)}`, method = 'DELETE', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary delete a deploymentDraft * * @return DeleteDeploymentDraftResponse */ async function deleteDeploymentDraft(namespace: string, deploymentDraftId: string): DeleteDeploymentDraftResponse { var runtime = new Util.RuntimeOptions{}; var headers = new DeleteDeploymentDraftHeaders{}; return deleteDeploymentDraftWithOptions(namespace, deploymentDraftId, headers, runtime); } model DeleteDeploymentTargetHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bd5d90a****'), } model DeleteDeploymentTargetResponseBody = { data?: DeploymentTarget(name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), } model DeleteDeploymentTargetResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeleteDeploymentTargetResponseBody(name='body'), } /** * @summary 删除deploymentTarget * * @param headers DeleteDeploymentTargetHeaders * @param runtime runtime options for this request RuntimeOptions * @return DeleteDeploymentTargetResponse */ async function deleteDeploymentTargetWithOptions(namespace: string, deploymentTargetName: string, headers: DeleteDeploymentTargetHeaders, runtime: Util.RuntimeOptions): DeleteDeploymentTargetResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'DeleteDeploymentTarget', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/deployment-targets/${OpenApiUtil.getEncodeParam(deploymentTargetName)}`, method = 'DELETE', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary 删除deploymentTarget * * @return DeleteDeploymentTargetResponse */ async function deleteDeploymentTarget(namespace: string, deploymentTargetName: string): DeleteDeploymentTargetResponse { var runtime = new Util.RuntimeOptions{}; var headers = new DeleteDeploymentTargetHeaders{}; return deleteDeploymentTargetWithOptions(namespace, deploymentTargetName, headers, runtime); } model DeleteFolderHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='c96306e2b****'), } model DeleteFolderResponseBody = { errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), } model DeleteFolderResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeleteFolderResponseBody(name='body'), } /** * @summary delete a folder * * @param headers DeleteFolderHeaders * @param runtime runtime options for this request RuntimeOptions * @return DeleteFolderResponse */ async function deleteFolderWithOptions(namespace: string, folderId: string, headers: DeleteFolderHeaders, runtime: Util.RuntimeOptions): DeleteFolderResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'DeleteFolder', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/folder/${OpenApiUtil.getEncodeParam(folderId)}`, method = 'DELETE', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary delete a folder * * @return DeleteFolderResponse */ async function deleteFolder(namespace: string, folderId: string): DeleteFolderResponse { var runtime = new Util.RuntimeOptions{}; var headers = new DeleteFolderHeaders{}; return deleteFolderWithOptions(namespace, folderId, headers, runtime); } model DeleteJobHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model DeleteJobResponseBody = { errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The value was fixed to 200.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model DeleteJobResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeleteJobResponseBody(name='body'), } /** * @summary Deletes the information about a job that is not in the running state in a deployment. * * @param headers DeleteJobHeaders * @param runtime runtime options for this request RuntimeOptions * @return DeleteJobResponse */ async function deleteJobWithOptions(namespace: string, jobId: string, headers: DeleteJobHeaders, runtime: Util.RuntimeOptions): DeleteJobResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'DeleteJob', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/jobs/${OpenApiUtil.getEncodeParam(jobId)}`, method = 'DELETE', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Deletes the information about a job that is not in the running state in a deployment. * * @return DeleteJobResponse */ async function deleteJob(namespace: string, jobId: string): DeleteJobResponse { var runtime = new Util.RuntimeOptions{}; var headers = new DeleteJobHeaders{}; return deleteJobWithOptions(namespace, jobId, headers, runtime); } model DeleteMemberHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='710d6a64d8c34d'), } model DeleteMemberResponseBody = { errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The status code returned. The value was fixed to 200. The status code 200 indicates that the request was successful.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model DeleteMemberResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeleteMemberResponseBody(name='body'), } /** * @summary Revokes the permissions from a member. * * @param headers DeleteMemberHeaders * @param runtime runtime options for this request RuntimeOptions * @return DeleteMemberResponse */ async function deleteMemberWithOptions(namespace: string, member: string, headers: DeleteMemberHeaders, runtime: Util.RuntimeOptions): DeleteMemberResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'DeleteMember', version = '2022-07-18', protocol = 'HTTPS', pathname = `/gateway/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/members/${OpenApiUtil.getEncodeParam(member)}`, method = 'DELETE', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Revokes the permissions from a member. * * @return DeleteMemberResponse */ async function deleteMember(namespace: string, member: string): DeleteMemberResponse { var runtime = new Util.RuntimeOptions{}; var headers = new DeleteMemberHeaders{}; return deleteMemberWithOptions(namespace, member, headers, runtime); } model DeleteSavepointHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model DeleteSavepointResponseBody = { errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The value was fixed to 200.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model DeleteSavepointResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeleteSavepointResponseBody(name='body'), } /** * @summary Deletes a savepoint. * * @param headers DeleteSavepointHeaders * @param runtime runtime options for this request RuntimeOptions * @return DeleteSavepointResponse */ async function deleteSavepointWithOptions(namespace: string, savepointId: string, headers: DeleteSavepointHeaders, runtime: Util.RuntimeOptions): DeleteSavepointResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'DeleteSavepoint', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/savepoints/${OpenApiUtil.getEncodeParam(savepointId)}`, method = 'DELETE', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Deletes a savepoint. * * @return DeleteSavepointResponse */ async function deleteSavepoint(namespace: string, savepointId: string): DeleteSavepointResponse { var runtime = new Util.RuntimeOptions{}; var headers = new DeleteSavepointHeaders{}; return deleteSavepointWithOptions(namespace, savepointId, headers, runtime); } model DeleteScheduledPlanHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bd5d90a****'), } model DeleteScheduledPlanResponseBody = { data?: ScheduledPlan(name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), } model DeleteScheduledPlanResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeleteScheduledPlanResponseBody(name='body'), } /** * @summary 删除定时执行计划 * * @param headers DeleteScheduledPlanHeaders * @param runtime runtime options for this request RuntimeOptions * @return DeleteScheduledPlanResponse */ async function deleteScheduledPlanWithOptions(namespace: string, scheduledPlanId: string, headers: DeleteScheduledPlanHeaders, runtime: Util.RuntimeOptions): DeleteScheduledPlanResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'DeleteScheduledPlan', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/scheduled-plans/${OpenApiUtil.getEncodeParam(scheduledPlanId)}`, method = 'DELETE', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary 删除定时执行计划 * * @return DeleteScheduledPlanResponse */ async function deleteScheduledPlan(namespace: string, scheduledPlanId: string): DeleteScheduledPlanResponse { var runtime = new Util.RuntimeOptions{}; var headers = new DeleteScheduledPlanHeaders{}; return deleteScheduledPlanWithOptions(namespace, scheduledPlanId, headers, runtime); } model DeleteSessionClusterHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bd5d90a****'), } model DeleteSessionClusterResponseBody = { data?: SessionCluster(name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-ABCD-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), } model DeleteSessionClusterResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeleteSessionClusterResponseBody(name='body'), } /** * @summary 删除session集群 * * @param headers DeleteSessionClusterHeaders * @param runtime runtime options for this request RuntimeOptions * @return DeleteSessionClusterResponse */ async function deleteSessionClusterWithOptions(namespace: string, sessionClusterName: string, headers: DeleteSessionClusterHeaders, runtime: Util.RuntimeOptions): DeleteSessionClusterResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'DeleteSessionCluster', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/sessionclusters/${OpenApiUtil.getEncodeParam(sessionClusterName)}`, method = 'DELETE', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary 删除session集群 * * @return DeleteSessionClusterResponse */ async function deleteSessionCluster(namespace: string, sessionClusterName: string): DeleteSessionClusterResponse { var runtime = new Util.RuntimeOptions{}; var headers = new DeleteSessionClusterHeaders{}; return deleteSessionClusterWithOptions(namespace, sessionClusterName, headers, runtime); } model DeleteUdfArtifactHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bd5d90a****'), } model DeleteUdfArtifactResponseBody = { data?: DeleteUdfArtifactResult(name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-ABCF-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), } model DeleteUdfArtifactResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeleteUdfArtifactResponseBody(name='body'), } /** * @summary 删除UdfArtifact * * @param headers DeleteUdfArtifactHeaders * @param runtime runtime options for this request RuntimeOptions * @return DeleteUdfArtifactResponse */ async function deleteUdfArtifactWithOptions(namespace: string, udfArtifactName: string, headers: DeleteUdfArtifactHeaders, runtime: Util.RuntimeOptions): DeleteUdfArtifactResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'DeleteUdfArtifact', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/udfartifacts/${OpenApiUtil.getEncodeParam(udfArtifactName)}`, method = 'DELETE', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary 删除UdfArtifact * * @return DeleteUdfArtifactResponse */ async function deleteUdfArtifact(namespace: string, udfArtifactName: string): DeleteUdfArtifactResponse { var runtime = new Util.RuntimeOptions{}; var headers = new DeleteUdfArtifactHeaders{}; return deleteUdfArtifactWithOptions(namespace, udfArtifactName, headers, runtime); } model DeleteUdfFunctionHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model DeleteUdfFunctionRequest { className?: string(name='className', description='The name of the class that corresponds to the UDF. This parameter is required.', example='Category'), udfArtifactName?: string(name='udfArtifactName', description='The name of the resource that corresponds to the UDF that you want to delete. This parameter is required.', example='test-udf'), } model DeleteUdfFunctionResponseBody = { errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The status code returned. The value was fixed to 200. The status code 200 indicates that the request was successful.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model DeleteUdfFunctionResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeleteUdfFunctionResponseBody(name='body'), } /** * @summary Deletes an existing user-defined function (UDF) from a Realtime Compute for Apache Flink workspace. * * @param request DeleteUdfFunctionRequest * @param headers DeleteUdfFunctionHeaders * @param runtime runtime options for this request RuntimeOptions * @return DeleteUdfFunctionResponse */ async function deleteUdfFunctionWithOptions(namespace: string, functionName: string, request: DeleteUdfFunctionRequest, headers: DeleteUdfFunctionHeaders, runtime: Util.RuntimeOptions): DeleteUdfFunctionResponse { Util.validateModel(request); var query : map[string]any = {}; if (!Util.isUnset(request.className)) { query['className'] = request.className; } if (!Util.isUnset(request.udfArtifactName)) { query['udfArtifactName'] = request.udfArtifactName; } var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DeleteUdfFunction', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/udfartifacts/function/${OpenApiUtil.getEncodeParam(functionName)}`, method = 'DELETE', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Deletes an existing user-defined function (UDF) from a Realtime Compute for Apache Flink workspace. * * @param request DeleteUdfFunctionRequest * @return DeleteUdfFunctionResponse */ async function deleteUdfFunction(namespace: string, functionName: string, request: DeleteUdfFunctionRequest): DeleteUdfFunctionResponse { var runtime = new Util.RuntimeOptions{}; var headers = new DeleteUdfFunctionHeaders{}; return deleteUdfFunctionWithOptions(namespace, functionName, request, headers, runtime); } model DeleteVariableHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model DeleteVariableResponseBody = { errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The value was fixed to 200.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model DeleteVariableResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeleteVariableResponseBody(name='body'), } /** * @summary Deletes a variable. * * @param headers DeleteVariableHeaders * @param runtime runtime options for this request RuntimeOptions * @return DeleteVariableResponse */ async function deleteVariableWithOptions(namespace: string, name: string, headers: DeleteVariableHeaders, runtime: Util.RuntimeOptions): DeleteVariableResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'DeleteVariable', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/variables/${OpenApiUtil.getEncodeParam(name)}`, method = 'DELETE', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Deletes a variable. * * @return DeleteVariableResponse */ async function deleteVariable(namespace: string, name: string): DeleteVariableResponse { var runtime = new Util.RuntimeOptions{}; var headers = new DeleteVariableHeaders{}; return deleteVariableWithOptions(namespace, name, headers, runtime); } model DeployDeploymentDraftAsyncHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bd5d90a****'), } model DeployDeploymentDraftAsyncRequest { body?: DraftDeployParams(name='body', description='This parameter is required.'), } model DeployDeploymentDraftAsyncResponseBody = { data?: { ticketId?: string(name='ticketId', example='b3dcdb25-bf36-457d-92ba-a36077e8****'), }(name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), } model DeployDeploymentDraftAsyncResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeployDeploymentDraftAsyncResponseBody(name='body'), } /** * @summary deploy deploymentDraft async * * @param request DeployDeploymentDraftAsyncRequest * @param headers DeployDeploymentDraftAsyncHeaders * @param runtime runtime options for this request RuntimeOptions * @return DeployDeploymentDraftAsyncResponse */ async function deployDeploymentDraftAsyncWithOptions(namespace: string, request: DeployDeploymentDraftAsyncRequest, headers: DeployDeploymentDraftAsyncHeaders, runtime: Util.RuntimeOptions): DeployDeploymentDraftAsyncResponse { Util.validateModel(request); var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, body = OpenApiUtil.parseToMap(request.body), }; var params = new OpenApi.Params{ action = 'DeployDeploymentDraftAsync', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/deployment-drafts/async-deploy`, method = 'POST', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary deploy deploymentDraft async * * @param request DeployDeploymentDraftAsyncRequest * @return DeployDeploymentDraftAsyncResponse */ async function deployDeploymentDraftAsync(namespace: string, request: DeployDeploymentDraftAsyncRequest): DeployDeploymentDraftAsyncResponse { var runtime = new Util.RuntimeOptions{}; var headers = new DeployDeploymentDraftAsyncHeaders{}; return deployDeploymentDraftAsyncWithOptions(namespace, request, headers, runtime); } model ExecuteSqlStatementHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='710d6a64d8c34d'), } model ExecuteSqlStatementRequest { body?: SqlStatementWithContext(name='body'), } model ExecuteSqlStatementResponseBody = { data?: SqlStatementExecuteResult(name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), } model ExecuteSqlStatementResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ExecuteSqlStatementResponseBody(name='body'), } /** * @summary 执行sql语句 * * @param request ExecuteSqlStatementRequest * @param headers ExecuteSqlStatementHeaders * @param runtime runtime options for this request RuntimeOptions * @return ExecuteSqlStatementResponse */ async function executeSqlStatementWithOptions(namespace: string, request: ExecuteSqlStatementRequest, headers: ExecuteSqlStatementHeaders, runtime: Util.RuntimeOptions): ExecuteSqlStatementResponse { Util.validateModel(request); var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, body = OpenApiUtil.parseToMap(request.body), }; var params = new OpenApi.Params{ action = 'ExecuteSqlStatement', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/sql-statement/execute`, method = 'POST', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary 执行sql语句 * * @param request ExecuteSqlStatementRequest * @return ExecuteSqlStatementResponse */ async function executeSqlStatement(namespace: string, request: ExecuteSqlStatementRequest): ExecuteSqlStatementResponse { var runtime = new Util.RuntimeOptions{}; var headers = new ExecuteSqlStatementHeaders{}; return executeSqlStatementWithOptions(namespace, request, headers, runtime); } model FlinkApiProxyHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model FlinkApiProxyRequest { flinkApiPath?: string(name='flinkApiPath', description='The path of the Flink UI. This parameter is required.', example='/jobs/4df35f8e54554b23bf7dcd38a151****'), namespace?: string(name='namespace', description='The name of the namespace. This parameter is required.', example='default-namespace'), resourceId?: string(name='resourceId', description='The resource ID. This parameter is required.', example='5a27a3aa-c5b9-4dc1-8c86-be57d2d6****'), resourceType?: string(name='resourceType', description='The type of the resource. Valid values: * jobs * sessionclusters This parameter is required.', example='jobs'), } model FlinkApiProxyResponseBody = { data?: string(name='data', description='* If the value of success was true, the result of the proxy request was returned. * If the value of success was false, a null value was returned.', example='{ "jobs": [ { "jid": "4df35f8e54554b23bf7dcd38a151****", "name": "69d001d5-419a-4bfc-9c2e-849cacd3****", "state": "RUNNING", "start-time": 1659154942068, "end-time": -1, "duration": 188161756, "last-modification": 1659154968305, "tasks": { "total": 2, "created": 0, "scheduled": 0, "deploying": 0, "running": 2, "finished": 0, "canceling": 0, "canceled": 0, "failed": 0, "reconciling": 0, "initializing": 0 } } ] }'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The value was fixed to 200.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model FlinkApiProxyResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: FlinkApiProxyResponseBody(name='body'), } /** * @summary Provides a Flink request proxy. * * @param request FlinkApiProxyRequest * @param headers FlinkApiProxyHeaders * @param runtime runtime options for this request RuntimeOptions * @return FlinkApiProxyResponse */ async function flinkApiProxyWithOptions(request: FlinkApiProxyRequest, headers: FlinkApiProxyHeaders, runtime: Util.RuntimeOptions): FlinkApiProxyResponse { Util.validateModel(request); var query : map[string]any = {}; if (!Util.isUnset(request.flinkApiPath)) { query['flinkApiPath'] = request.flinkApiPath; } if (!Util.isUnset(request.namespace)) { query['namespace'] = request.namespace; } if (!Util.isUnset(request.resourceId)) { query['resourceId'] = request.resourceId; } if (!Util.isUnset(request.resourceType)) { query['resourceType'] = request.resourceType; } var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'FlinkApiProxy', version = '2022-07-18', protocol = 'HTTPS', pathname = `/flink-ui/v2/proxy`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Provides a Flink request proxy. * * @param request FlinkApiProxyRequest * @return FlinkApiProxyResponse */ async function flinkApiProxy(request: FlinkApiProxyRequest): FlinkApiProxyResponse { var runtime = new Util.RuntimeOptions{}; var headers = new FlinkApiProxyHeaders{}; return flinkApiProxyWithOptions(request, headers, runtime); } model GenerateResourcePlanWithFlinkConfAsyncHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model GenerateResourcePlanWithFlinkConfAsyncRequest { body?: map[string]any(name='body', description='The Flink configuration that is used to generate a resource plan.'), } model GenerateResourcePlanWithFlinkConfAsyncResponseBody = { data?: { ticketId?: string(name='ticketId', description='The ID of the ticket for you to query the asynchronous generation result.', example='b3dcdb25-bf36-457d-92ba-a36077e8****'), }(name='data', description='* If the value of success was true, the asynchronous generation result was returned. * If the value of success was false, a null value was returned.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The value was fixed to 200.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model GenerateResourcePlanWithFlinkConfAsyncResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GenerateResourcePlanWithFlinkConfAsyncResponseBody(name='body'), } /** * @summary Submits a ticket that applies for asynchronous generation of the fine-grained resources. This operation returns the ID of the ticket for you to query the asynchronous generation result. * * @param request GenerateResourcePlanWithFlinkConfAsyncRequest * @param headers GenerateResourcePlanWithFlinkConfAsyncHeaders * @param runtime runtime options for this request RuntimeOptions * @return GenerateResourcePlanWithFlinkConfAsyncResponse */ async function generateResourcePlanWithFlinkConfAsyncWithOptions(namespace: string, deploymentId: string, request: GenerateResourcePlanWithFlinkConfAsyncRequest, headers: GenerateResourcePlanWithFlinkConfAsyncHeaders, runtime: Util.RuntimeOptions): GenerateResourcePlanWithFlinkConfAsyncResponse { Util.validateModel(request); var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, body = OpenApiUtil.parseToMap(request.body), }; var params = new OpenApi.Params{ action = 'GenerateResourcePlanWithFlinkConfAsync', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/deployments/${OpenApiUtil.getEncodeParam(deploymentId)}/resource-plan%3AasyncGenerate`, method = 'POST', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Submits a ticket that applies for asynchronous generation of the fine-grained resources. This operation returns the ID of the ticket for you to query the asynchronous generation result. * * @param request GenerateResourcePlanWithFlinkConfAsyncRequest * @return GenerateResourcePlanWithFlinkConfAsyncResponse */ async function generateResourcePlanWithFlinkConfAsync(namespace: string, deploymentId: string, request: GenerateResourcePlanWithFlinkConfAsyncRequest): GenerateResourcePlanWithFlinkConfAsyncResponse { var runtime = new Util.RuntimeOptions{}; var headers = new GenerateResourcePlanWithFlinkConfAsyncHeaders{}; return generateResourcePlanWithFlinkConfAsyncWithOptions(namespace, deploymentId, request, headers, runtime); } model GetAppliedScheduledPlanHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bda1c4a****'), } model GetAppliedScheduledPlanRequest { deploymentId?: string(name='deploymentId', description='This parameter is required.', example='5737ef81-d2f1-49cf-8752-30910809****'), } model GetAppliedScheduledPlanResponseBody = { data?: ScheduledPlanAppliedInfo(name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), } model GetAppliedScheduledPlanResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetAppliedScheduledPlanResponseBody(name='body'), } /** * @summary 获取应用中的执行定时计划 * * @param request GetAppliedScheduledPlanRequest * @param headers GetAppliedScheduledPlanHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetAppliedScheduledPlanResponse */ async function getAppliedScheduledPlanWithOptions(namespace: string, request: GetAppliedScheduledPlanRequest, headers: GetAppliedScheduledPlanHeaders, runtime: Util.RuntimeOptions): GetAppliedScheduledPlanResponse { Util.validateModel(request); var query : map[string]any = {}; if (!Util.isUnset(request.deploymentId)) { query['deploymentId'] = request.deploymentId; } var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'GetAppliedScheduledPlan', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/scheduled-plans%3AgetExecutedScheduledPlan`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary 获取应用中的执行定时计划 * * @param request GetAppliedScheduledPlanRequest * @return GetAppliedScheduledPlanResponse */ async function getAppliedScheduledPlan(namespace: string, request: GetAppliedScheduledPlanRequest): GetAppliedScheduledPlanResponse { var runtime = new Util.RuntimeOptions{}; var headers = new GetAppliedScheduledPlanHeaders{}; return getAppliedScheduledPlanWithOptions(namespace, request, headers, runtime); } model GetCatalogsHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bd5d90a****'), } model GetCatalogsRequest { catalogName?: string(name='catalogName', example='paimon'), } model GetCatalogsResponseBody = { data?: [ Catalog ](name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-ABCD-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='True'), } model GetCatalogsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetCatalogsResponseBody(name='body'), } /** * @summary 获取catalog * * @param request GetCatalogsRequest * @param headers GetCatalogsHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetCatalogsResponse */ async function getCatalogsWithOptions(namespace: string, request: GetCatalogsRequest, headers: GetCatalogsHeaders, runtime: Util.RuntimeOptions): GetCatalogsResponse { Util.validateModel(request); var query : map[string]any = {}; if (!Util.isUnset(request.catalogName)) { query['catalogName'] = request.catalogName; } var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'GetCatalogs', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/catalogs`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary 获取catalog * * @param request GetCatalogsRequest * @return GetCatalogsResponse */ async function getCatalogs(namespace: string, request: GetCatalogsRequest): GetCatalogsResponse { var runtime = new Util.RuntimeOptions{}; var headers = new GetCatalogsHeaders{}; return getCatalogsWithOptions(namespace, request, headers, runtime); } model GetDatabasesHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bd5d90a****'), } model GetDatabasesRequest { databaseName?: string(name='databaseName', example='paimon-ods'), } model GetDatabasesResponseBody = { data?: [ Database ](name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), } model GetDatabasesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetDatabasesResponseBody(name='body'), } /** * @summary 获取database * * @param request GetDatabasesRequest * @param headers GetDatabasesHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetDatabasesResponse */ async function getDatabasesWithOptions(namespace: string, catalogName: string, request: GetDatabasesRequest, headers: GetDatabasesHeaders, runtime: Util.RuntimeOptions): GetDatabasesResponse { Util.validateModel(request); var query : map[string]any = {}; if (!Util.isUnset(request.databaseName)) { query['databaseName'] = request.databaseName; } var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'GetDatabases', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/catalogs/${OpenApiUtil.getEncodeParam(catalogName)}/databases`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary 获取database * * @param request GetDatabasesRequest * @return GetDatabasesResponse */ async function getDatabases(namespace: string, catalogName: string, request: GetDatabasesRequest): GetDatabasesResponse { var runtime = new Util.RuntimeOptions{}; var headers = new GetDatabasesHeaders{}; return getDatabasesWithOptions(namespace, catalogName, request, headers, runtime); } model GetDeployDeploymentDraftResultHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='710d6a64d8****'), } model GetDeployDeploymentDraftResultResponseBody = { data?: AsyncDraftDeployResult(name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), } model GetDeployDeploymentDraftResultResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetDeployDeploymentDraftResultResponseBody(name='body'), } /** * @summary get deploy deploymentDraft result * * @param headers GetDeployDeploymentDraftResultHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetDeployDeploymentDraftResultResponse */ async function getDeployDeploymentDraftResultWithOptions(namespace: string, ticketId: string, headers: GetDeployDeploymentDraftResultHeaders, runtime: Util.RuntimeOptions): GetDeployDeploymentDraftResultResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'GetDeployDeploymentDraftResult', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/deployment-drafts/tickets/${OpenApiUtil.getEncodeParam(ticketId)}/async-deploy`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary get deploy deploymentDraft result * * @return GetDeployDeploymentDraftResultResponse */ async function getDeployDeploymentDraftResult(namespace: string, ticketId: string): GetDeployDeploymentDraftResultResponse { var runtime = new Util.RuntimeOptions{}; var headers = new GetDeployDeploymentDraftResultHeaders{}; return getDeployDeploymentDraftResultWithOptions(namespace, ticketId, headers, runtime); } model GetDeploymentHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model GetDeploymentResponseBody = { data?: Deployment(name='data', description='* If the value of success was true, the details of the deployment were returned. * If the value of success was false, a null value was returned.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The value was fixed to 200.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model GetDeploymentResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetDeploymentResponseBody(name='body'), } /** * @summary Obtains the details of a deployment. * * @param headers GetDeploymentHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetDeploymentResponse */ async function getDeploymentWithOptions(namespace: string, deploymentId: string, headers: GetDeploymentHeaders, runtime: Util.RuntimeOptions): GetDeploymentResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'GetDeployment', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/deployments/${OpenApiUtil.getEncodeParam(deploymentId)}`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Obtains the details of a deployment. * * @return GetDeploymentResponse */ async function getDeployment(namespace: string, deploymentId: string): GetDeploymentResponse { var runtime = new Util.RuntimeOptions{}; var headers = new GetDeploymentHeaders{}; return getDeploymentWithOptions(namespace, deploymentId, headers, runtime); } model GetDeploymentDraftHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bd5d90a****'), } model GetDeploymentDraftResponseBody = { data?: DeploymentDraft(name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), } model GetDeploymentDraftResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetDeploymentDraftResponseBody(name='body'), } /** * @summary get a deploymentDraft * * @param headers GetDeploymentDraftHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetDeploymentDraftResponse */ async function getDeploymentDraftWithOptions(namespace: string, deploymentDraftId: string, headers: GetDeploymentDraftHeaders, runtime: Util.RuntimeOptions): GetDeploymentDraftResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'GetDeploymentDraft', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/deployment-drafts/${OpenApiUtil.getEncodeParam(deploymentDraftId)}`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary get a deploymentDraft * * @return GetDeploymentDraftResponse */ async function getDeploymentDraft(namespace: string, deploymentDraftId: string): GetDeploymentDraftResponse { var runtime = new Util.RuntimeOptions{}; var headers = new GetDeploymentDraftHeaders{}; return getDeploymentDraftWithOptions(namespace, deploymentDraftId, headers, runtime); } model GetDeploymentDraftLockHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bd5d90a****'), } model GetDeploymentDraftLockRequest { deploymentDraftId?: string(name='deploymentDraftId', description='This parameter is required.', example='c84d73be-40ad-4627-8bdd-fa1eba51b234'), } model GetDeploymentDraftLockResponseBody = { data?: Lock(name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), } model GetDeploymentDraftLockResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetDeploymentDraftLockResponseBody(name='body'), } /** * @summary get deploymentDraft lock * * @param request GetDeploymentDraftLockRequest * @param headers GetDeploymentDraftLockHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetDeploymentDraftLockResponse */ async function getDeploymentDraftLockWithOptions(namespace: string, request: GetDeploymentDraftLockRequest, headers: GetDeploymentDraftLockHeaders, runtime: Util.RuntimeOptions): GetDeploymentDraftLockResponse { Util.validateModel(request); var query : map[string]any = {}; if (!Util.isUnset(request.deploymentDraftId)) { query['deploymentDraftId'] = request.deploymentDraftId; } var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'GetDeploymentDraftLock', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/deployment-drafts/getLock`, method = 'POST', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary get deploymentDraft lock * * @param request GetDeploymentDraftLockRequest * @return GetDeploymentDraftLockResponse */ async function getDeploymentDraftLock(namespace: string, request: GetDeploymentDraftLockRequest): GetDeploymentDraftLockResponse { var runtime = new Util.RuntimeOptions{}; var headers = new GetDeploymentDraftLockHeaders{}; return getDeploymentDraftLockWithOptions(namespace, request, headers, runtime); } model GetEventsHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bd5d90a****'), } model GetEventsRequest { deploymentId?: string(name='deploymentId', example='58718c99-3b29-4c5e-93bb-c9fc4ec6****'), pageIndex?: int32(name='pageIndex', example='1'), pageSize?: int32(name='pageSize', example='10'), } model GetEventsResponseBody = { data?: [ Event ](name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), pageIndex?: int32(name='pageIndex', example='1'), pageSize?: int32(name='pageSize', example='10'), requestId?: string(name='requestId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), totalSize?: int32(name='totalSize', example='4'), } model GetEventsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetEventsResponseBody(name='body'), } /** * @summary 获取运行事件 * * @param request GetEventsRequest * @param headers GetEventsHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetEventsResponse */ async function getEventsWithOptions(namespace: string, request: GetEventsRequest, headers: GetEventsHeaders, runtime: Util.RuntimeOptions): GetEventsResponse { Util.validateModel(request); var query : map[string]any = {}; if (!Util.isUnset(request.deploymentId)) { query['deploymentId'] = request.deploymentId; } if (!Util.isUnset(request.pageIndex)) { query['pageIndex'] = request.pageIndex; } if (!Util.isUnset(request.pageSize)) { query['pageSize'] = request.pageSize; } var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'GetEvents', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/events`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary 获取运行事件 * * @param request GetEventsRequest * @return GetEventsResponse */ async function getEvents(namespace: string, request: GetEventsRequest): GetEventsResponse { var runtime = new Util.RuntimeOptions{}; var headers = new GetEventsHeaders{}; return getEventsWithOptions(namespace, request, headers, runtime); } model GetFolderHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bda1c4a****'), } model GetFolderRequest { folderId?: string(name='folderId', example='89097'), } model GetFolderResponseBody = { data?: Folder(name='data', description='The data structure of the folder.'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), } model GetFolderResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetFolderResponseBody(name='body'), } /** * @summary get a folder * * @param request GetFolderRequest * @param headers GetFolderHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetFolderResponse */ async function getFolderWithOptions(namespace: string, request: GetFolderRequest, headers: GetFolderHeaders, runtime: Util.RuntimeOptions): GetFolderResponse { Util.validateModel(request); var query : map[string]any = {}; if (!Util.isUnset(request.folderId)) { query['folderId'] = request.folderId; } var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'GetFolder', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/folder`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary get a folder * * @param request GetFolderRequest * @return GetFolderResponse */ async function getFolder(namespace: string, request: GetFolderRequest): GetFolderResponse { var runtime = new Util.RuntimeOptions{}; var headers = new GetFolderHeaders{}; return getFolderWithOptions(namespace, request, headers, runtime); } model GetGenerateResourcePlanResultHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model GetGenerateResourcePlanResultResponseBody = { data?: AsyncResourcePlanOperationResult(name='data', description='* If the value of success was true, the asynchronous generation result was returned. * If the value of success was false, a null value was returned.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The value was fixed to 200.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model GetGenerateResourcePlanResultResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetGenerateResourcePlanResultResponseBody(name='body'), } /** * @summary Obtains the asynchronous generation result of fine-grained resources based on the ID of the ticket that applies for an asynchronous generation. * * @param headers GetGenerateResourcePlanResultHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetGenerateResourcePlanResultResponse */ async function getGenerateResourcePlanResultWithOptions(namespace: string, ticketId: string, headers: GetGenerateResourcePlanResultHeaders, runtime: Util.RuntimeOptions): GetGenerateResourcePlanResultResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'GetGenerateResourcePlanResult', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/deployments/tickets/${OpenApiUtil.getEncodeParam(ticketId)}/resource-plan%3AasyncGenerate`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Obtains the asynchronous generation result of fine-grained resources based on the ID of the ticket that applies for an asynchronous generation. * * @return GetGenerateResourcePlanResultResponse */ async function getGenerateResourcePlanResult(namespace: string, ticketId: string): GetGenerateResourcePlanResultResponse { var runtime = new Util.RuntimeOptions{}; var headers = new GetGenerateResourcePlanResultHeaders{}; return getGenerateResourcePlanResultWithOptions(namespace, ticketId, headers, runtime); } model GetHotUpdateJobResultHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bd5d90a****'), } model GetHotUpdateJobResultResponseBody = { data?: HotUpdateJobResult(name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-ABCF-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), } model GetHotUpdateJobResultResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetHotUpdateJobResultResponseBody(name='body'), } /** * @summary 查询动态更新结果 * * @param headers GetHotUpdateJobResultHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetHotUpdateJobResultResponse */ async function getHotUpdateJobResultWithOptions(namespace: string, jobHotUpdateId: string, headers: GetHotUpdateJobResultHeaders, runtime: Util.RuntimeOptions): GetHotUpdateJobResultResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'GetHotUpdateJobResult', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/jobs/hot-updates/${OpenApiUtil.getEncodeParam(jobHotUpdateId)}`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary 查询动态更新结果 * * @return GetHotUpdateJobResultResponse */ async function getHotUpdateJobResult(namespace: string, jobHotUpdateId: string): GetHotUpdateJobResultResponse { var runtime = new Util.RuntimeOptions{}; var headers = new GetHotUpdateJobResultHeaders{}; return getHotUpdateJobResultWithOptions(namespace, jobHotUpdateId, headers, runtime); } model GetJobHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model GetJobResponseBody = { accessDeniedDetail?: string(name='accessDeniedDetail'), data?: Job(name='data', description='* If the value of success was true, the details of the job was returned. * If the value of success was false, a null value was returned.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The value was fixed to 200.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model GetJobResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetJobResponseBody(name='body'), } /** * @summary Obtains the details of a job. * * @param headers GetJobHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetJobResponse */ async function getJobWithOptions(namespace: string, jobId: string, headers: GetJobHeaders, runtime: Util.RuntimeOptions): GetJobResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'GetJob', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/jobs/${OpenApiUtil.getEncodeParam(jobId)}`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Obtains the details of a job. * * @return GetJobResponse */ async function getJob(namespace: string, jobId: string): GetJobResponse { var runtime = new Util.RuntimeOptions{}; var headers = new GetJobHeaders{}; return getJobWithOptions(namespace, jobId, headers, runtime); } model GetJobDiagnosisHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bd5d90a****'), } model GetJobDiagnosisResponseBody = { accessDeniedDetail?: string(name='accessDeniedDetail', example='“”'), data?: JobDiagnosis(name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), } model GetJobDiagnosisResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetJobDiagnosisResponseBody(name='body'), } /** * @summary 获取作业诊断信息 * * @param headers GetJobDiagnosisHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetJobDiagnosisResponse */ async function getJobDiagnosisWithOptions(namespace: string, deploymentId: string, jobId: string, headers: GetJobDiagnosisHeaders, runtime: Util.RuntimeOptions): GetJobDiagnosisResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'GetJobDiagnosis', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/deployments/${OpenApiUtil.getEncodeParam(deploymentId)}/jobs/${OpenApiUtil.getEncodeParam(jobId)}/job-diagnoses/lite`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary 获取作业诊断信息 * * @return GetJobDiagnosisResponse */ async function getJobDiagnosis(namespace: string, deploymentId: string, jobId: string): GetJobDiagnosisResponse { var runtime = new Util.RuntimeOptions{}; var headers = new GetJobDiagnosisHeaders{}; return getJobDiagnosisWithOptions(namespace, deploymentId, jobId, headers, runtime); } model GetLatestJobStartLogHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model GetLatestJobStartLogResponseBody = { data?: string(name='data', description='If the value of success was false, the latest logs of the deployment were returned. If the value of success was true, a null value was returned.', example='"[main] INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint [] - --------------------------------------------------------------------------------\\\\n2024-05-22 11:46:39,871 [main] INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint"'), errorCode?: string(name='errorCode', description='If the value of success was false, an error code was returned. If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='If the value of success was false, an error message was returned. If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The status code returned. The value was fixed to 200.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model GetLatestJobStartLogResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetLatestJobStartLogResponseBody(name='body'), } /** * @summary Obtains the latest startup logs of a job. * * @param headers GetLatestJobStartLogHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetLatestJobStartLogResponse */ async function getLatestJobStartLogWithOptions(namespace: string, deploymentId: string, headers: GetLatestJobStartLogHeaders, runtime: Util.RuntimeOptions): GetLatestJobStartLogResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'GetLatestJobStartLog', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/deployments/${OpenApiUtil.getEncodeParam(deploymentId)}/latest_jobmanager_start_log`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Obtains the latest startup logs of a job. * * @return GetLatestJobStartLogResponse */ async function getLatestJobStartLog(namespace: string, deploymentId: string): GetLatestJobStartLogResponse { var runtime = new Util.RuntimeOptions{}; var headers = new GetLatestJobStartLogHeaders{}; return getLatestJobStartLogWithOptions(namespace, deploymentId, headers, runtime); } model GetLineageInfoHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='710d6a64d8****'), } model GetLineageInfoRequest { body?: GetLineageInfoParams(name='body', description='The parameters about the lineage information.'), } model GetLineageInfoResponseBody = { data?: LineageInfo(name='data', description='The lineage information.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The status code returned. The value was fixed to 200. The status code 200 indicates that the request was successful.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model GetLineageInfoResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetLineageInfoResponseBody(name='body'), } /** * @summary Obtains the lineage information of a deployment. * * @param request GetLineageInfoRequest * @param headers GetLineageInfoHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetLineageInfoResponse */ async function getLineageInfoWithOptions(request: GetLineageInfoRequest, headers: GetLineageInfoHeaders, runtime: Util.RuntimeOptions): GetLineageInfoResponse { Util.validateModel(request); var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, body = OpenApiUtil.parseToMap(request.body), }; var params = new OpenApi.Params{ action = 'GetLineageInfo', version = '2022-07-18', protocol = 'HTTPS', pathname = `/meta/v2/lineage`, method = 'POST', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Obtains the lineage information of a deployment. * * @param request GetLineageInfoRequest * @return GetLineageInfoResponse */ async function getLineageInfo(request: GetLineageInfoRequest): GetLineageInfoResponse { var runtime = new Util.RuntimeOptions{}; var headers = new GetLineageInfoHeaders{}; return getLineageInfoWithOptions(request, headers, runtime); } model GetMemberHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model GetMemberResponseBody = { data?: Member(name='data', description='* If the value of success was false, a null value was returned. * If the value of success was true, the authorization information was returned.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The status code returned. The value was fixed to 200. The status code 200 indicates that the request was successful.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model GetMemberResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetMemberResponseBody(name='body'), } /** * @summary Queries the permissions of a member. * * @param headers GetMemberHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetMemberResponse */ async function getMemberWithOptions(namespace: string, member: string, headers: GetMemberHeaders, runtime: Util.RuntimeOptions): GetMemberResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'GetMember', version = '2022-07-18', protocol = 'HTTPS', pathname = `/gateway/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/members/${OpenApiUtil.getEncodeParam(member)}`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Queries the permissions of a member. * * @return GetMemberResponse */ async function getMember(namespace: string, member: string): GetMemberResponse { var runtime = new Util.RuntimeOptions{}; var headers = new GetMemberHeaders{}; return getMemberWithOptions(namespace, member, headers, runtime); } model GetSavepointHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model GetSavepointResponseBody = { data?: Savepoint(name='data', description='* If the value of success was true, the savepoint information was returned. * If the value of success was false, a null value was returned.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The value was fixed to 200.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model GetSavepointResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetSavepointResponseBody(name='body'), } /** * @summary Queries details of a savepoint and checkpoint. * * @param headers GetSavepointHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetSavepointResponse */ async function getSavepointWithOptions(namespace: string, savepointId: string, headers: GetSavepointHeaders, runtime: Util.RuntimeOptions): GetSavepointResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'GetSavepoint', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/savepoints/${OpenApiUtil.getEncodeParam(savepointId)}`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Queries details of a savepoint and checkpoint. * * @return GetSavepointResponse */ async function getSavepoint(namespace: string, savepointId: string): GetSavepointResponse { var runtime = new Util.RuntimeOptions{}; var headers = new GetSavepointHeaders{}; return getSavepointWithOptions(namespace, savepointId, headers, runtime); } model GetSessionClusterHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bd5d90a****'), } model GetSessionClusterResponseBody = { data?: SessionCluster(name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), } model GetSessionClusterResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetSessionClusterResponseBody(name='body'), } /** * @summary 获取session集群 * * @param headers GetSessionClusterHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetSessionClusterResponse */ async function getSessionClusterWithOptions(namespace: string, sessionClusterName: string, headers: GetSessionClusterHeaders, runtime: Util.RuntimeOptions): GetSessionClusterResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'GetSessionCluster', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/sessionclusters/${OpenApiUtil.getEncodeParam(sessionClusterName)}`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary 获取session集群 * * @return GetSessionClusterResponse */ async function getSessionCluster(namespace: string, sessionClusterName: string): GetSessionClusterResponse { var runtime = new Util.RuntimeOptions{}; var headers = new GetSessionClusterHeaders{}; return getSessionClusterWithOptions(namespace, sessionClusterName, headers, runtime); } model GetTablesHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bd5d90a****'), } model GetTablesRequest { tableName?: string(name='tableName', example='item'), } model GetTablesResponseBody = { data?: [ Table ](name='data', description='If the value of success was true, the list and details of tables that meet the condition were returned. If the value of success was false, a null value was returned.'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='ECE641B2-AB0B-4174-9C3B-885881558637'), success?: boolean(name='success', example='true'), } model GetTablesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetTablesResponseBody(name='body'), } /** * @summary 获取table * * @param request GetTablesRequest * @param headers GetTablesHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetTablesResponse */ async function getTablesWithOptions(namespace: string, catalogName: string, databaseName: string, request: GetTablesRequest, headers: GetTablesHeaders, runtime: Util.RuntimeOptions): GetTablesResponse { Util.validateModel(request); var query : map[string]any = {}; if (!Util.isUnset(request.tableName)) { query['tableName'] = request.tableName; } var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'GetTables', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/catalogs/${OpenApiUtil.getEncodeParam(catalogName)}/databases/${OpenApiUtil.getEncodeParam(databaseName)}/tables`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary 获取table * * @param request GetTablesRequest * @return GetTablesResponse */ async function getTables(namespace: string, catalogName: string, databaseName: string, request: GetTablesRequest): GetTablesResponse { var runtime = new Util.RuntimeOptions{}; var headers = new GetTablesHeaders{}; return getTablesWithOptions(namespace, catalogName, databaseName, request, headers, runtime); } model GetUdfArtifactsHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='710d6a64d8c34d'), } model GetUdfArtifactsRequest { udfArtifactName?: string(name='udfArtifactName', description='The name of the JAR or Python file that corresponds to the UDF.', example='test-udf'), } model GetUdfArtifactsResponseBody = { data?: [ UdfArtifact ](name='data', description='If the value of success was true, the details of the JAR or Python file that corresponds to the UDF were returned. If the value of success was false, a null value was returned.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The status code returned. The value was fixed to 200. The status code 200 indicates that the request was successful.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model GetUdfArtifactsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetUdfArtifactsResponseBody(name='body'), } /** * @summary Obtains the details of the JAR or Python file that corresponds to the user-defined function (UDF) that you upload and create. * * @param request GetUdfArtifactsRequest * @param headers GetUdfArtifactsHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetUdfArtifactsResponse */ async function getUdfArtifactsWithOptions(namespace: string, request: GetUdfArtifactsRequest, headers: GetUdfArtifactsHeaders, runtime: Util.RuntimeOptions): GetUdfArtifactsResponse { Util.validateModel(request); var query : map[string]any = {}; if (!Util.isUnset(request.udfArtifactName)) { query['udfArtifactName'] = request.udfArtifactName; } var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'GetUdfArtifacts', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/udfartifacts`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Obtains the details of the JAR or Python file that corresponds to the user-defined function (UDF) that you upload and create. * * @param request GetUdfArtifactsRequest * @return GetUdfArtifactsResponse */ async function getUdfArtifacts(namespace: string, request: GetUdfArtifactsRequest): GetUdfArtifactsResponse { var runtime = new Util.RuntimeOptions{}; var headers = new GetUdfArtifactsHeaders{}; return getUdfArtifactsWithOptions(namespace, request, headers, runtime); } model HotUpdateJobHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model HotUpdateJobResponseBody = { data?: HotUpdateJobResult(name='data', description='The dynamic update result.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The status code returned. The value was fixed to 200. The status code 200 indicates that the request was successful.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model HotUpdateJobResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: HotUpdateJobResponseBody(name='body'), } /** * @summary Dynamically updates parameters or resources of a deployment that is running. * * @param headers HotUpdateJobHeaders * @param runtime runtime options for this request RuntimeOptions * @return HotUpdateJobResponse */ async function hotUpdateJobWithOptions(namespace: string, jobId: string, headers: HotUpdateJobHeaders, runtime: Util.RuntimeOptions): HotUpdateJobResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'HotUpdateJob', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/jobs/${OpenApiUtil.getEncodeParam(jobId)}%3AhotUpdate`, method = 'POST', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Dynamically updates parameters or resources of a deployment that is running. * * @return HotUpdateJobResponse */ async function hotUpdateJob(namespace: string, jobId: string): HotUpdateJobResponse { var runtime = new Util.RuntimeOptions{}; var headers = new HotUpdateJobHeaders{}; return hotUpdateJobWithOptions(namespace, jobId, headers, runtime); } model ListCustomConnectorsHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model ListCustomConnectorsResponseBody = { data?: [ Connector ](name='data', description='If the value of success was true, the list of custom connectors in the namespace was returned. If the value of success was false, a null value was returned.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The status code returned. The value was fixed to 200. The status code 200 indicates that the request was successful.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model ListCustomConnectorsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListCustomConnectorsResponseBody(name='body'), } /** * @summary Obtains a list of existing custom connectors. * * @param headers ListCustomConnectorsHeaders * @param runtime runtime options for this request RuntimeOptions * @return ListCustomConnectorsResponse */ async function listCustomConnectorsWithOptions(namespace: string, headers: ListCustomConnectorsHeaders, runtime: Util.RuntimeOptions): ListCustomConnectorsResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'ListCustomConnectors', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/connectors`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Obtains a list of existing custom connectors. * * @return ListCustomConnectorsResponse */ async function listCustomConnectors(namespace: string): ListCustomConnectorsResponse { var runtime = new Util.RuntimeOptions{}; var headers = new ListCustomConnectorsHeaders{}; return listCustomConnectorsWithOptions(namespace, headers, runtime); } model ListDeploymentDraftsHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bd5d90a****'), } model ListDeploymentDraftsRequest { pageIndex?: int32(name='pageIndex', example='1'), pageSize?: int32(name='pageSize', example='10'), } model ListDeploymentDraftsResponseBody = { data?: [ DeploymentDraft ](name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), pageIndex?: int32(name='pageIndex', example='1'), pageSize?: int32(name='pageSize', example='10'), requestId?: string(name='requestId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), totalSize?: int32(name='totalSize', example='69'), } model ListDeploymentDraftsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListDeploymentDraftsResponseBody(name='body'), } /** * @summary list deploymentDrafts * * @param request ListDeploymentDraftsRequest * @param headers ListDeploymentDraftsHeaders * @param runtime runtime options for this request RuntimeOptions * @return ListDeploymentDraftsResponse */ async function listDeploymentDraftsWithOptions(namespace: string, request: ListDeploymentDraftsRequest, headers: ListDeploymentDraftsHeaders, runtime: Util.RuntimeOptions): ListDeploymentDraftsResponse { Util.validateModel(request); var query : map[string]any = {}; if (!Util.isUnset(request.pageIndex)) { query['pageIndex'] = request.pageIndex; } if (!Util.isUnset(request.pageSize)) { query['pageSize'] = request.pageSize; } var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListDeploymentDrafts', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/deployment-drafts`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary list deploymentDrafts * * @param request ListDeploymentDraftsRequest * @return ListDeploymentDraftsResponse */ async function listDeploymentDrafts(namespace: string, request: ListDeploymentDraftsRequest): ListDeploymentDraftsResponse { var runtime = new Util.RuntimeOptions{}; var headers = new ListDeploymentDraftsHeaders{}; return listDeploymentDraftsWithOptions(namespace, request, headers, runtime); } model ListDeploymentTargetsHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model ListDeploymentTargetsRequest { pageIndex?: int32(name='pageIndex', description='The page number. Minimum value: 1. Default value: 1.', example='1'), pageSize?: int32(name='pageSize', description='The number of entries per page. Valid values: 1 to 100. Default value: 10.', example='10'), } model ListDeploymentTargetsResponseBody = { data?: [ DeploymentTarget ](name='data', description='* If the value of success was true, a list of clusters in which the deployment is deployed was returned. * If the value of success was false, a null value was returned.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The value was fixed to 200.', example='200'), pageIndex?: int32(name='pageIndex', description='The page number.', example='1'), pageSize?: int32(name='pageSize', description='The number of entries per page.', example='10'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), totalSize?: int32(name='totalSize', description='The total number of entries returned.', example='1'), } model ListDeploymentTargetsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListDeploymentTargetsResponseBody(name='body'), } /** * @summary Obtains a list of clusters in which deployments can be deployed. The cluster can be a session cluster or a per-job cluster. * * @param request ListDeploymentTargetsRequest * @param headers ListDeploymentTargetsHeaders * @param runtime runtime options for this request RuntimeOptions * @return ListDeploymentTargetsResponse */ async function listDeploymentTargetsWithOptions(namespace: string, request: ListDeploymentTargetsRequest, headers: ListDeploymentTargetsHeaders, runtime: Util.RuntimeOptions): ListDeploymentTargetsResponse { Util.validateModel(request); var query : map[string]any = {}; if (!Util.isUnset(request.pageIndex)) { query['pageIndex'] = request.pageIndex; } if (!Util.isUnset(request.pageSize)) { query['pageSize'] = request.pageSize; } var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListDeploymentTargets', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/deployment-targets`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Obtains a list of clusters in which deployments can be deployed. The cluster can be a session cluster or a per-job cluster. * * @param request ListDeploymentTargetsRequest * @return ListDeploymentTargetsResponse */ async function listDeploymentTargets(namespace: string, request: ListDeploymentTargetsRequest): ListDeploymentTargetsResponse { var runtime = new Util.RuntimeOptions{}; var headers = new ListDeploymentTargetsHeaders{}; return listDeploymentTargetsWithOptions(namespace, request, headers, runtime); } model ListDeploymentsHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model ListDeploymentsRequest { creator?: string(name='creator', description='The ID of the user who creates the deployment.', example='183899668*******'), executionMode?: string(name='executionMode', description='The execution mode of the deployment. Valid values: * BATCH * STREAMING', example='STREAMING'), labelKey?: string(name='labelKey', description='The tag key.', example='key'), labelValueArray?: string(name='labelValueArray', description='The tag value. Separate multiple values with semicolon (;).', example='value1,value2'), modifier?: string(name='modifier', description='The ID of the user who modifies the deployment.', example='183899668*******'), name?: string(name='name', description='The name of the deployment.', example='vvp_ds_0522'), pageIndex?: int32(name='pageIndex', description='The page number. Minimum value: 1. Default value: 1.', example='1'), pageSize?: int32(name='pageSize', description='The number of entries per page. Valid values: 1 to 100. Default value: 10.', example='10'), sortName?: string(name='sortName'), status?: string(name='status', description='The latest status of the deployment. Valid values: * CANCELLED * FAILED * RUNNING * TRANSITIONING * FINISHED', example='RUNNING'), } model ListDeploymentsResponseBody = { data?: [ Deployment ](name='data', description='* If the value of success was true, the list of all deployments was returned. * If the value of success was false, a null value was returned.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The value was fixed to 200.', example='200'), pageIndex?: int32(name='pageIndex', description='The page number.', example='1'), pageSize?: int32(name='pageSize', description='The number of entries per page.', example='10'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), totalSize?: int32(name='totalSize', description='The total number of entries returned.', example='1'), } model ListDeploymentsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListDeploymentsResponseBody(name='body'), } /** * @summary Obtains information about all deployments. * * @param request ListDeploymentsRequest * @param headers ListDeploymentsHeaders * @param runtime runtime options for this request RuntimeOptions * @return ListDeploymentsResponse */ async function listDeploymentsWithOptions(namespace: string, request: ListDeploymentsRequest, headers: ListDeploymentsHeaders, runtime: Util.RuntimeOptions): ListDeploymentsResponse { Util.validateModel(request); var query : map[string]any = {}; if (!Util.isUnset(request.creator)) { query['creator'] = request.creator; } if (!Util.isUnset(request.executionMode)) { query['executionMode'] = request.executionMode; } if (!Util.isUnset(request.labelKey)) { query['labelKey'] = request.labelKey; } if (!Util.isUnset(request.labelValueArray)) { query['labelValueArray'] = request.labelValueArray; } if (!Util.isUnset(request.modifier)) { query['modifier'] = request.modifier; } if (!Util.isUnset(request.name)) { query['name'] = request.name; } if (!Util.isUnset(request.pageIndex)) { query['pageIndex'] = request.pageIndex; } if (!Util.isUnset(request.pageSize)) { query['pageSize'] = request.pageSize; } if (!Util.isUnset(request.sortName)) { query['sortName'] = request.sortName; } if (!Util.isUnset(request.status)) { query['status'] = request.status; } var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListDeployments', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/deployments`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Obtains information about all deployments. * * @param request ListDeploymentsRequest * @return ListDeploymentsResponse */ async function listDeployments(namespace: string, request: ListDeploymentsRequest): ListDeploymentsResponse { var runtime = new Util.RuntimeOptions{}; var headers = new ListDeploymentsHeaders{}; return listDeploymentsWithOptions(namespace, request, headers, runtime); } model ListEditableNamespaceRequest { namespace?: string(name='namespace'), pageIndex?: string(name='pageIndex'), pageSize?: string(name='pageSize'), regionId?: string(name='regionId', description='This parameter is required.'), workspaceId?: string(name='workspaceId'), } model ListEditableNamespaceResponseBody = { data?: { editableNamespaces?: [ EditableNamespace ](name='editableNamespaces'), pageIndex?: string(name='pageIndex'), pageSize?: string(name='pageSize'), total?: string(name='total'), }(name='data'), httpCode?: int32(name='httpCode'), message?: string(name='message'), reason?: string(name='reason'), requestId?: string(name='requestId'), success?: boolean(name='success'), } model ListEditableNamespaceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListEditableNamespaceResponseBody(name='body'), } /** * @summary 列出有编辑权限的项目空间。 * * @param request ListEditableNamespaceRequest * @param headers map * @param runtime runtime options for this request RuntimeOptions * @return ListEditableNamespaceResponse */ async function listEditableNamespaceWithOptions(request: ListEditableNamespaceRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListEditableNamespaceResponse { Util.validateModel(request); var query : map[string]any = {}; if (!Util.isUnset(request.namespace)) { query['namespace'] = request.namespace; } if (!Util.isUnset(request.pageIndex)) { query['pageIndex'] = request.pageIndex; } if (!Util.isUnset(request.pageSize)) { query['pageSize'] = request.pageSize; } if (!Util.isUnset(request.regionId)) { query['regionId'] = request.regionId; } if (!Util.isUnset(request.workspaceId)) { query['workspaceId'] = request.workspaceId; } var req = new OpenApi.OpenApiRequest{ headers = headers, query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListEditableNamespace', version = '2022-07-18', protocol = 'HTTPS', pathname = `/gateway/v2/namespaces/editable`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary 列出有编辑权限的项目空间。 * * @param request ListEditableNamespaceRequest * @return ListEditableNamespaceResponse */ async function listEditableNamespace(request: ListEditableNamespaceRequest): ListEditableNamespaceResponse { var runtime = new Util.RuntimeOptions{}; var headers : map[string]string = {}; return listEditableNamespaceWithOptions(request, headers, runtime); } model ListEngineVersionMetadataHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model ListEngineVersionMetadataResponseBody = { data?: EngineVersionMetadataIndex(name='data', description='* If the value of success was true, the engine versions that are supported by Realtime Compute for Apache Flink were returned. * If the value of success was false, a null value was returned.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The value was fixed to 200.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model ListEngineVersionMetadataResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListEngineVersionMetadataResponseBody(name='body'), } /** * @summary Obtains a list of engine versions that are supported by Realtime Compute for Apache Flink. * * @param headers ListEngineVersionMetadataHeaders * @param runtime runtime options for this request RuntimeOptions * @return ListEngineVersionMetadataResponse */ async function listEngineVersionMetadataWithOptions(headers: ListEngineVersionMetadataHeaders, runtime: Util.RuntimeOptions): ListEngineVersionMetadataResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'ListEngineVersionMetadata', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/engine-version-meta.json`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Obtains a list of engine versions that are supported by Realtime Compute for Apache Flink. * * @return ListEngineVersionMetadataResponse */ async function listEngineVersionMetadata(): ListEngineVersionMetadataResponse { var runtime = new Util.RuntimeOptions{}; var headers = new ListEngineVersionMetadataHeaders{}; return listEngineVersionMetadataWithOptions(headers, runtime); } model ListJobsHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model ListJobsRequest { deploymentId?: string(name='deploymentId', description='The deployment ID. This parameter is required.', example='58718c99-3b29-4c5e-93bb-c9fc4ec6****'), pageIndex?: int32(name='pageIndex', description='The page number. Minimum value: 1. Default value: 1.', example='1'), pageSize?: int32(name='pageSize', description='The number of entries per page. Valid values: 1 to 100. Default value: 10.', example='10'), sortName?: string(name='sortName', description='The collation. Valid values: * gmt_create * job_id * status', example='gmt_create'), } model ListJobsResponseBody = { accessDeniedDetail?: string(name='accessDeniedDetail'), data?: [ Job ](name='data', description='* If the value of success was true, all jobs that meet the condition were returned. * If the value of success was false, a null value was returned.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The value was fixed to 200.', example='200'), pageIndex?: int32(name='pageIndex', description='The page number.', example='1'), pageSize?: int32(name='pageSize', description='The number of entries per page.', example='10'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), totalSize?: int32(name='totalSize', description='The total number of entries returned.', example='1'), } model ListJobsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListJobsResponseBody(name='body'), } /** * @summary Queries the information about all jobs in a deployment. * * @param request ListJobsRequest * @param headers ListJobsHeaders * @param runtime runtime options for this request RuntimeOptions * @return ListJobsResponse */ async function listJobsWithOptions(namespace: string, request: ListJobsRequest, headers: ListJobsHeaders, runtime: Util.RuntimeOptions): ListJobsResponse { Util.validateModel(request); var query : map[string]any = {}; if (!Util.isUnset(request.deploymentId)) { query['deploymentId'] = request.deploymentId; } if (!Util.isUnset(request.pageIndex)) { query['pageIndex'] = request.pageIndex; } if (!Util.isUnset(request.pageSize)) { query['pageSize'] = request.pageSize; } if (!Util.isUnset(request.sortName)) { query['sortName'] = request.sortName; } var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListJobs', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/jobs`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Queries the information about all jobs in a deployment. * * @param request ListJobsRequest * @return ListJobsResponse */ async function listJobs(namespace: string, request: ListJobsRequest): ListJobsResponse { var runtime = new Util.RuntimeOptions{}; var headers = new ListJobsHeaders{}; return listJobsWithOptions(namespace, request, headers, runtime); } model ListMembersHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model ListMembersRequest { pageIndex?: int32(name='pageIndex', description='The page number. Default value: 1.', example='1'), pageSize?: int32(name='pageSize', description='The number of entries per page. Default value: 10. Maximum value: 100.', example='10'), } model ListMembersResponseBody = { data?: [ Member ](name='data', description='* If the value of success was false, a null value was returned. * If the value of success was true, the authorization information was returned.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The status code returned. The value was fixed to 200. The status code 200 indicates that the request was successful.', example='200'), pageIndex?: int32(name='pageIndex', description='The page number.', example='1'), pageSize?: int32(name='pageSize', description='The number of entries per page.', example='10'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), totalSize?: int32(name='totalSize', description='The total number of entries returned.', example='50'), } model ListMembersResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListMembersResponseBody(name='body'), } /** * @summary Queries the mappings between the ID and permissions of a member in a specific namespace. * * @param request ListMembersRequest * @param headers ListMembersHeaders * @param runtime runtime options for this request RuntimeOptions * @return ListMembersResponse */ async function listMembersWithOptions(namespace: string, request: ListMembersRequest, headers: ListMembersHeaders, runtime: Util.RuntimeOptions): ListMembersResponse { Util.validateModel(request); var query : map[string]any = {}; if (!Util.isUnset(request.pageIndex)) { query['pageIndex'] = request.pageIndex; } if (!Util.isUnset(request.pageSize)) { query['pageSize'] = request.pageSize; } var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListMembers', version = '2022-07-18', protocol = 'HTTPS', pathname = `/gateway/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/members`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Queries the mappings between the ID and permissions of a member in a specific namespace. * * @param request ListMembersRequest * @return ListMembersResponse */ async function listMembers(namespace: string, request: ListMembersRequest): ListMembersResponse { var runtime = new Util.RuntimeOptions{}; var headers = new ListMembersHeaders{}; return listMembersWithOptions(namespace, request, headers, runtime); } model ListSavepointsHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model ListSavepointsRequest { deploymentId?: string(name='deploymentId', description='The deployment ID. This parameter is optional.', example='88a8fc49-e090-430a-85d8-3ee8c79c****'), jobId?: string(name='jobId', description='The job ID. This parameter is optional.', example='99a8fc49-e090-430a-85d8-3ee8c79c****'), pageIndex?: int32(name='pageIndex', description='The page number. Minimum value: 1. Default value: 1.', example='1'), pageSize?: int32(name='pageSize', description='The number of entries per page. Valid values: 1 to 100. Default value: 10.', example='10'), } model ListSavepointsResponseBody = { data?: [ Savepoint ](name='data', description='* If the value of success was true, a list of savepoints was returned. * If the value of success was false, a null value was returned.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The value was fixed to 200.', example='200'), pageIndex?: int32(name='pageIndex', description='The page number.', example='1'), pageSize?: int32(name='pageSize', description='The number of entries per page.', example='10'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), totalSize?: int32(name='totalSize', description='The total number of entries returned.', example='1'), } model ListSavepointsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListSavepointsResponseBody(name='body'), } /** * @summary Obtains a list of savepoints or checkpoints. * * @param request ListSavepointsRequest * @param headers ListSavepointsHeaders * @param runtime runtime options for this request RuntimeOptions * @return ListSavepointsResponse */ async function listSavepointsWithOptions(namespace: string, request: ListSavepointsRequest, headers: ListSavepointsHeaders, runtime: Util.RuntimeOptions): ListSavepointsResponse { Util.validateModel(request); var query : map[string]any = {}; if (!Util.isUnset(request.deploymentId)) { query['deploymentId'] = request.deploymentId; } if (!Util.isUnset(request.jobId)) { query['jobId'] = request.jobId; } if (!Util.isUnset(request.pageIndex)) { query['pageIndex'] = request.pageIndex; } if (!Util.isUnset(request.pageSize)) { query['pageSize'] = request.pageSize; } var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListSavepoints', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/savepoints`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Obtains a list of savepoints or checkpoints. * * @param request ListSavepointsRequest * @return ListSavepointsResponse */ async function listSavepoints(namespace: string, request: ListSavepointsRequest): ListSavepointsResponse { var runtime = new Util.RuntimeOptions{}; var headers = new ListSavepointsHeaders{}; return listSavepointsWithOptions(namespace, request, headers, runtime); } model ListScheduledPlanHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bd5d90a****'), } model ListScheduledPlanRequest { deploymentId?: string(name='deploymentId', example='737d0921-c5ac-47fc-9ba9-07a1e0b4****'), pageIndex?: int32(name='pageIndex', example='1'), pageSize?: int32(name='pageSize', example='10'), } model ListScheduledPlanResponseBody = { data?: [ ScheduledPlan ](name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), pageIndex?: int32(name='pageIndex', example='1'), pageSize?: int32(name='pageSize', example='10'), requestId?: string(name='requestId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), totalSize?: int32(name='totalSize', example='4'), } model ListScheduledPlanResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListScheduledPlanResponseBody(name='body'), } /** * @summary 列表定时执行计划 * * @param request ListScheduledPlanRequest * @param headers ListScheduledPlanHeaders * @param runtime runtime options for this request RuntimeOptions * @return ListScheduledPlanResponse */ async function listScheduledPlanWithOptions(namespace: string, request: ListScheduledPlanRequest, headers: ListScheduledPlanHeaders, runtime: Util.RuntimeOptions): ListScheduledPlanResponse { Util.validateModel(request); var query : map[string]any = {}; if (!Util.isUnset(request.deploymentId)) { query['deploymentId'] = request.deploymentId; } if (!Util.isUnset(request.pageIndex)) { query['pageIndex'] = request.pageIndex; } if (!Util.isUnset(request.pageSize)) { query['pageSize'] = request.pageSize; } var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListScheduledPlan', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/scheduled-plans`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary 列表定时执行计划 * * @param request ListScheduledPlanRequest * @return ListScheduledPlanResponse */ async function listScheduledPlan(namespace: string, request: ListScheduledPlanRequest): ListScheduledPlanResponse { var runtime = new Util.RuntimeOptions{}; var headers = new ListScheduledPlanHeaders{}; return listScheduledPlanWithOptions(namespace, request, headers, runtime); } model ListScheduledPlanExecutedHistoryHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bda1c4a****'), } model ListScheduledPlanExecutedHistoryRequest { deploymentId?: string(name='deploymentId', description='This parameter is required.', example='58718c99-3b29-4c5e-93bb-c9fc4ec6****'), origin?: string(name='origin', example='SCHEDULED_PLAN'), } model ListScheduledPlanExecutedHistoryResponseBody = { data?: [ ScheduledPlanExecutedInfo ](name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), pageIndex?: int32(name='pageIndex', example='1'), pageSize?: int32(name='pageSize', example='10'), requestId?: string(name='requestId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), totalSize?: int32(name='totalSize'), } model ListScheduledPlanExecutedHistoryResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListScheduledPlanExecutedHistoryResponseBody(name='body'), } /** * @summary 获取作业资源变更历史 * * @param request ListScheduledPlanExecutedHistoryRequest * @param headers ListScheduledPlanExecutedHistoryHeaders * @param runtime runtime options for this request RuntimeOptions * @return ListScheduledPlanExecutedHistoryResponse */ async function listScheduledPlanExecutedHistoryWithOptions(namespace: string, request: ListScheduledPlanExecutedHistoryRequest, headers: ListScheduledPlanExecutedHistoryHeaders, runtime: Util.RuntimeOptions): ListScheduledPlanExecutedHistoryResponse { Util.validateModel(request); var query : map[string]any = {}; if (!Util.isUnset(request.deploymentId)) { query['deploymentId'] = request.deploymentId; } if (!Util.isUnset(request.origin)) { query['origin'] = request.origin; } var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListScheduledPlanExecutedHistory', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/job-resource-upgradings`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary 获取作业资源变更历史 * * @param request ListScheduledPlanExecutedHistoryRequest * @return ListScheduledPlanExecutedHistoryResponse */ async function listScheduledPlanExecutedHistory(namespace: string, request: ListScheduledPlanExecutedHistoryRequest): ListScheduledPlanExecutedHistoryResponse { var runtime = new Util.RuntimeOptions{}; var headers = new ListScheduledPlanExecutedHistoryHeaders{}; return listScheduledPlanExecutedHistoryWithOptions(namespace, request, headers, runtime); } model ListSessionClustersHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bd5d90a****'), } model ListSessionClustersResponseBody = { data?: [ SessionCluster ](name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-ABCD-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), } model ListSessionClustersResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListSessionClustersResponseBody(name='body'), } /** * @summary 列举session集群 * * @param headers ListSessionClustersHeaders * @param runtime runtime options for this request RuntimeOptions * @return ListSessionClustersResponse */ async function listSessionClustersWithOptions(namespace: string, headers: ListSessionClustersHeaders, runtime: Util.RuntimeOptions): ListSessionClustersResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'ListSessionClusters', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/sessionclusters`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary 列举session集群 * * @return ListSessionClustersResponse */ async function listSessionClusters(namespace: string): ListSessionClustersResponse { var runtime = new Util.RuntimeOptions{}; var headers = new ListSessionClustersHeaders{}; return listSessionClustersWithOptions(namespace, headers, runtime); } model ListVariablesHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bda1c4a****'), } model ListVariablesRequest { pageIndex?: int32(name='pageIndex', description='The page number. Minimum value: 1. Default value: 1.', example='1'), pageSize?: int32(name='pageSize', description='The number of entries per page. Valid values: 1 to 100. Default value: 10.', example='10'), } model ListVariablesResponseBody = { data?: [ Variable ](name='data', description='* If the value of success was true, a list of variables was returned. * If the value of success was false, a null value was returned.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The value was fixed to 200.', example='200'), pageIndex?: int32(name='pageIndex', description='The page number.', example='1'), pageSize?: int32(name='pageSize', description='The number of entries per page.', example='10'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-ABCF-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), totalSize?: int32(name='totalSize', description='The total number of entries returned.', example='1'), } model ListVariablesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListVariablesResponseBody(name='body'), } /** * @summary Obtains a list of variables. * * @param request ListVariablesRequest * @param headers ListVariablesHeaders * @param runtime runtime options for this request RuntimeOptions * @return ListVariablesResponse */ async function listVariablesWithOptions(namespace: string, request: ListVariablesRequest, headers: ListVariablesHeaders, runtime: Util.RuntimeOptions): ListVariablesResponse { Util.validateModel(request); var query : map[string]any = {}; if (!Util.isUnset(request.pageIndex)) { query['pageIndex'] = request.pageIndex; } if (!Util.isUnset(request.pageSize)) { query['pageSize'] = request.pageSize; } var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListVariables', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/variables`, method = 'GET', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Obtains a list of variables. * * @param request ListVariablesRequest * @return ListVariablesResponse */ async function listVariables(namespace: string, request: ListVariablesRequest): ListVariablesResponse { var runtime = new Util.RuntimeOptions{}; var headers = new ListVariablesHeaders{}; return listVariablesWithOptions(namespace, request, headers, runtime); } model RegisterCustomConnectorHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model RegisterCustomConnectorRequest { jarUrl?: string(name='jarUrl', description='The URL in which the JAR package of the custom connector is stored. The platform must be able to access this address. This parameter is required.', example='oss://flink/connector/mysql123'), } model RegisterCustomConnectorResponseBody = { data?: [ Connector ](name='data', description='If the value of success was true, a list of deployments in which custom connectors were deleted was returned. If the value of success was false, a null value was returned.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The status code returned. The value was fixed to 200. The status code 200 indicates that the request was successful.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model RegisterCustomConnectorResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: RegisterCustomConnectorResponseBody(name='body'), } /** * @summary Registers a custom connector in a namespace. The registered custom connector can be used in SQL statements. * * @param request RegisterCustomConnectorRequest * @param headers RegisterCustomConnectorHeaders * @param runtime runtime options for this request RuntimeOptions * @return RegisterCustomConnectorResponse */ async function registerCustomConnectorWithOptions(namespace: string, request: RegisterCustomConnectorRequest, headers: RegisterCustomConnectorHeaders, runtime: Util.RuntimeOptions): RegisterCustomConnectorResponse { Util.validateModel(request); var query : map[string]any = {}; if (!Util.isUnset(request.jarUrl)) { query['jarUrl'] = request.jarUrl; } var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'RegisterCustomConnector', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/connectors%3Aregister`, method = 'POST', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Registers a custom connector in a namespace. The registered custom connector can be used in SQL statements. * * @param request RegisterCustomConnectorRequest * @return RegisterCustomConnectorResponse */ async function registerCustomConnector(namespace: string, request: RegisterCustomConnectorRequest): RegisterCustomConnectorResponse { var runtime = new Util.RuntimeOptions{}; var headers = new RegisterCustomConnectorHeaders{}; return registerCustomConnectorWithOptions(namespace, request, headers, runtime); } model RegisterUdfFunctionHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model RegisterUdfFunctionRequest { className?: string(name='className', description='The name of the class that corresponds to the UDF. This parameter is required.', example='orderRank'), functionName?: string(name='functionName', description='The name of the UDF. In most cases, the name of the UDF is the same as the class name. You can specify a name for the UDF. This parameter is required.', example='orderRank'), udfArtifactName?: string(name='udfArtifactName', description='The name of the JAR or Python file that corresponds to the UDF. This parameter is required.', example='test-udf'), } model RegisterUdfFunctionResponseBody = { data?: UdfFunction(name='data', description='The information about the UDF.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The status code returned. The value was fixed to 200. The status code 200 indicates that the request was successful.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-ABCD-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model RegisterUdfFunctionResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: RegisterUdfFunctionResponseBody(name='body'), } /** * @summary Registers specific or all of the user-defined functions (UDFs) that are parsed from the JAR files. The registered functions can be used in SQL statements. * * @param request RegisterUdfFunctionRequest * @param headers RegisterUdfFunctionHeaders * @param runtime runtime options for this request RuntimeOptions * @return RegisterUdfFunctionResponse */ async function registerUdfFunctionWithOptions(namespace: string, request: RegisterUdfFunctionRequest, headers: RegisterUdfFunctionHeaders, runtime: Util.RuntimeOptions): RegisterUdfFunctionResponse { Util.validateModel(request); var query : map[string]any = {}; if (!Util.isUnset(request.className)) { query['className'] = request.className; } if (!Util.isUnset(request.functionName)) { query['functionName'] = request.functionName; } if (!Util.isUnset(request.udfArtifactName)) { query['udfArtifactName'] = request.udfArtifactName; } var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'RegisterUdfFunction', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/udfartifacts/function%3AregisterUdfFunction`, method = 'POST', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Registers specific or all of the user-defined functions (UDFs) that are parsed from the JAR files. The registered functions can be used in SQL statements. * * @param request RegisterUdfFunctionRequest * @return RegisterUdfFunctionResponse */ async function registerUdfFunction(namespace: string, request: RegisterUdfFunctionRequest): RegisterUdfFunctionResponse { var runtime = new Util.RuntimeOptions{}; var headers = new RegisterUdfFunctionHeaders{}; return registerUdfFunctionWithOptions(namespace, request, headers, runtime); } model StartJobHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model StartJobRequest { body?: StartJobRequestBody(name='body', description='The parameter that is used to start the job. This parameter is required.'), } model StartJobResponseBody = { accessDeniedDetail?: string(name='accessDeniedDetail'), data?: Job(name='data', description='* If the value of success was true, the job that you created was returned. * If the value of success was false, a null value was returned.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The value was fixed to 200.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model StartJobResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: StartJobResponseBody(name='body'), } /** * @deprecated OpenAPI StartJob is deprecated * * @summary Creates and starts a job. * * @param request StartJobRequest * @param headers StartJobHeaders * @param runtime runtime options for this request RuntimeOptions * @return StartJobResponse */ // Deprecated async function startJobWithOptions(namespace: string, request: StartJobRequest, headers: StartJobHeaders, runtime: Util.RuntimeOptions): StartJobResponse { Util.validateModel(request); var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, body = OpenApiUtil.parseToMap(request.body), }; var params = new OpenApi.Params{ action = 'StartJob', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/jobs`, method = 'POST', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @deprecated OpenAPI StartJob is deprecated * * @summary Creates and starts a job. * * @param request StartJobRequest * @return StartJobResponse */ // Deprecated async function startJob(namespace: string, request: StartJobRequest): StartJobResponse { var runtime = new Util.RuntimeOptions{}; var headers = new StartJobHeaders{}; return startJobWithOptions(namespace, request, headers, runtime); } model StartJobWithParamsHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model StartJobWithParamsRequest { body?: JobStartParameters(name='body', description='The parameter that is used to start the job.'), } model StartJobWithParamsResponseBody = { accessDeniedDetail?: string(name='accessDeniedDetail'), data?: Job(name='data', description='The details of the job of the deployment returned.'), errorCode?: string(name='errorCode', description='If the value of success was false, an error code was returned. If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='If the value of success was false, an error message was returned. If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The status code returned. The value was fixed to 200. The status code 200 indicates that the request was successful.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model StartJobWithParamsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: StartJobWithParamsResponseBody(name='body'), } /** * @summary Starts a job. * * @param request StartJobWithParamsRequest * @param headers StartJobWithParamsHeaders * @param runtime runtime options for this request RuntimeOptions * @return StartJobWithParamsResponse */ async function startJobWithParamsWithOptions(namespace: string, request: StartJobWithParamsRequest, headers: StartJobWithParamsHeaders, runtime: Util.RuntimeOptions): StartJobWithParamsResponse { Util.validateModel(request); var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, body = OpenApiUtil.parseToMap(request.body), }; var params = new OpenApi.Params{ action = 'StartJobWithParams', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/jobs%3Astart`, method = 'POST', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Starts a job. * * @param request StartJobWithParamsRequest * @return StartJobWithParamsResponse */ async function startJobWithParams(namespace: string, request: StartJobWithParamsRequest): StartJobWithParamsResponse { var runtime = new Util.RuntimeOptions{}; var headers = new StartJobWithParamsHeaders{}; return startJobWithParamsWithOptions(namespace, request, headers, runtime); } model StartSessionClusterHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bda1c4a****'), } model StartSessionClusterResponseBody = { errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-ABCF-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), } model StartSessionClusterResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: StartSessionClusterResponseBody(name='body'), } /** * @summary 启动session集群 * * @param headers StartSessionClusterHeaders * @param runtime runtime options for this request RuntimeOptions * @return StartSessionClusterResponse */ async function startSessionClusterWithOptions(namespace: string, sessionClusterName: string, headers: StartSessionClusterHeaders, runtime: Util.RuntimeOptions): StartSessionClusterResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'StartSessionCluster', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/sessionclusters/${OpenApiUtil.getEncodeParam(sessionClusterName)}%3Astart`, method = 'POST', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary 启动session集群 * * @return StartSessionClusterResponse */ async function startSessionCluster(namespace: string, sessionClusterName: string): StartSessionClusterResponse { var runtime = new Util.RuntimeOptions{}; var headers = new StartSessionClusterHeaders{}; return startSessionClusterWithOptions(namespace, sessionClusterName, headers, runtime); } model StopApplyScheduledPlanHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bd5d90a****'), } model StopApplyScheduledPlanResponseBody = { data?: ScheduledPlanAppliedInfo(name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), } model StopApplyScheduledPlanResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: StopApplyScheduledPlanResponseBody(name='body'), } /** * @summary 停止应用执行定时计划 * * @param headers StopApplyScheduledPlanHeaders * @param runtime runtime options for this request RuntimeOptions * @return StopApplyScheduledPlanResponse */ async function stopApplyScheduledPlanWithOptions(namespace: string, scheduledPlanId: string, headers: StopApplyScheduledPlanHeaders, runtime: Util.RuntimeOptions): StopApplyScheduledPlanResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'StopApplyScheduledPlan', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/scheduled-plans/${OpenApiUtil.getEncodeParam(scheduledPlanId)}%3Astop`, method = 'PATCH', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary 停止应用执行定时计划 * * @return StopApplyScheduledPlanResponse */ async function stopApplyScheduledPlan(namespace: string, scheduledPlanId: string): StopApplyScheduledPlanResponse { var runtime = new Util.RuntimeOptions{}; var headers = new StopApplyScheduledPlanHeaders{}; return stopApplyScheduledPlanWithOptions(namespace, scheduledPlanId, headers, runtime); } model StopJobHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model StopJobRequest { body?: StopJobRequestBody(name='body', description='The parameter that is used to stop the job. This parameter is required.'), } model StopJobResponseBody = { accessDeniedDetail?: string(name='accessDeniedDetail'), data?: Job(name='data', description='* If the value of success was true, the job that you stopped was returned. * If the value of success was false, a null value was returned.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The value was fixed to 200.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model StopJobResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: StopJobResponseBody(name='body'), } /** * @summary Stops a job. * * @param request StopJobRequest * @param headers StopJobHeaders * @param runtime runtime options for this request RuntimeOptions * @return StopJobResponse */ async function stopJobWithOptions(namespace: string, jobId: string, request: StopJobRequest, headers: StopJobHeaders, runtime: Util.RuntimeOptions): StopJobResponse { Util.validateModel(request); var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, body = OpenApiUtil.parseToMap(request.body), }; var params = new OpenApi.Params{ action = 'StopJob', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/jobs/${OpenApiUtil.getEncodeParam(jobId)}%3Astop`, method = 'POST', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Stops a job. * * @param request StopJobRequest * @return StopJobResponse */ async function stopJob(namespace: string, jobId: string, request: StopJobRequest): StopJobResponse { var runtime = new Util.RuntimeOptions{}; var headers = new StopJobHeaders{}; return stopJobWithOptions(namespace, jobId, request, headers, runtime); } model StopSessionClusterHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bd5d90a****'), } model StopSessionClusterResponseBody = { errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), } model StopSessionClusterResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: StopSessionClusterResponseBody(name='body'), } /** * @summary 停止session集群 * * @param headers StopSessionClusterHeaders * @param runtime runtime options for this request RuntimeOptions * @return StopSessionClusterResponse */ async function stopSessionClusterWithOptions(namespace: string, sessionClusterName: string, headers: StopSessionClusterHeaders, runtime: Util.RuntimeOptions): StopSessionClusterResponse { var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, }; var params = new OpenApi.Params{ action = 'StopSessionCluster', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/sessionclusters/${OpenApiUtil.getEncodeParam(sessionClusterName)}%3Astop`, method = 'POST', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary 停止session集群 * * @return StopSessionClusterResponse */ async function stopSessionCluster(namespace: string, sessionClusterName: string): StopSessionClusterResponse { var runtime = new Util.RuntimeOptions{}; var headers = new StopSessionClusterHeaders{}; return stopSessionClusterWithOptions(namespace, sessionClusterName, headers, runtime); } model UpdateDeploymentHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model UpdateDeploymentRequest { body?: Deployment(name='body', description='The information about the deployment that you want to update. This parameter is required.'), } model UpdateDeploymentResponseBody = { data?: Deployment(name='data', description='* If the value of success was true, the information about the deployment after the update was returned. * If the value of success was false, a null value was returned.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The value was fixed to 200.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model UpdateDeploymentResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UpdateDeploymentResponseBody(name='body'), } /** * @summary Updates information about a deployment. * * @param request UpdateDeploymentRequest * @param headers UpdateDeploymentHeaders * @param runtime runtime options for this request RuntimeOptions * @return UpdateDeploymentResponse */ async function updateDeploymentWithOptions(namespace: string, deploymentId: string, request: UpdateDeploymentRequest, headers: UpdateDeploymentHeaders, runtime: Util.RuntimeOptions): UpdateDeploymentResponse { Util.validateModel(request); var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, body = OpenApiUtil.parseToMap(request.body), }; var params = new OpenApi.Params{ action = 'UpdateDeployment', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/deployments/${OpenApiUtil.getEncodeParam(deploymentId)}`, method = 'PUT', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Updates information about a deployment. * * @param request UpdateDeploymentRequest * @return UpdateDeploymentResponse */ async function updateDeployment(namespace: string, deploymentId: string, request: UpdateDeploymentRequest): UpdateDeploymentResponse { var runtime = new Util.RuntimeOptions{}; var headers = new UpdateDeploymentHeaders{}; return updateDeploymentWithOptions(namespace, deploymentId, request, headers, runtime); } model UpdateDeploymentDraftHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bd5d90a****'), } model UpdateDeploymentDraftRequest { body?: DeploymentDraft(name='body', description='This parameter is required.'), } model UpdateDeploymentDraftResponseBody = { data?: DeploymentDraft(name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='True'), } model UpdateDeploymentDraftResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UpdateDeploymentDraftResponseBody(name='body'), } /** * @summary update a deploymentDraft * * @param request UpdateDeploymentDraftRequest * @param headers UpdateDeploymentDraftHeaders * @param runtime runtime options for this request RuntimeOptions * @return UpdateDeploymentDraftResponse */ async function updateDeploymentDraftWithOptions(namespace: string, deploymentDraftId: string, request: UpdateDeploymentDraftRequest, headers: UpdateDeploymentDraftHeaders, runtime: Util.RuntimeOptions): UpdateDeploymentDraftResponse { Util.validateModel(request); var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, body = OpenApiUtil.parseToMap(request.body), }; var params = new OpenApi.Params{ action = 'UpdateDeploymentDraft', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/deployment-drafts/${OpenApiUtil.getEncodeParam(deploymentDraftId)}`, method = 'PATCH', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary update a deploymentDraft * * @param request UpdateDeploymentDraftRequest * @return UpdateDeploymentDraftResponse */ async function updateDeploymentDraft(namespace: string, deploymentDraftId: string, request: UpdateDeploymentDraftRequest): UpdateDeploymentDraftResponse { var runtime = new Util.RuntimeOptions{}; var headers = new UpdateDeploymentDraftHeaders{}; return updateDeploymentDraftWithOptions(namespace, deploymentDraftId, request, headers, runtime); } model UpdateDeploymentTargetHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bd5d90a****'), } model UpdateDeploymentTargetRequest { body?: ResourceSpec(name='body'), } model UpdateDeploymentTargetResponseBody = { data?: DeploymentTarget(name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), } model UpdateDeploymentTargetResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UpdateDeploymentTargetResponseBody(name='body'), } /** * @summary 修改deploymentTarget * * @param request UpdateDeploymentTargetRequest * @param headers UpdateDeploymentTargetHeaders * @param runtime runtime options for this request RuntimeOptions * @return UpdateDeploymentTargetResponse */ async function updateDeploymentTargetWithOptions(namespace: string, deploymentTargetName: string, request: UpdateDeploymentTargetRequest, headers: UpdateDeploymentTargetHeaders, runtime: Util.RuntimeOptions): UpdateDeploymentTargetResponse { Util.validateModel(request); var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, body = OpenApiUtil.parseToMap(request.body), }; var params = new OpenApi.Params{ action = 'UpdateDeploymentTarget', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/deployment-targets/${OpenApiUtil.getEncodeParam(deploymentTargetName)}`, method = 'PUT', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary 修改deploymentTarget * * @param request UpdateDeploymentTargetRequest * @return UpdateDeploymentTargetResponse */ async function updateDeploymentTarget(namespace: string, deploymentTargetName: string, request: UpdateDeploymentTargetRequest): UpdateDeploymentTargetResponse { var runtime = new Util.RuntimeOptions{}; var headers = new UpdateDeploymentTargetHeaders{}; return updateDeploymentTargetWithOptions(namespace, deploymentTargetName, request, headers, runtime); } model UpdateFolderHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='f89a0c1ca8****'), } model UpdateFolderRequest { body?: Folder(name='body', description='This parameter is required.'), } model UpdateFolderResponseBody = { data?: Folder(name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), } model UpdateFolderResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UpdateFolderResponseBody(name='body'), } /** * @summary update a folder * * @param request UpdateFolderRequest * @param headers UpdateFolderHeaders * @param runtime runtime options for this request RuntimeOptions * @return UpdateFolderResponse */ async function updateFolderWithOptions(namespace: string, folderId: string, request: UpdateFolderRequest, headers: UpdateFolderHeaders, runtime: Util.RuntimeOptions): UpdateFolderResponse { Util.validateModel(request); var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, body = OpenApiUtil.parseToMap(request.body), }; var params = new OpenApi.Params{ action = 'UpdateFolder', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/folder/${OpenApiUtil.getEncodeParam(folderId)}`, method = 'PATCH', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary update a folder * * @param request UpdateFolderRequest * @return UpdateFolderResponse */ async function updateFolder(namespace: string, folderId: string, request: UpdateFolderRequest): UpdateFolderResponse { var runtime = new Util.RuntimeOptions{}; var headers = new UpdateFolderHeaders{}; return updateFolderWithOptions(namespace, folderId, request, headers, runtime); } model UpdateMemberHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model UpdateMemberRequest { body?: Member(name='body', description='The permission information about the member.'), } model UpdateMemberResponseBody = { data?: Member(name='data', description='If the value of success was true, the member that was created was returned. If the value of success was false, a null value was returned.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The status code returned. The value was fixed to 200. The status code 200 indicates that the request was successful.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model UpdateMemberResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UpdateMemberResponseBody(name='body'), } /** * @summary Updates the permissions of one or more members in a specific namespace. * * @param request UpdateMemberRequest * @param headers UpdateMemberHeaders * @param runtime runtime options for this request RuntimeOptions * @return UpdateMemberResponse */ async function updateMemberWithOptions(namespace: string, request: UpdateMemberRequest, headers: UpdateMemberHeaders, runtime: Util.RuntimeOptions): UpdateMemberResponse { Util.validateModel(request); var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, body = OpenApiUtil.parseToMap(request.body), }; var params = new OpenApi.Params{ action = 'UpdateMember', version = '2022-07-18', protocol = 'HTTPS', pathname = `/gateway/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/members`, method = 'PUT', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Updates the permissions of one or more members in a specific namespace. * * @param request UpdateMemberRequest * @return UpdateMemberResponse */ async function updateMember(namespace: string, request: UpdateMemberRequest): UpdateMemberResponse { var runtime = new Util.RuntimeOptions{}; var headers = new UpdateMemberHeaders{}; return updateMemberWithOptions(namespace, request, headers, runtime); } model UpdateScheduledPlanHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bd5d90a****'), } model UpdateScheduledPlanRequest { body?: ScheduledPlan(name='body'), } model UpdateScheduledPlanResponseBody = { data?: ScheduledPlan(name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='CBC799F0-AS7S-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', example='true'), } model UpdateScheduledPlanResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UpdateScheduledPlanResponseBody(name='body'), } /** * @summary 更新定时执行计划 * * @param request UpdateScheduledPlanRequest * @param headers UpdateScheduledPlanHeaders * @param runtime runtime options for this request RuntimeOptions * @return UpdateScheduledPlanResponse */ async function updateScheduledPlanWithOptions(namespace: string, scheduledPlanId: string, request: UpdateScheduledPlanRequest, headers: UpdateScheduledPlanHeaders, runtime: Util.RuntimeOptions): UpdateScheduledPlanResponse { Util.validateModel(request); var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, body = OpenApiUtil.parseToMap(request.body), }; var params = new OpenApi.Params{ action = 'UpdateScheduledPlan', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/scheduled-plans/${OpenApiUtil.getEncodeParam(scheduledPlanId)}`, method = 'PUT', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary 更新定时执行计划 * * @param request UpdateScheduledPlanRequest * @return UpdateScheduledPlanResponse */ async function updateScheduledPlan(namespace: string, scheduledPlanId: string, request: UpdateScheduledPlanRequest): UpdateScheduledPlanResponse { var runtime = new Util.RuntimeOptions{}; var headers = new UpdateScheduledPlanHeaders{}; return updateScheduledPlanWithOptions(namespace, scheduledPlanId, request, headers, runtime); } model UpdateSessionClusterHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='710d6a64d8c34d'), } model UpdateSessionClusterRequest { body?: SessionCluster(name='body'), } model UpdateSessionClusterResponseBody = { data?: SessionCluster(name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='1EF03B0C-F44F-47AD-BB48-D002D0F7B8C9'), success?: boolean(name='success', example='true'), } model UpdateSessionClusterResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UpdateSessionClusterResponseBody(name='body'), } /** * @summary 更新session集群 * * @param request UpdateSessionClusterRequest * @param headers UpdateSessionClusterHeaders * @param runtime runtime options for this request RuntimeOptions * @return UpdateSessionClusterResponse */ async function updateSessionClusterWithOptions(namespace: string, sessionClusterName: string, request: UpdateSessionClusterRequest, headers: UpdateSessionClusterHeaders, runtime: Util.RuntimeOptions): UpdateSessionClusterResponse { Util.validateModel(request); var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, body = OpenApiUtil.parseToMap(request.body), }; var params = new OpenApi.Params{ action = 'UpdateSessionCluster', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/sessionclusters/${OpenApiUtil.getEncodeParam(sessionClusterName)}`, method = 'PATCH', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary 更新session集群 * * @param request UpdateSessionClusterRequest * @return UpdateSessionClusterResponse */ async function updateSessionCluster(namespace: string, sessionClusterName: string, request: UpdateSessionClusterRequest): UpdateSessionClusterResponse { var runtime = new Util.RuntimeOptions{}; var headers = new UpdateSessionClusterHeaders{}; return updateSessionClusterWithOptions(namespace, sessionClusterName, request, headers, runtime); } model UpdateUdfArtifactHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model UpdateUdfArtifactRequest { body?: UdfArtifact(name='body', description='The details of the JAR file of the UDF. This parameter is required.'), } model UpdateUdfArtifactResponseBody = { data?: UpdateUdfArtifactResult(name='data', description='The result of updating the JAR file of the UDF.'), errorCode?: string(name='errorCode', description='* If the value of success was false, an error code was returned. * If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='* If the value of success was false, an error message was returned. * If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The status code returned. The value was fixed to 200. The status code 200 indicates that the request was successful.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-ABCD-1D30-8A4F-882ED4DD****'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model UpdateUdfArtifactResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UpdateUdfArtifactResponseBody(name='body'), } /** * @summary Updates the JAR file of the user-defined function (UDF) that you create. * * @param request UpdateUdfArtifactRequest * @param headers UpdateUdfArtifactHeaders * @param runtime runtime options for this request RuntimeOptions * @return UpdateUdfArtifactResponse */ async function updateUdfArtifactWithOptions(namespace: string, udfArtifactName: string, request: UpdateUdfArtifactRequest, headers: UpdateUdfArtifactHeaders, runtime: Util.RuntimeOptions): UpdateUdfArtifactResponse { Util.validateModel(request); var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, body = OpenApiUtil.parseToMap(request.body), }; var params = new OpenApi.Params{ action = 'UpdateUdfArtifact', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/udfartifacts/${OpenApiUtil.getEncodeParam(udfArtifactName)}`, method = 'PUT', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Updates the JAR file of the user-defined function (UDF) that you create. * * @param request UpdateUdfArtifactRequest * @return UpdateUdfArtifactResponse */ async function updateUdfArtifact(namespace: string, udfArtifactName: string, request: UpdateUdfArtifactRequest): UpdateUdfArtifactResponse { var runtime = new Util.RuntimeOptions{}; var headers = new UpdateUdfArtifactHeaders{}; return updateUdfArtifactWithOptions(namespace, udfArtifactName, request, headers, runtime); } model UpdateVariableHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='This parameter is required.', example='a14bd5d90a****'), } model UpdateVariableRequest { body?: Variable(name='body', description='This parameter is required.'), } model UpdateVariableResponseBody = { accessDeniedDetail?: string(name='accessDeniedDetail', example='“”'), data?: Variable(name='data'), errorCode?: string(name='errorCode', example='""'), errorMessage?: string(name='errorMessage', example='""'), httpCode?: int32(name='httpCode', example='200'), requestId?: string(name='requestId', example='1EF03B0C-F44F-47AD-BB48-D002D0F7B8C9'), success?: boolean(name='success', example='true'), } model UpdateVariableResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UpdateVariableResponseBody(name='body'), } /** * @summary 更新秘钥 * * @param request UpdateVariableRequest * @param headers UpdateVariableHeaders * @param runtime runtime options for this request RuntimeOptions * @return UpdateVariableResponse */ async function updateVariableWithOptions(namespace: string, name: string, request: UpdateVariableRequest, headers: UpdateVariableHeaders, runtime: Util.RuntimeOptions): UpdateVariableResponse { Util.validateModel(request); var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, body = OpenApiUtil.parseToMap(request.body), }; var params = new OpenApi.Params{ action = 'UpdateVariable', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/variables/${OpenApiUtil.getEncodeParam(name)}`, method = 'PATCH', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary 更新秘钥 * * @param request UpdateVariableRequest * @return UpdateVariableResponse */ async function updateVariable(namespace: string, name: string, request: UpdateVariableRequest): UpdateVariableResponse { var runtime = new Util.RuntimeOptions{}; var headers = new UpdateVariableHeaders{}; return updateVariableWithOptions(namespace, name, request, headers, runtime); } model ValidateSqlStatementHeaders { commonHeaders?: map[string]string, workspace?: string(name='workspace', description='The workspace ID. This parameter is required.', example='a14bd5d90a****'), } model ValidateSqlStatementRequest { body?: SqlStatementWithContext(name='body', description='The content of the code that you want to verify. This parameter is required.'), } model ValidateSqlStatementResponseBody = { data?: SqlStatementValidationResult(name='data', description='The returned data, which represents the details of SQL validation results.'), errorCode?: string(name='errorCode', description='If the value of success was false, an error code was returned. If the value of success was true, a null value was returned.', example='""'), errorMessage?: string(name='errorMessage', description='If the value of success was false, an error message was returned. If the value of success was true, a null value was returned.', example='""'), httpCode?: int32(name='httpCode', description='The status code returned. The value was fixed to 200.', example='200'), requestId?: string(name='requestId', description='The request ID.', example='CBC799F0-****-1D30-8A4F-882ED4DD5E02'), success?: boolean(name='success', description='Indicates whether the request was successful.', example='true'), } model ValidateSqlStatementResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ValidateSqlStatementResponseBody(name='body'), } /** * @summary Verifies the code of an SQL deployment. * * @param request ValidateSqlStatementRequest * @param headers ValidateSqlStatementHeaders * @param runtime runtime options for this request RuntimeOptions * @return ValidateSqlStatementResponse */ async function validateSqlStatementWithOptions(namespace: string, request: ValidateSqlStatementRequest, headers: ValidateSqlStatementHeaders, runtime: Util.RuntimeOptions): ValidateSqlStatementResponse { Util.validateModel(request); var realHeaders : map[string]string = {}; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.workspace)) { realHeaders['workspace'] = Util.toJSONString(headers.workspace); } var req = new OpenApi.OpenApiRequest{ headers = realHeaders, body = OpenApiUtil.parseToMap(request.body), }; var params = new OpenApi.Params{ action = 'ValidateSqlStatement', version = '2022-07-18', protocol = 'HTTPS', pathname = `/api/v2/namespaces/${OpenApiUtil.getEncodeParam(namespace)}/sql-statement/validate`, method = 'POST', authType = 'AK', style = 'ROA', reqBodyType = 'json', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Verifies the code of an SQL deployment. * * @param request ValidateSqlStatementRequest * @return ValidateSqlStatementResponse */ async function validateSqlStatement(namespace: string, request: ValidateSqlStatementRequest): ValidateSqlStatementResponse { var runtime = new Util.RuntimeOptions{}; var headers = new ValidateSqlStatementHeaders{}; return validateSqlStatementWithOptions(namespace, request, headers, runtime); }