diff --git a/docs/modules/ROOT/pages/api-reference.adoc b/docs/modules/ROOT/pages/api-reference.adoc deleted file mode 100644 index 29a8e98..0000000 --- a/docs/modules/ROOT/pages/api-reference.adoc +++ /dev/null @@ -1,256 +0,0 @@ -= API Reference -:url-graphql: https://graphql.org/ - -IMPORTANT: The GraphQL API is deprecated and no longer maintained. You can continue to use it with legacy clusters, but it does not support {hazelcast-cloud} clusters. - -link:{page-url-cloud-api}[Go to the GraphQL Explorer] - -== Queries - -=== Cloud Providers - -While creating a cluster, you need to decide which cloud provider to use. You can make this decision according to where your current infrastructure is. Also, the cloud providers we support change according to the type of product you will use. We support different cloud providers on the Standard and Enterprise plans. So, you need to check available cloud providers before creating a cluster from our GraphQL API with a `query cloudProviders` - -[source,shell] ----- -query { - cloudProviders { - name - isEnabledForStandard - isEnabledForEnterprise - } -} ----- - -=== Regions - -Regions are geographic locations of where your cloud resources are located. Different cloud providers support different regions. Also, there may be some regions that we don't support yet. So that you need to check available regions before creating a cluster on {hazelcast-cloud} from our GraphQL API with `query regions`. - -[source,shell] ----- -query { - regions(cloudProvider: "aws") { - name - isEnabledForStandard - isEnabledForEnterprise - } -} ----- - -=== Hazelcast Versions - -To create or upgrade the Hazelcast Platform version of an Enterprise cluster, you need to select which Hazelcast version you need. To check available Hazelcast Platform versions, use the `hazelcastVersions` query. - -[source,shell] ----- -query { - hazelcastVersions { - version - upgradeableVersions - } -} ----- - -=== Instance Types - -Instance types comprise varying combinations of CPU, memory, storage, and networking capacity and give you the flexibility to choose the appropriate mix of resources for your applications. Instance types changes according to a cloud provider, regions, and the ones we supported. In order to create an Enterprise cluster, you need to select which instance type you will use with `query instanceTypes`. - -[source,shell] ----- -query { - instanceTypes(cloudProvider: "aws") { - name - totalMemory - } -} ----- - -=== Availability Zones - -Availability zones are isolated locations within data center regions from which public cloud services originate and operate. In order to create Enterprise clusters, you need to select which availability zones should be used. This availability zones changes according to the cloud provider and region. Also, the number of instances you need, may not be available on this availability zone. So that you need to check available availability zones for your demand with `availabilityZones query`. - -[source,shell] ----- -query { - availabilityZones( - cloudProvider: "aws" - region: "us-west-2" - instanceType: "m5.large" - instanceCount: 5 - ) { - name - } -} ----- - -=== Cluster Details - -You can fetch the details of the cluster you selected with Id as an input. To get details of select cluster you need to use `cluster query` - -[source,shell] ----- -query { - cluster(clusterId: "423") { - id - name - password - port - hazelcastVersion - isAutoScalingEnabled - isHotBackupEnabled - isHotRestartEnabled - isIpWhitelistEnabled - isTlsEnabled - productType { - name - isFree - } - state - createdAt - startedAt - stoppedAt - discoveryTokens {source,token} - } -} ----- - -=== Cluster List - -You can list all of your clusters according to their type of product (`STANDARD`, `ENTERPRISE`) with their details. You can fetch them will using `clusters query` with providing product type. - -[source,shell] ----- -query { - clusters(productType:"STANDARD") { - id - name - password - port - hazelcastVersion - isAutoScalingEnabled - isHotBackupEnabled - isHotRestartEnabled - isIpWhitelistEnabled - isTlsEnabled - productType { - name - isFree - } - state - createdAt - startedAt - stoppedAt - discoveryTokens {source,token} - } -} ----- - -== Mutations - -=== Create a Standard Cluster - -You can create a new Standard cluster with the `createStandardCluster` mutation. This mutation needs at least the following inputs; `name, cloud provider, region, cluster type, total memory, and Hazelcast version`. You can optionally provide other properties like data structures etc. - -[WARNING] -==== -You need to collect some inputs from other queries. - -In this case, you need to get `cloudProvider` from `cloudProviders query`, `region` from `regions query`. -==== - -TIP: You can optionally provide other properties like data structures, hot backup features, etc. - -[source,shell] ----- -mutation { - createStandardCluster( - input: { - name: "my-cluster" - cloudProvider: "aws" - region: "us-west-2" - clusterType: SMALL - totalMemory: 2 - hazelcastVersion: VERSION_4_0 - } - ) { - id - } -} ----- - -=== Create an Enterprise Cluster - -You can create a new *Enterprise* cluster with the `createEnterpriseCluster mutation`. This mutation needs at least the following inputs; `name, cloud provider, region, zones, instance type, instance per zone, Hazelcast version, public access value, and CIDR block`. - - -[WARNING] -==== -You need to collect some inputs from other queries. - -In this case, you need to get `cloudProvider` from `cloudProviders query`, `region` from `regions query`, `zones` from `availabilityZones query`, instanceType from `instanceTypes query`. - -Also, you need to care about if the cloud provider and region are enabled for Dedicated. -==== - -TIP: You can optionally provide other properties such as data structures and Persistence features. - -[source,shell] ----- -mutation { - createEnterpriseCluster( - input:{ - name: "my-cluster" - cloudProvider: "aws" - region: "eu-west-2" - zones: ["eu-west-2a", "eu-west-2b"] - instanceType: "m5.large" - instancePerZone: 2 - hazelcastVersion: "4.0" - isPublicAccessEnabled: true - cidrBlock: "10.0.1.0/16" - } - ) - { - id - } -} ----- - -=== Delete Cluster - -You can delete your cluster with `deleteCluster` mutation by providing the ID of the cluster as an argument. - -[source,shell] ----- -mutation { - deleteCluster(clusterId:"101") { - clusterId - } -} ----- - -=== Stop Cluster - -You can stop your *Standard Hazelcast Cluster* with `stopCluster` mutation by providing the ID of the cluster as an argument. - -[source,shell] ----- -mutation { - stopCluster(clusterId:"101") { - clusterId - } -} ----- - -=== Resume Cluster - -You can resume your *Standard Hazelcast Cluster* with `resumeCluster` mutation by providing the ID of the cluster as an argument. - -[source,shell] ----- -mutation { - resumeCluster(clusterId:"101") { - clusterId - } -} -----