resolve-cloud-sdk

- Auth - [authAuthWhoAmI](#authauthwhoami) - [authLogin](#authlogin) - [authLogout](#authlogout) - [authRefreshToken](#authrefreshtoken) - Deployments - [bootstrapDeployment](#bootstrapdeployment) - [buildDeployment](#builddeployment) - [createDeployment]

Usage no npm install needed!

<script type="module">
  import resolveCloudSdk from 'https://cdn.skypack.dev/resolve-cloud-sdk';
</script>

README

API


authAuthWhoAmI

Get the current user's profile information.

Method

GET

Path

/v0/auth/whoami

Result

{
  userId: string
  userName: string
  isAdmin: boolean
}

authLogin

Log in to reSolve Cloud.

Method

POST

Path

/v0/auth/login

Body

{
  userName: string
  password: string
}

Result

void

authLogout

Log out of reSolve Cloud.

Method

POST

Path

/v0/auth/logout

Result

void

authRefreshToken

Refresh your authentication token on reSolve Cloud.

Method

POST

Path

/v0/auth/refreshToken

Result

void

bootstrapDeployment

Run the specified deployment.

Method

PATCH

Path

/v0/deployments/:deploymentId/bootstrap

Params

{ deploymentId: string }

Result

void

buildDeployment

Build an uploaded application on the cloud.

Method

PATCH

Path

/v0/deployments/:deploymentId/upload

Params

{ deploymentId: string }

Body

Partial<{
  npmRegistry: string
}>

Result

{
  installLog: string
  files: Array<string>
}

clearEventStore

Remove all events from an event store.

Method

PATCH

Path

/v0/event-stores/:eventStoreId/clear

Params

{ eventStoreId: string }

Result

void

cloneEventStore

Create a new event store based on the specified event store.

Method

PATCH

Path

/v0/event-stores/:eventStoreId/clone

Params

{ eventStoreId: string }

Result

{
  eventStoreId: string
  eventStoreDatabaseName: string
}

createDeployment

Create a new deployment.

Method

POST

Path

/v0/deployments

Body

{
  applicationName: string
  version: string
  eventStoreId: string
} & Partial<{ domain: string }>

Result

{
  deploymentId: string
  applicationName: string
  version: string
  domains: Array<string>
} & Partial<{ eventStoreId: string }>

createDomain

Create a new domain with the specified certificate based on a list of aliases.

Method

POST

Path

/v0/domains

Body

{
  certificateId: string
  aliases: Array<string>
} & Partial<{ domainId: string }>

Result

{
  domainId: string
  domainType:
    | "proxy"
    | "static"
    | "uploader"
  domainName: string
  resourceARN: string
  aliases: Array<string>
  verified: boolean
  owner: string
  users: "*" | Array<string>
  verificationCode: string
  certificateId: string
}

createEventStore

Create a new event store.

Method

POST

Path

/v0/event-stores

Body

{ version: string }

Result

{ eventStoreId: string }

deleteSagaProperty

Delete a saga property.

Method

DELETE

Path

/v0/deployments/:deploymentId/sagas/:sagaName/properties/:key

Params

{
  deploymentId: string
  sagaName: string
  key: string
}

Result

void

describeDeployment

Obtain information about a deployment.

Method

GET

Path

/v0/deployments/:deploymentId

Params

{ deploymentId: string }

Result

{
  deploymentId: string
  applicationName: string
  version: string
  domains: Array<string>
} & Partial<{ eventStoreId: string }>

describeExecution

Get the status of a long-running operation specified by its ID.

Method

GET

Path

/v0/describe-execution/:executionId

Params

{ executionId: string }

Result

{
  status:
    | "RUNNING"
    | "SUCCEEDED"
    | "FAILED"
    | "TIMED_OUT"
    | "ABORTED"
  output: any
}

disableLogs

Disable logs for a deployment.

Method

PATCH

Path

/v0/deployments/:deploymentId/logs/disable

Params

{ deploymentId: string }

Result

void

disableTracing

Disable performance tracing for a deployment.

Method

PATCH

Path

/v0/deployments/:deploymentId/tracing/disable

Params

{ deploymentId: string }

Result

void

dropCertificate

Remove the specified certificate.

Method

DELETE

Path

/v0/certificates/:certificateId

Params

{ certificateId: string }

Result

void

dropDeployment

Remove an existing deployment.

Method

DELETE

Path

/v0/deployments/:deploymentId

Params

{ deploymentId: string }

Body

Partial<{
  withEventStore: boolean
}>

Result

void

dropDomain

Remove the specified domain.

Method

DELETE

Path

/v0/domains/:domainId

Params

{ domainId: string }

Result

void

dropEventStore

Remove an existing event store.

Method

DELETE

Path

/v0/event-stores/:eventStoreId

Params

{ eventStoreId: string }

Result

void

enableLogs

Enable logs for a deployment.

Method

PATCH

Path

/v0/deployments/:deploymentId/logs/enable

Params

{ deploymentId: string }

Body

Partial<{
  logLevel:
    | "log"
    | "error"
    | "warn"
    | "debug"
    | "info"
    | "verbose"
  scope: string
}>

Result

void

enableTracing

Enable performance tracing for a deployment.

Method

PATCH

Path

/v0/deployments/:deploymentId/tracing/enable

Params

{ deploymentId: string }

Result

void

ensureCertificate

Check an SSL certificate's validity.

Method

PUT

Path

/v0/certificates

Body

{
  certificate: string
  key: string
} & Partial<{
  certificateId: string
  chain: string
}>

Result

string

exportEventStore

Export events from the specified event store.

Method

PATCH

Path

/v0/event-stores/:eventStoreId/export

Params

{ eventStoreId: string }

Query

Partial<{
  cursor: string
}>

Result

void

freezeEventStore

Disable event store updates.

Method

PATCH

Path

/v0/event-stores/:eventStoreId/freeze

Params

{ eventStoreId: string }

Result

void

getClientAppConfig

Get reSolve Cloud's app client ID and user pool ID on Amazon Cognito.

Method

GET

Path

/v0/client-app-config

Result

{
  clientId: string
  userPoolId: string
}

getDeploymentUploadSignedUrl

Get URLs used to upload an application's source code and static resources.

Method

GET

Path

/v0/deployments/:deploymentId/upload

Params

{ deploymentId: string }

Result

{
  codeUploadUrl: string
  staticUploadUrl: string
}

getEventStore

Get information about the specified event store.

Method

GET

Path

/v0/event-stores/:eventStoreId

Params

{ eventStoreId: string }

Result

{
  eventStoreClusterArn: string
  eventStoreSecretArn: string
  eventStoreDatabaseName: string
  version: string
  eventStoreId: string
  linkedDeployments: Array<string>
  region: string
  accessKeyId: string
  secretAccessKey: string
  sessionToken: string
}

getExportUrls

Get URLs used to download files that contain events and secrets to import as well as a file that contains information about the status of the export process.

Method

GET

Path

/v0/event-stores/:eventStoreId/export

Params

{ eventStoreId: string }

Result

{
  eventsExportUrl: string
  secretsExportUrl: string
  statusFileUrl: string
}

getImportUrls

Get URLs used to upload files that contain events and secrets to import.

Method

GET

Path

/v0/event-stores/:eventStoreId/import

Params

{ eventStoreId: string }

Query

{
  eventsPartCount: string
  secretsPartCount: string
}

Result

{
  eventsImportUrls: Array<string>
  secretsImportUrls: Array<string>
}

getLogs

Get logs for a time interval.

Method

GET

Path

/v0/deployments/:deploymentId/logs

Params

{ deploymentId: string }

Query

Partial<{
  startTime: string
  endTime: string
  filterPattern: string
  streamLimit: string
}>

Result

string

getSagaProperty

Get a saga property's value.

Method

GET

Path

/v0/deployments/:deploymentId/sagas/:sagaName/properties/:key

Params

{
  deploymentId: string
  sagaName: string
  key: string
}

Result

{ [K in string]: any }

getSummaries

Get the list of a deployment's performance tracing summaries for the specified time interval.

Method

GET

Path

/v0/deployments/:deploymentId/tracing/summary

Params

{ deploymentId: string }

Query

{
  startTime: string
  endTime: string
} & Partial<{
  filterExpression: string
}>

Result

Array<
  Partial<{
    id: string
    responseTime: number
    http: Partial<{
      httpURL: string
      httpStatus: number
      httpMethod: string
      userAgent: string
      clientIp: string
    }>
  }> & { [K in string]: any }
>

getTracingDetails

Get details on the specified performance trace.

Method

GET

Path

/v0/deployments/:deploymentId/tracing/details

Params

{ deploymentId: string }

Query

{
  traceIds: Array<string>
}

Result

Array<{
  [K in string]: any
}>

getTracingStatus

Check whether performance tracing is enabled for a deployment.

Method

GET

Path

/v0/deployments/:deploymentId/tracing/status

Params

{ deploymentId: string }

Result

"enabled" | "disabled"

getVerificationCode

Get a code to add to a verification record within your domain zone.

Method

GET

Path

/v0/domains/:domainId/verification-code

Params

{ domainId: string }

Result

{
  verificationCode: string
}

heartbeat

Check if the service is available.

Method

HEAD

Path

/v0/

Result

void

importEventStore

Import events into the specified event store.

Method

PATCH

Path

/v0/event-stores/:eventStoreId/import

Params

{ eventStoreId: string }

Body

{ partIndex: number }

Result

void

linkDeployment

Connect an existing application deployment to the specified event store.

Method

PATCH

Path

/v0/event-stores/:eventStoreId/link

Params

{ eventStoreId: string }

Body

{ deploymentId: string }

Result

void

listCertificates

Get a list of the available SSL certificates.

Method

GET

Path

/v0/certificates

Result

Array<
  {
    certificateId: string
    additionalNames: Array<string>
    resourceARN: string
  } & Partial<{
    domainName: string
    importedAt: string
    issuer: string
    notBefore: string
    notAfter: string
  }>
>

listDeployments

Get a list of existing deployments.

Method

GET

Path

/v0/deployments

Query

Partial<{
  applicationName: string
}>

Result

Array<
  {
    deploymentId: string
    applicationName: string
    version: string
    domains: Array<string>
  } & Partial<{ eventStoreId: string }>
>

listDomains

Get a list of the available domains.

Method

GET

Path

/v0/domains

Result

Array<{
  domainId: string
  domainType:
    | "proxy"
    | "static"
    | "uploader"
  domainName: string
  resourceARN: string
  aliases: Array<string>
  verified: boolean
  owner: string
  users: "*" | Array<string>
  verificationCode: string
  certificateId: string
}>

listEnvironmentVariables

Get a list of a deployment's environment variables.

Method

GET

Path

/v0/deployments/:deploymentId/environment

Params

{ deploymentId: string }

Result

{ [K in string]: string }

listEventStores

Get a list of objects that describe available event stores.

Method

GET

Path

/v0/event-stores

Result

Array<{
  version: string
  eventStoreId: string
  linkedDeployments: Array<string>
  eventStoreDatabaseName: string
  events: number | null
  secrets: number | null
  modifiedAt: number | null
  createdAt: number | null
  isFrozen: boolean | null
}>

listReadModels

Obtain the list of a deployment's read models.

Method

GET

Path

/v0/deployments/:deploymentId/read-models

Params

{ deploymentId: string }

Result

Array<{
  name: string
  status: string | null
  successEvent:
    | { [K in string]: any }
    | null
  failedEvent:
    | { [K in string]: any }
    | null
  errors: Array<{
    name: string
    message: string
    stack: string
  }>
}>

listSagaProperties

Get the list of assigned saga properties.

Method

GET

Path

/v0/deployments/:deploymentId/sagas/:sagaName/properties

Params

{
  deploymentId: string
  sagaName: string
}

Result

any

listSagas

Get the list of a deployment's sagas.

Method

GET

Path

/v0/deployments/:deploymentId/sagas

Params

{ deploymentId: string }

Result

Array<{
  name: string
  status: string | null
  successEvent:
    | { [K in string]: any }
    | null
  failedEvent:
    | { [K in string]: any }
    | null
  errors: Array<{
    name: string
    message: string
    stack: string
  }>
}>

listVersions

Get a list of the available reSolve versions.

Method

GET

Path

/v0/runtimes

Result

Array<string>

pauseReadModel

Pause read model updates.

Method

PATCH

Path

/v0/deployments/:deploymentId/read-models/:readModelName/pause

Params

{
  deploymentId: string
  readModelName: string
}

Result

void

pauseSaga

Pause saga updates.

Method

PATCH

Path

/v0/deployments/:deploymentId/sagas/:sagaName/pause

Params

{
  deploymentId: string
  sagaName: string
}

Result

any

releaseDomain

Release a domain from the associated application deployments.

Method

DELETE

Path

/v0/domains

Body

{ domain: string }

Result

void

removeEnvironmentVariables

Remove environment variables.

Method

DELETE

Path

/v0/deployments/:deploymentId/environment

Params

{ deploymentId: string }

Body

{
  variables: Array<string>
}

Result

void

removeLogs

Remove a deployment's logs.

Method

DELETE

Path

/v0/deployments/:deploymentId/logs

Params

{ deploymentId: string }

Result

void

resetReadModel

Reset a read model's persistent state.

Method

PATCH

Path

/v0/deployments/:deploymentId/read-models/:readModelName/reset

Params

{
  deploymentId: string
  readModelName: string
}

Result

void

resetSaga

Reset a saga's persistent state.

Method

PATCH

Path

/v0/deployments/:deploymentId/sagas/:sagaName/reset

Params

{
  deploymentId: string
  sagaName: string
}

Result

void

resumeReadModel

Resume read model updates.

Method

PATCH

Path

/v0/deployments/:deploymentId/read-models/:readModelName/resume

Params

{
  deploymentId: string
  readModelName: string
}

Result

void

resumeSaga

Resume saga updates.

Method

PATCH

Path

/v0/deployments/:deploymentId/sagas/:sagaName/resume

Params

{
  deploymentId: string
  sagaName: string
}

Result

void

setDeploymentDomain

Assigns a domain to a deployment.

Method

PUT

Path

/v0/deployments/:deploymentId/domain

Params

{ deploymentId: string }

Body

{ domain: string }

Result

void

setEnvironmentVariables

Set environment variables for a deployment.

Method

PUT

Path

/v0/deployments/:deploymentId/environment

Params

{ deploymentId: string }

Body

{
  variables: { [K in string]: string }
}

Result

void

setSagaProperty

Assign a value to a saga property.

Method

PUT

Path

/v0/deployments/:deploymentId/sagas/:sagaName/properties

Params

{
  deploymentId: string
  sagaName: string
}

Body

{
  key: string
  value: string
}

Result

void

shutdownDeployment

Shut down a deployment.

Method

PATCH

Path

/v0/deployments/:deploymentId/shutdown

Params

{ deploymentId: string }

Result

void

unfreezeEventStore

Resume event store updates.

Method

PATCH

Path

/v0/event-stores/:eventStoreId/unfreeze

Params

{ eventStoreId: string }

Result

void

unlinkDeployment

Disconnect an application deployment from the specified event store.

Method

PATCH

Path

/v0/event-stores/:eventStoreId/unlink

Params

{ eventStoreId: string }

Body

{ deploymentId: string }

Result

void

unsetDeploymentDomain

Detach a domain from a deployment.

Method

DELETE

Path

/v0/deployments/:deploymentId/domain

Params

{ deploymentId: string }

Body

{ domain: string }

Result

void

verifyDomain

Verify a domain after a verification record was added to the domain zone.

Method

PATCH

Path

/v0/domains/:domainId/verify

Params

{ domainId: string }

Result

void