Creates a new cluster with the specified parameters.
To create a cluster in Virtual Private Cloud (VPC), you must provide a cluster subnet group name. The cluster subnet group identifies the subnets of your VPC that Amazon Redshift uses when creating the cluster. For more information about managing clusters, go to Amazon Redshift Clusters in the Amazon Redshift Cluster Management Guide.
curl -X POST -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/AmazonRedshift/CreateCluster?ClusterIdentifier=&MasterUsername=&MasterUserPassword=&NodeType=&AdditionalInfo=&AllowVersionUpgrade=&AutomatedSnapshotRetentionPeriod=&AvailabilityZone=&ClusterParameterGroupName=&ClusterSubnetGroupName=&ClusterType=&ClusterVersion=&DBName=&ElasticIp=&Encrypted=&EnhancedVpcRouting=&HsmClientCertificateIdentifier=&HsmConfigurationIdentifier=&IamRoles.IamRoleArn.N=&KmsKeyId=&Port="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CreateClusterApi;
import java.io.File;
import java.util.*;
public class CreateClusterApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: apieco-key
ApiKeyAuth apieco-key = (ApiKeyAuth) defaultClient.getAuthentication("apieco-key");
apieco-key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.setApiKeyPrefix("Token");
CreateClusterApi apiInstance = new CreateClusterApi();
String apiecoKey = apiecoKey_example; // String |
String clusterIdentifier = clusterIdentifier_example; // String | A unique identifier for the cluster. You use this identifier to refer to the cluster for any subsequent cluster operations such as deleting or modifying. The identifier also appears in the Amazon Redshift console.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens.
Alphabetic characters must be lowercase.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
Must be unique for all clusters within an AWS account.
Example: myexamplecluster
String masterUsername = masterUsername_example; // String | The user name associated with the master user account for the cluster that is being created.
Constraints:
Must be 1 - 128 alphanumeric characters. The user name can`t be PUBLIC.
First character must be a letter.
Cannot be a reserved word. A list of reserved words can be found in Reserved Words in the Amazon Redshift Database Developer Guide.
String masterUserPassword = masterUserPassword_example; // String | The password associated with the master user account for the cluster that is being created.
Constraints:
Must be between 8 and 64 characters in length.
Must contain at least one uppercase letter.
Must contain at least one lowercase letter.
Must contain one number.
Can be any printable ASCII character (ASCII code 33 to 126) except (singl quote), (double quote), \, /, @, or space.
String nodeType = nodeType_example; // String | The node type to be provisioned for the cluster. For information about node types, go to Working with Clusters in the Amazon Redshift Cluster Management Guide.
Valid Values: ds2.xlarge | ds2.8xlarge | dc1.large | dc1.8xlarge | dc2.large | dc2.8xlarge | ra3.4xlarge | ra3.16xlarge
String additionalInfo = additionalInfo_example; // String | Reserved
Boolean allowVersionUpgrade = true; // Boolean | If true, major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster.
When a new major version of the Amazon Redshift engine is released, you can request that the service automatically apply upgrades during the maintenance window to the Amazon Redshift engine that is running on your cluster.
Default: true
Integer automatedSnapshotRetentionPeriod = 56; // Integer | The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshots when you want with CreateClusterSnapshot.
Default: 1
Constraints: Must be a value from 0 to 35.
String availabilityZone = availabilityZone_example; // String | The EC2 Availability Zone (AZ) in which you want Amazon Redshift to provision the cluster. For example, if you have several EC2 instances running in a specific Availability Zone, then you might want the cluster to be provisioned in the same zone in order to decrease network latency.
Default: A random, system-chosen Availability Zone in the region that is specified by the endpoint.
Example: us-east-2d
Constraint: The specified Availability Zone must be in the same region as the current endpoint.
String clusterParameterGroupName = clusterParameterGroupName_example; // String | The name of the parameter group to be associated with this cluster.
Default: The default Amazon Redshift cluster parameter group. For information about the default parameter group, go to Working with Amazon Redshift Parameter Groups
Constraints:
Must be 1 to 255 alphanumeric characters or hyphens.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
String clusterSubnetGroupName = clusterSubnetGroupName_example; // String | The name of a cluster subnet group to be associated with this cluster.
If this parameter is not provided the resulting cluster will be deployed outside virtual private cloud (VPC).
String clusterType = clusterType_example; // String | The type of the cluster. When cluster type is specified as
single-node, the NumberOfNodes parameter is not required.
multi-node, the NumberOfNodes parameter is required.
Valid Values: multi-node | single-node
Default: multi-node
String clusterVersion = clusterVersion_example; // String | The version of the Amazon Redshift engine software that you want to deploy on the cluster.
The version selected runs on all the nodes in the cluster.
Constraints: Only version 1.0 is currently available.
Example: 1.0
String dBName = dBName_example; // String | The name of the first database to be created when the cluster is created.
To create additional databases after the cluster is created, connect to the cluster with a SQL client and use SQL commands to create a database. For more information, go to Create a Database in the Amazon Redshift Database Developer Guide.
Default: dev
String elasticIp = elasticIp_example; // String | The Elastic IP (EIP) address for the cluster.
Constraints: The cluster must be provisioned in EC2-VPC and publicly -accessible through an Internet gateway. For more information about provisioning clusters in EC2-VPC, go to Supported Platforms to Launch Your Cluster in the Amazon Redshift Cluster Management Guide.
Boolean encrypted = true; // Boolean | If true, the data in the cluster is encrypted at rest.
Default: false
Boolean enhancedVpcRouting = true; // Boolean | An option that specifies whether to create the cluster with enhanced VPC routing enabled. To create a cluster that uses enhanced VPC routing, the cluster must be in a VPC. For more information, see Enhanced VPC Routing in the Amazon Redshift Cluster Management Guide.
If this option is true, enhanced VPC routing is enabled.
Default: false
String hsmClientCertificateIdentifier = hsmClientCertificateIdentifier_example; // String | Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM.
String hsmConfigurationIdentifier = hsmConfigurationIdentifier_example; // String | Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM.
array[String] iamRoles.IamRoleArn.N = ; // array[String] | A list of AWS Identity and Access Management (IAM) roles that can be used by the cluster to access other AWS services. You must supply the IAM roles in their Amazon Resource Name (ARN) format. You can supply up to 10 IAM roles in a single request.
A cluster can have up to 10 IAM roles associated with it at any time.
String kmsKeyId = kmsKeyId_example; // String | The AWS Key Management Service (KMS) key ID of the encryption key that you want to use to encrypt data in the cluster.
BigDecimal port = 8.14; // BigDecimal | The port number on which the cluster accepts incoming connections.
The cluster is accessible only via the JDBC and ODBC connection strings. Part of the connection string requires the port on which the cluster will listen for incoming connections.
Default: 5439
Valid Values: 1150-65535
try {
inline_response_200_7 result = apiInstance.createCluster(apiecoKey, clusterIdentifier, masterUsername, masterUserPassword, nodeType, additionalInfo, allowVersionUpgrade, automatedSnapshotRetentionPeriod, availabilityZone, clusterParameterGroupName, clusterSubnetGroupName, clusterType, clusterVersion, dBName, elasticIp, encrypted, enhancedVpcRouting, hsmClientCertificateIdentifier, hsmConfigurationIdentifier, iamRoles.IamRoleArn.N, kmsKeyId, port);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CreateClusterApi#createCluster");
e.printStackTrace();
}
}
}
import io.swagger.client.api.CreateClusterApi;
public class CreateClusterApiExample {
public static void main(String[] args) {
CreateClusterApi apiInstance = new CreateClusterApi();
String apiecoKey = apiecoKey_example; // String |
String clusterIdentifier = clusterIdentifier_example; // String | A unique identifier for the cluster. You use this identifier to refer to the cluster for any subsequent cluster operations such as deleting or modifying. The identifier also appears in the Amazon Redshift console.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens.
Alphabetic characters must be lowercase.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
Must be unique for all clusters within an AWS account.
Example: myexamplecluster
String masterUsername = masterUsername_example; // String | The user name associated with the master user account for the cluster that is being created.
Constraints:
Must be 1 - 128 alphanumeric characters. The user name can`t be PUBLIC.
First character must be a letter.
Cannot be a reserved word. A list of reserved words can be found in Reserved Words in the Amazon Redshift Database Developer Guide.
String masterUserPassword = masterUserPassword_example; // String | The password associated with the master user account for the cluster that is being created.
Constraints:
Must be between 8 and 64 characters in length.
Must contain at least one uppercase letter.
Must contain at least one lowercase letter.
Must contain one number.
Can be any printable ASCII character (ASCII code 33 to 126) except (singl quote), (double quote), \, /, @, or space.
String nodeType = nodeType_example; // String | The node type to be provisioned for the cluster. For information about node types, go to Working with Clusters in the Amazon Redshift Cluster Management Guide.
Valid Values: ds2.xlarge | ds2.8xlarge | dc1.large | dc1.8xlarge | dc2.large | dc2.8xlarge | ra3.4xlarge | ra3.16xlarge
String additionalInfo = additionalInfo_example; // String | Reserved
Boolean allowVersionUpgrade = true; // Boolean | If true, major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster.
When a new major version of the Amazon Redshift engine is released, you can request that the service automatically apply upgrades during the maintenance window to the Amazon Redshift engine that is running on your cluster.
Default: true
Integer automatedSnapshotRetentionPeriod = 56; // Integer | The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshots when you want with CreateClusterSnapshot.
Default: 1
Constraints: Must be a value from 0 to 35.
String availabilityZone = availabilityZone_example; // String | The EC2 Availability Zone (AZ) in which you want Amazon Redshift to provision the cluster. For example, if you have several EC2 instances running in a specific Availability Zone, then you might want the cluster to be provisioned in the same zone in order to decrease network latency.
Default: A random, system-chosen Availability Zone in the region that is specified by the endpoint.
Example: us-east-2d
Constraint: The specified Availability Zone must be in the same region as the current endpoint.
String clusterParameterGroupName = clusterParameterGroupName_example; // String | The name of the parameter group to be associated with this cluster.
Default: The default Amazon Redshift cluster parameter group. For information about the default parameter group, go to Working with Amazon Redshift Parameter Groups
Constraints:
Must be 1 to 255 alphanumeric characters or hyphens.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
String clusterSubnetGroupName = clusterSubnetGroupName_example; // String | The name of a cluster subnet group to be associated with this cluster.
If this parameter is not provided the resulting cluster will be deployed outside virtual private cloud (VPC).
String clusterType = clusterType_example; // String | The type of the cluster. When cluster type is specified as
single-node, the NumberOfNodes parameter is not required.
multi-node, the NumberOfNodes parameter is required.
Valid Values: multi-node | single-node
Default: multi-node
String clusterVersion = clusterVersion_example; // String | The version of the Amazon Redshift engine software that you want to deploy on the cluster.
The version selected runs on all the nodes in the cluster.
Constraints: Only version 1.0 is currently available.
Example: 1.0
String dBName = dBName_example; // String | The name of the first database to be created when the cluster is created.
To create additional databases after the cluster is created, connect to the cluster with a SQL client and use SQL commands to create a database. For more information, go to Create a Database in the Amazon Redshift Database Developer Guide.
Default: dev
String elasticIp = elasticIp_example; // String | The Elastic IP (EIP) address for the cluster.
Constraints: The cluster must be provisioned in EC2-VPC and publicly -accessible through an Internet gateway. For more information about provisioning clusters in EC2-VPC, go to Supported Platforms to Launch Your Cluster in the Amazon Redshift Cluster Management Guide.
Boolean encrypted = true; // Boolean | If true, the data in the cluster is encrypted at rest.
Default: false
Boolean enhancedVpcRouting = true; // Boolean | An option that specifies whether to create the cluster with enhanced VPC routing enabled. To create a cluster that uses enhanced VPC routing, the cluster must be in a VPC. For more information, see Enhanced VPC Routing in the Amazon Redshift Cluster Management Guide.
If this option is true, enhanced VPC routing is enabled.
Default: false
String hsmClientCertificateIdentifier = hsmClientCertificateIdentifier_example; // String | Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM.
String hsmConfigurationIdentifier = hsmConfigurationIdentifier_example; // String | Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM.
array[String] iamRoles.IamRoleArn.N = ; // array[String] | A list of AWS Identity and Access Management (IAM) roles that can be used by the cluster to access other AWS services. You must supply the IAM roles in their Amazon Resource Name (ARN) format. You can supply up to 10 IAM roles in a single request.
A cluster can have up to 10 IAM roles associated with it at any time.
String kmsKeyId = kmsKeyId_example; // String | The AWS Key Management Service (KMS) key ID of the encryption key that you want to use to encrypt data in the cluster.
BigDecimal port = 8.14; // BigDecimal | The port number on which the cluster accepts incoming connections.
The cluster is accessible only via the JDBC and ODBC connection strings. Part of the connection string requires the port on which the cluster will listen for incoming connections.
Default: 5439
Valid Values: 1150-65535
try {
inline_response_200_7 result = apiInstance.createCluster(apiecoKey, clusterIdentifier, masterUsername, masterUserPassword, nodeType, additionalInfo, allowVersionUpgrade, automatedSnapshotRetentionPeriod, availabilityZone, clusterParameterGroupName, clusterSubnetGroupName, clusterType, clusterVersion, dBName, elasticIp, encrypted, enhancedVpcRouting, hsmClientCertificateIdentifier, hsmConfigurationIdentifier, iamRoles.IamRoleArn.N, kmsKeyId, port);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CreateClusterApi#createCluster");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: apieco-key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"apieco-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"apieco-key"];
String *apiecoKey = apiecoKey_example; //
String *clusterIdentifier = clusterIdentifier_example; // A unique identifier for the cluster. You use this identifier to refer to the cluster for any subsequent cluster operations such as deleting or modifying. The identifier also appears in the Amazon Redshift console.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens.
Alphabetic characters must be lowercase.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
Must be unique for all clusters within an AWS account.
Example: myexamplecluster
String *masterUsername = masterUsername_example; // The user name associated with the master user account for the cluster that is being created.
Constraints:
Must be 1 - 128 alphanumeric characters. The user name can`t be PUBLIC.
First character must be a letter.
Cannot be a reserved word. A list of reserved words can be found in Reserved Words in the Amazon Redshift Database Developer Guide.
String *masterUserPassword = masterUserPassword_example; // The password associated with the master user account for the cluster that is being created.
Constraints:
Must be between 8 and 64 characters in length.
Must contain at least one uppercase letter.
Must contain at least one lowercase letter.
Must contain one number.
Can be any printable ASCII character (ASCII code 33 to 126) except (singl quote), (double quote), \, /, @, or space.
String *nodeType = nodeType_example; // The node type to be provisioned for the cluster. For information about node types, go to Working with Clusters in the Amazon Redshift Cluster Management Guide.
Valid Values: ds2.xlarge | ds2.8xlarge | dc1.large | dc1.8xlarge | dc2.large | dc2.8xlarge | ra3.4xlarge | ra3.16xlarge
String *additionalInfo = additionalInfo_example; // Reserved (optional)
Boolean *allowVersionUpgrade = true; // If true, major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster.
When a new major version of the Amazon Redshift engine is released, you can request that the service automatically apply upgrades during the maintenance window to the Amazon Redshift engine that is running on your cluster.
Default: true (optional)
Integer *automatedSnapshotRetentionPeriod = 56; // The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshots when you want with CreateClusterSnapshot.
Default: 1
Constraints: Must be a value from 0 to 35. (optional)
String *availabilityZone = availabilityZone_example; // The EC2 Availability Zone (AZ) in which you want Amazon Redshift to provision the cluster. For example, if you have several EC2 instances running in a specific Availability Zone, then you might want the cluster to be provisioned in the same zone in order to decrease network latency.
Default: A random, system-chosen Availability Zone in the region that is specified by the endpoint.
Example: us-east-2d
Constraint: The specified Availability Zone must be in the same region as the current endpoint. (optional)
String *clusterParameterGroupName = clusterParameterGroupName_example; // The name of the parameter group to be associated with this cluster.
Default: The default Amazon Redshift cluster parameter group. For information about the default parameter group, go to Working with Amazon Redshift Parameter Groups
Constraints:
Must be 1 to 255 alphanumeric characters or hyphens.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens. (optional)
String *clusterSubnetGroupName = clusterSubnetGroupName_example; // The name of a cluster subnet group to be associated with this cluster.
If this parameter is not provided the resulting cluster will be deployed outside virtual private cloud (VPC). (optional)
String *clusterType = clusterType_example; // The type of the cluster. When cluster type is specified as
single-node, the NumberOfNodes parameter is not required.
multi-node, the NumberOfNodes parameter is required.
Valid Values: multi-node | single-node
Default: multi-node (optional)
String *clusterVersion = clusterVersion_example; // The version of the Amazon Redshift engine software that you want to deploy on the cluster.
The version selected runs on all the nodes in the cluster.
Constraints: Only version 1.0 is currently available.
Example: 1.0 (optional)
String *dBName = dBName_example; // The name of the first database to be created when the cluster is created.
To create additional databases after the cluster is created, connect to the cluster with a SQL client and use SQL commands to create a database. For more information, go to Create a Database in the Amazon Redshift Database Developer Guide.
Default: dev (optional)
String *elasticIp = elasticIp_example; // The Elastic IP (EIP) address for the cluster.
Constraints: The cluster must be provisioned in EC2-VPC and publicly -accessible through an Internet gateway. For more information about provisioning clusters in EC2-VPC, go to Supported Platforms to Launch Your Cluster in the Amazon Redshift Cluster Management Guide. (optional)
Boolean *encrypted = true; // If true, the data in the cluster is encrypted at rest.
Default: false (optional)
Boolean *enhancedVpcRouting = true; // An option that specifies whether to create the cluster with enhanced VPC routing enabled. To create a cluster that uses enhanced VPC routing, the cluster must be in a VPC. For more information, see Enhanced VPC Routing in the Amazon Redshift Cluster Management Guide.
If this option is true, enhanced VPC routing is enabled.
Default: false (optional)
String *hsmClientCertificateIdentifier = hsmClientCertificateIdentifier_example; // Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM. (optional)
String *hsmConfigurationIdentifier = hsmConfigurationIdentifier_example; // Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM. (optional)
array[String] *iamRoles.IamRoleArn.N = ; // A list of AWS Identity and Access Management (IAM) roles that can be used by the cluster to access other AWS services. You must supply the IAM roles in their Amazon Resource Name (ARN) format. You can supply up to 10 IAM roles in a single request.
A cluster can have up to 10 IAM roles associated with it at any time. (optional)
String *kmsKeyId = kmsKeyId_example; // The AWS Key Management Service (KMS) key ID of the encryption key that you want to use to encrypt data in the cluster. (optional)
BigDecimal *port = 8.14; // The port number on which the cluster accepts incoming connections.
The cluster is accessible only via the JDBC and ODBC connection strings. Part of the connection string requires the port on which the cluster will listen for incoming connections.
Default: 5439
Valid Values: 1150-65535 (optional)
CreateClusterApi *apiInstance = [[CreateClusterApi alloc] init];
[apiInstance createClusterWith:apiecoKey
clusterIdentifier:clusterIdentifier
masterUsername:masterUsername
masterUserPassword:masterUserPassword
nodeType:nodeType
additionalInfo:additionalInfo
allowVersionUpgrade:allowVersionUpgrade
automatedSnapshotRetentionPeriod:automatedSnapshotRetentionPeriod
availabilityZone:availabilityZone
clusterParameterGroupName:clusterParameterGroupName
clusterSubnetGroupName:clusterSubnetGroupName
clusterType:clusterType
clusterVersion:clusterVersion
dBName:dBName
elasticIp:elasticIp
encrypted:encrypted
enhancedVpcRouting:enhancedVpcRouting
hsmClientCertificateIdentifier:hsmClientCertificateIdentifier
hsmConfigurationIdentifier:hsmConfigurationIdentifier
iamRoles.IamRoleArn.N:iamRoles.IamRoleArn.N
kmsKeyId:kmsKeyId
port:port
completionHandler: ^(inline_response_200_7 output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var AmazonRedshiftApiDocumentation_ = require('_amazon_redshift_api_documentation_');
var defaultClient = AmazonRedshiftApiDocumentation_.ApiClient.instance;
// Configure API key authorization: apieco-key
var apieco-key = defaultClient.authentications['apieco-key'];
apieco-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.apiKeyPrefix['apieco-key'] = "Token"
var api = new AmazonRedshiftApiDocumentation_.CreateClusterApi()
var apiecoKey = apiecoKey_example; // {String}
var clusterIdentifier = clusterIdentifier_example; // {String} A unique identifier for the cluster. You use this identifier to refer to the cluster for any subsequent cluster operations such as deleting or modifying. The identifier also appears in the Amazon Redshift console.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens.
Alphabetic characters must be lowercase.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
Must be unique for all clusters within an AWS account.
Example: myexamplecluster
var masterUsername = masterUsername_example; // {String} The user name associated with the master user account for the cluster that is being created.
Constraints:
Must be 1 - 128 alphanumeric characters. The user name can`t be PUBLIC.
First character must be a letter.
Cannot be a reserved word. A list of reserved words can be found in Reserved Words in the Amazon Redshift Database Developer Guide.
var masterUserPassword = masterUserPassword_example; // {String} The password associated with the master user account for the cluster that is being created.
Constraints:
Must be between 8 and 64 characters in length.
Must contain at least one uppercase letter.
Must contain at least one lowercase letter.
Must contain one number.
Can be any printable ASCII character (ASCII code 33 to 126) except (singl quote), (double quote), \, /, @, or space.
var nodeType = nodeType_example; // {String} The node type to be provisioned for the cluster. For information about node types, go to Working with Clusters in the Amazon Redshift Cluster Management Guide.
Valid Values: ds2.xlarge | ds2.8xlarge | dc1.large | dc1.8xlarge | dc2.large | dc2.8xlarge | ra3.4xlarge | ra3.16xlarge
var opts = {
'additionalInfo': additionalInfo_example, // {String} Reserved
'allowVersionUpgrade': true, // {Boolean} If true, major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster.
When a new major version of the Amazon Redshift engine is released, you can request that the service automatically apply upgrades during the maintenance window to the Amazon Redshift engine that is running on your cluster.
Default: true
'automatedSnapshotRetentionPeriod': 56, // {Integer} The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshots when you want with CreateClusterSnapshot.
Default: 1
Constraints: Must be a value from 0 to 35.
'availabilityZone': availabilityZone_example, // {String} The EC2 Availability Zone (AZ) in which you want Amazon Redshift to provision the cluster. For example, if you have several EC2 instances running in a specific Availability Zone, then you might want the cluster to be provisioned in the same zone in order to decrease network latency.
Default: A random, system-chosen Availability Zone in the region that is specified by the endpoint.
Example: us-east-2d
Constraint: The specified Availability Zone must be in the same region as the current endpoint.
'clusterParameterGroupName': clusterParameterGroupName_example, // {String} The name of the parameter group to be associated with this cluster.
Default: The default Amazon Redshift cluster parameter group. For information about the default parameter group, go to Working with Amazon Redshift Parameter Groups
Constraints:
Must be 1 to 255 alphanumeric characters or hyphens.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
'clusterSubnetGroupName': clusterSubnetGroupName_example, // {String} The name of a cluster subnet group to be associated with this cluster.
If this parameter is not provided the resulting cluster will be deployed outside virtual private cloud (VPC).
'clusterType': clusterType_example, // {String} The type of the cluster. When cluster type is specified as
single-node, the NumberOfNodes parameter is not required.
multi-node, the NumberOfNodes parameter is required.
Valid Values: multi-node | single-node
Default: multi-node
'clusterVersion': clusterVersion_example, // {String} The version of the Amazon Redshift engine software that you want to deploy on the cluster.
The version selected runs on all the nodes in the cluster.
Constraints: Only version 1.0 is currently available.
Example: 1.0
'dBName': dBName_example, // {String} The name of the first database to be created when the cluster is created.
To create additional databases after the cluster is created, connect to the cluster with a SQL client and use SQL commands to create a database. For more information, go to Create a Database in the Amazon Redshift Database Developer Guide.
Default: dev
'elasticIp': elasticIp_example, // {String} The Elastic IP (EIP) address for the cluster.
Constraints: The cluster must be provisioned in EC2-VPC and publicly -accessible through an Internet gateway. For more information about provisioning clusters in EC2-VPC, go to Supported Platforms to Launch Your Cluster in the Amazon Redshift Cluster Management Guide.
'encrypted': true, // {Boolean} If true, the data in the cluster is encrypted at rest.
Default: false
'enhancedVpcRouting': true, // {Boolean} An option that specifies whether to create the cluster with enhanced VPC routing enabled. To create a cluster that uses enhanced VPC routing, the cluster must be in a VPC. For more information, see Enhanced VPC Routing in the Amazon Redshift Cluster Management Guide.
If this option is true, enhanced VPC routing is enabled.
Default: false
'hsmClientCertificateIdentifier': hsmClientCertificateIdentifier_example, // {String} Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM.
'hsmConfigurationIdentifier': hsmConfigurationIdentifier_example, // {String} Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM.
'iamRoles.IamRoleArn.N': , // {array[String]} A list of AWS Identity and Access Management (IAM) roles that can be used by the cluster to access other AWS services. You must supply the IAM roles in their Amazon Resource Name (ARN) format. You can supply up to 10 IAM roles in a single request.
A cluster can have up to 10 IAM roles associated with it at any time.
'kmsKeyId': kmsKeyId_example, // {String} The AWS Key Management Service (KMS) key ID of the encryption key that you want to use to encrypt data in the cluster.
'port': 8.14 // {BigDecimal} The port number on which the cluster accepts incoming connections.
The cluster is accessible only via the JDBC and ODBC connection strings. Part of the connection string requires the port on which the cluster will listen for incoming connections.
Default: 5439
Valid Values: 1150-65535
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.createCluster(apiecoKey, clusterIdentifier, masterUsername, masterUserPassword, nodeType, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class createClusterExample
{
public void main()
{
// Configure API key authorization: apieco-key
Configuration.Default.ApiKey.Add("apieco-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("apieco-key", "Bearer");
var apiInstance = new CreateClusterApi();
var apiecoKey = apiecoKey_example; // String |
var clusterIdentifier = clusterIdentifier_example; // String | A unique identifier for the cluster. You use this identifier to refer to the cluster for any subsequent cluster operations such as deleting or modifying. The identifier also appears in the Amazon Redshift console.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens.
Alphabetic characters must be lowercase.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
Must be unique for all clusters within an AWS account.
Example: myexamplecluster
var masterUsername = masterUsername_example; // String | The user name associated with the master user account for the cluster that is being created.
Constraints:
Must be 1 - 128 alphanumeric characters. The user name can`t be PUBLIC.
First character must be a letter.
Cannot be a reserved word. A list of reserved words can be found in Reserved Words in the Amazon Redshift Database Developer Guide.
var masterUserPassword = masterUserPassword_example; // String | The password associated with the master user account for the cluster that is being created.
Constraints:
Must be between 8 and 64 characters in length.
Must contain at least one uppercase letter.
Must contain at least one lowercase letter.
Must contain one number.
Can be any printable ASCII character (ASCII code 33 to 126) except (singl quote), (double quote), \, /, @, or space.
var nodeType = nodeType_example; // String | The node type to be provisioned for the cluster. For information about node types, go to Working with Clusters in the Amazon Redshift Cluster Management Guide.
Valid Values: ds2.xlarge | ds2.8xlarge | dc1.large | dc1.8xlarge | dc2.large | dc2.8xlarge | ra3.4xlarge | ra3.16xlarge
var additionalInfo = additionalInfo_example; // String | Reserved (optional)
var allowVersionUpgrade = true; // Boolean | If true, major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster.
When a new major version of the Amazon Redshift engine is released, you can request that the service automatically apply upgrades during the maintenance window to the Amazon Redshift engine that is running on your cluster.
Default: true (optional)
var automatedSnapshotRetentionPeriod = 56; // Integer | The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshots when you want with CreateClusterSnapshot.
Default: 1
Constraints: Must be a value from 0 to 35. (optional)
var availabilityZone = availabilityZone_example; // String | The EC2 Availability Zone (AZ) in which you want Amazon Redshift to provision the cluster. For example, if you have several EC2 instances running in a specific Availability Zone, then you might want the cluster to be provisioned in the same zone in order to decrease network latency.
Default: A random, system-chosen Availability Zone in the region that is specified by the endpoint.
Example: us-east-2d
Constraint: The specified Availability Zone must be in the same region as the current endpoint. (optional)
var clusterParameterGroupName = clusterParameterGroupName_example; // String | The name of the parameter group to be associated with this cluster.
Default: The default Amazon Redshift cluster parameter group. For information about the default parameter group, go to Working with Amazon Redshift Parameter Groups
Constraints:
Must be 1 to 255 alphanumeric characters or hyphens.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens. (optional)
var clusterSubnetGroupName = clusterSubnetGroupName_example; // String | The name of a cluster subnet group to be associated with this cluster.
If this parameter is not provided the resulting cluster will be deployed outside virtual private cloud (VPC). (optional)
var clusterType = clusterType_example; // String | The type of the cluster. When cluster type is specified as
single-node, the NumberOfNodes parameter is not required.
multi-node, the NumberOfNodes parameter is required.
Valid Values: multi-node | single-node
Default: multi-node (optional)
var clusterVersion = clusterVersion_example; // String | The version of the Amazon Redshift engine software that you want to deploy on the cluster.
The version selected runs on all the nodes in the cluster.
Constraints: Only version 1.0 is currently available.
Example: 1.0 (optional)
var dBName = dBName_example; // String | The name of the first database to be created when the cluster is created.
To create additional databases after the cluster is created, connect to the cluster with a SQL client and use SQL commands to create a database. For more information, go to Create a Database in the Amazon Redshift Database Developer Guide.
Default: dev (optional)
var elasticIp = elasticIp_example; // String | The Elastic IP (EIP) address for the cluster.
Constraints: The cluster must be provisioned in EC2-VPC and publicly -accessible through an Internet gateway. For more information about provisioning clusters in EC2-VPC, go to Supported Platforms to Launch Your Cluster in the Amazon Redshift Cluster Management Guide. (optional)
var encrypted = true; // Boolean | If true, the data in the cluster is encrypted at rest.
Default: false (optional)
var enhancedVpcRouting = true; // Boolean | An option that specifies whether to create the cluster with enhanced VPC routing enabled. To create a cluster that uses enhanced VPC routing, the cluster must be in a VPC. For more information, see Enhanced VPC Routing in the Amazon Redshift Cluster Management Guide.
If this option is true, enhanced VPC routing is enabled.
Default: false (optional)
var hsmClientCertificateIdentifier = hsmClientCertificateIdentifier_example; // String | Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM. (optional)
var hsmConfigurationIdentifier = hsmConfigurationIdentifier_example; // String | Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM. (optional)
var iamRoles.IamRoleArn.N = new array[String](); // array[String] | A list of AWS Identity and Access Management (IAM) roles that can be used by the cluster to access other AWS services. You must supply the IAM roles in their Amazon Resource Name (ARN) format. You can supply up to 10 IAM roles in a single request.
A cluster can have up to 10 IAM roles associated with it at any time. (optional)
var kmsKeyId = kmsKeyId_example; // String | The AWS Key Management Service (KMS) key ID of the encryption key that you want to use to encrypt data in the cluster. (optional)
var port = 8.14; // BigDecimal | The port number on which the cluster accepts incoming connections.
The cluster is accessible only via the JDBC and ODBC connection strings. Part of the connection string requires the port on which the cluster will listen for incoming connections.
Default: 5439
Valid Values: 1150-65535 (optional)
try
{
inline_response_200_7 result = apiInstance.createCluster(apiecoKey, clusterIdentifier, masterUsername, masterUserPassword, nodeType, additionalInfo, allowVersionUpgrade, automatedSnapshotRetentionPeriod, availabilityZone, clusterParameterGroupName, clusterSubnetGroupName, clusterType, clusterVersion, dBName, elasticIp, encrypted, enhancedVpcRouting, hsmClientCertificateIdentifier, hsmConfigurationIdentifier, iamRoles.IamRoleArn.N, kmsKeyId, port);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CreateClusterApi.createCluster: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apieco-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('apieco-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apieco-key', 'Bearer');
$api_instance = new Swagger\Client\Api\CreateClusterApi();
$apiecoKey = apiecoKey_example; // String |
$clusterIdentifier = clusterIdentifier_example; // String | A unique identifier for the cluster. You use this identifier to refer to the cluster for any subsequent cluster operations such as deleting or modifying. The identifier also appears in the Amazon Redshift console.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens.
Alphabetic characters must be lowercase.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
Must be unique for all clusters within an AWS account.
Example: myexamplecluster
$masterUsername = masterUsername_example; // String | The user name associated with the master user account for the cluster that is being created.
Constraints:
Must be 1 - 128 alphanumeric characters. The user name can`t be PUBLIC.
First character must be a letter.
Cannot be a reserved word. A list of reserved words can be found in Reserved Words in the Amazon Redshift Database Developer Guide.
$masterUserPassword = masterUserPassword_example; // String | The password associated with the master user account for the cluster that is being created.
Constraints:
Must be between 8 and 64 characters in length.
Must contain at least one uppercase letter.
Must contain at least one lowercase letter.
Must contain one number.
Can be any printable ASCII character (ASCII code 33 to 126) except (singl quote), (double quote), \, /, @, or space.
$nodeType = nodeType_example; // String | The node type to be provisioned for the cluster. For information about node types, go to Working with Clusters in the Amazon Redshift Cluster Management Guide.
Valid Values: ds2.xlarge | ds2.8xlarge | dc1.large | dc1.8xlarge | dc2.large | dc2.8xlarge | ra3.4xlarge | ra3.16xlarge
$additionalInfo = additionalInfo_example; // String | Reserved
$allowVersionUpgrade = true; // Boolean | If true, major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster.
When a new major version of the Amazon Redshift engine is released, you can request that the service automatically apply upgrades during the maintenance window to the Amazon Redshift engine that is running on your cluster.
Default: true
$automatedSnapshotRetentionPeriod = 56; // Integer | The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshots when you want with CreateClusterSnapshot.
Default: 1
Constraints: Must be a value from 0 to 35.
$availabilityZone = availabilityZone_example; // String | The EC2 Availability Zone (AZ) in which you want Amazon Redshift to provision the cluster. For example, if you have several EC2 instances running in a specific Availability Zone, then you might want the cluster to be provisioned in the same zone in order to decrease network latency.
Default: A random, system-chosen Availability Zone in the region that is specified by the endpoint.
Example: us-east-2d
Constraint: The specified Availability Zone must be in the same region as the current endpoint.
$clusterParameterGroupName = clusterParameterGroupName_example; // String | The name of the parameter group to be associated with this cluster.
Default: The default Amazon Redshift cluster parameter group. For information about the default parameter group, go to Working with Amazon Redshift Parameter Groups
Constraints:
Must be 1 to 255 alphanumeric characters or hyphens.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
$clusterSubnetGroupName = clusterSubnetGroupName_example; // String | The name of a cluster subnet group to be associated with this cluster.
If this parameter is not provided the resulting cluster will be deployed outside virtual private cloud (VPC).
$clusterType = clusterType_example; // String | The type of the cluster. When cluster type is specified as
single-node, the NumberOfNodes parameter is not required.
multi-node, the NumberOfNodes parameter is required.
Valid Values: multi-node | single-node
Default: multi-node
$clusterVersion = clusterVersion_example; // String | The version of the Amazon Redshift engine software that you want to deploy on the cluster.
The version selected runs on all the nodes in the cluster.
Constraints: Only version 1.0 is currently available.
Example: 1.0
$dBName = dBName_example; // String | The name of the first database to be created when the cluster is created.
To create additional databases after the cluster is created, connect to the cluster with a SQL client and use SQL commands to create a database. For more information, go to Create a Database in the Amazon Redshift Database Developer Guide.
Default: dev
$elasticIp = elasticIp_example; // String | The Elastic IP (EIP) address for the cluster.
Constraints: The cluster must be provisioned in EC2-VPC and publicly -accessible through an Internet gateway. For more information about provisioning clusters in EC2-VPC, go to Supported Platforms to Launch Your Cluster in the Amazon Redshift Cluster Management Guide.
$encrypted = true; // Boolean | If true, the data in the cluster is encrypted at rest.
Default: false
$enhancedVpcRouting = true; // Boolean | An option that specifies whether to create the cluster with enhanced VPC routing enabled. To create a cluster that uses enhanced VPC routing, the cluster must be in a VPC. For more information, see Enhanced VPC Routing in the Amazon Redshift Cluster Management Guide.
If this option is true, enhanced VPC routing is enabled.
Default: false
$hsmClientCertificateIdentifier = hsmClientCertificateIdentifier_example; // String | Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM.
$hsmConfigurationIdentifier = hsmConfigurationIdentifier_example; // String | Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM.
$iamRoles.IamRoleArn.N = ; // array[String] | A list of AWS Identity and Access Management (IAM) roles that can be used by the cluster to access other AWS services. You must supply the IAM roles in their Amazon Resource Name (ARN) format. You can supply up to 10 IAM roles in a single request.
A cluster can have up to 10 IAM roles associated with it at any time.
$kmsKeyId = kmsKeyId_example; // String | The AWS Key Management Service (KMS) key ID of the encryption key that you want to use to encrypt data in the cluster.
$port = 8.14; // BigDecimal | The port number on which the cluster accepts incoming connections.
The cluster is accessible only via the JDBC and ODBC connection strings. Part of the connection string requires the port on which the cluster will listen for incoming connections.
Default: 5439
Valid Values: 1150-65535
try {
$result = $api_instance->createCluster($apiecoKey, $clusterIdentifier, $masterUsername, $masterUserPassword, $nodeType, $additionalInfo, $allowVersionUpgrade, $automatedSnapshotRetentionPeriod, $availabilityZone, $clusterParameterGroupName, $clusterSubnetGroupName, $clusterType, $clusterVersion, $dBName, $elasticIp, $encrypted, $enhancedVpcRouting, $hsmClientCertificateIdentifier, $hsmConfigurationIdentifier, $iamRoles.IamRoleArn.N, $kmsKeyId, $port);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CreateClusterApi->createCluster: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CreateClusterApi;
# Configure API key authorization: apieco-key
$WWW::SwaggerClient::Configuration::api_key->{'apieco-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'apieco-key'} = "Bearer";
my $api_instance = WWW::SwaggerClient::CreateClusterApi->new();
my $apiecoKey = apiecoKey_example; # String |
my $clusterIdentifier = clusterIdentifier_example; # String | A unique identifier for the cluster. You use this identifier to refer to the cluster for any subsequent cluster operations such as deleting or modifying. The identifier also appears in the Amazon Redshift console.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens.
Alphabetic characters must be lowercase.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
Must be unique for all clusters within an AWS account.
Example: myexamplecluster
my $masterUsername = masterUsername_example; # String | The user name associated with the master user account for the cluster that is being created.
Constraints:
Must be 1 - 128 alphanumeric characters. The user name can`t be PUBLIC.
First character must be a letter.
Cannot be a reserved word. A list of reserved words can be found in Reserved Words in the Amazon Redshift Database Developer Guide.
my $masterUserPassword = masterUserPassword_example; # String | The password associated with the master user account for the cluster that is being created.
Constraints:
Must be between 8 and 64 characters in length.
Must contain at least one uppercase letter.
Must contain at least one lowercase letter.
Must contain one number.
Can be any printable ASCII character (ASCII code 33 to 126) except (singl quote), (double quote), \, /, @, or space.
my $nodeType = nodeType_example; # String | The node type to be provisioned for the cluster. For information about node types, go to Working with Clusters in the Amazon Redshift Cluster Management Guide.
Valid Values: ds2.xlarge | ds2.8xlarge | dc1.large | dc1.8xlarge | dc2.large | dc2.8xlarge | ra3.4xlarge | ra3.16xlarge
my $additionalInfo = additionalInfo_example; # String | Reserved
my $allowVersionUpgrade = true; # Boolean | If true, major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster.
When a new major version of the Amazon Redshift engine is released, you can request that the service automatically apply upgrades during the maintenance window to the Amazon Redshift engine that is running on your cluster.
Default: true
my $automatedSnapshotRetentionPeriod = 56; # Integer | The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshots when you want with CreateClusterSnapshot.
Default: 1
Constraints: Must be a value from 0 to 35.
my $availabilityZone = availabilityZone_example; # String | The EC2 Availability Zone (AZ) in which you want Amazon Redshift to provision the cluster. For example, if you have several EC2 instances running in a specific Availability Zone, then you might want the cluster to be provisioned in the same zone in order to decrease network latency.
Default: A random, system-chosen Availability Zone in the region that is specified by the endpoint.
Example: us-east-2d
Constraint: The specified Availability Zone must be in the same region as the current endpoint.
my $clusterParameterGroupName = clusterParameterGroupName_example; # String | The name of the parameter group to be associated with this cluster.
Default: The default Amazon Redshift cluster parameter group. For information about the default parameter group, go to Working with Amazon Redshift Parameter Groups
Constraints:
Must be 1 to 255 alphanumeric characters or hyphens.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
my $clusterSubnetGroupName = clusterSubnetGroupName_example; # String | The name of a cluster subnet group to be associated with this cluster.
If this parameter is not provided the resulting cluster will be deployed outside virtual private cloud (VPC).
my $clusterType = clusterType_example; # String | The type of the cluster. When cluster type is specified as
single-node, the NumberOfNodes parameter is not required.
multi-node, the NumberOfNodes parameter is required.
Valid Values: multi-node | single-node
Default: multi-node
my $clusterVersion = clusterVersion_example; # String | The version of the Amazon Redshift engine software that you want to deploy on the cluster.
The version selected runs on all the nodes in the cluster.
Constraints: Only version 1.0 is currently available.
Example: 1.0
my $dBName = dBName_example; # String | The name of the first database to be created when the cluster is created.
To create additional databases after the cluster is created, connect to the cluster with a SQL client and use SQL commands to create a database. For more information, go to Create a Database in the Amazon Redshift Database Developer Guide.
Default: dev
my $elasticIp = elasticIp_example; # String | The Elastic IP (EIP) address for the cluster.
Constraints: The cluster must be provisioned in EC2-VPC and publicly -accessible through an Internet gateway. For more information about provisioning clusters in EC2-VPC, go to Supported Platforms to Launch Your Cluster in the Amazon Redshift Cluster Management Guide.
my $encrypted = true; # Boolean | If true, the data in the cluster is encrypted at rest.
Default: false
my $enhancedVpcRouting = true; # Boolean | An option that specifies whether to create the cluster with enhanced VPC routing enabled. To create a cluster that uses enhanced VPC routing, the cluster must be in a VPC. For more information, see Enhanced VPC Routing in the Amazon Redshift Cluster Management Guide.
If this option is true, enhanced VPC routing is enabled.
Default: false
my $hsmClientCertificateIdentifier = hsmClientCertificateIdentifier_example; # String | Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM.
my $hsmConfigurationIdentifier = hsmConfigurationIdentifier_example; # String | Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM.
my $iamRoles.IamRoleArn.N = []; # array[String] | A list of AWS Identity and Access Management (IAM) roles that can be used by the cluster to access other AWS services. You must supply the IAM roles in their Amazon Resource Name (ARN) format. You can supply up to 10 IAM roles in a single request.
A cluster can have up to 10 IAM roles associated with it at any time.
my $kmsKeyId = kmsKeyId_example; # String | The AWS Key Management Service (KMS) key ID of the encryption key that you want to use to encrypt data in the cluster.
my $port = 8.14; # BigDecimal | The port number on which the cluster accepts incoming connections.
The cluster is accessible only via the JDBC and ODBC connection strings. Part of the connection string requires the port on which the cluster will listen for incoming connections.
Default: 5439
Valid Values: 1150-65535
eval {
my $result = $api_instance->createCluster(apiecoKey => $apiecoKey, clusterIdentifier => $clusterIdentifier, masterUsername => $masterUsername, masterUserPassword => $masterUserPassword, nodeType => $nodeType, additionalInfo => $additionalInfo, allowVersionUpgrade => $allowVersionUpgrade, automatedSnapshotRetentionPeriod => $automatedSnapshotRetentionPeriod, availabilityZone => $availabilityZone, clusterParameterGroupName => $clusterParameterGroupName, clusterSubnetGroupName => $clusterSubnetGroupName, clusterType => $clusterType, clusterVersion => $clusterVersion, dBName => $dBName, elasticIp => $elasticIp, encrypted => $encrypted, enhancedVpcRouting => $enhancedVpcRouting, hsmClientCertificateIdentifier => $hsmClientCertificateIdentifier, hsmConfigurationIdentifier => $hsmConfigurationIdentifier, iamRoles.IamRoleArn.N => $iamRoles.IamRoleArn.N, kmsKeyId => $kmsKeyId, port => $port);
print Dumper($result);
};
if ($@) {
warn "Exception when calling CreateClusterApi->createCluster: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: apieco-key
swagger_client.configuration.api_key['apieco-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['apieco-key'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.CreateClusterApi()
apiecoKey = apiecoKey_example # String |
clusterIdentifier = clusterIdentifier_example # String | A unique identifier for the cluster. You use this identifier to refer to the cluster for any subsequent cluster operations such as deleting or modifying. The identifier also appears in the Amazon Redshift console.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens.
Alphabetic characters must be lowercase.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
Must be unique for all clusters within an AWS account.
Example: myexamplecluster
masterUsername = masterUsername_example # String | The user name associated with the master user account for the cluster that is being created.
Constraints:
Must be 1 - 128 alphanumeric characters. The user name can`t be PUBLIC.
First character must be a letter.
Cannot be a reserved word. A list of reserved words can be found in Reserved Words in the Amazon Redshift Database Developer Guide.
masterUserPassword = masterUserPassword_example # String | The password associated with the master user account for the cluster that is being created.
Constraints:
Must be between 8 and 64 characters in length.
Must contain at least one uppercase letter.
Must contain at least one lowercase letter.
Must contain one number.
Can be any printable ASCII character (ASCII code 33 to 126) except (singl quote), (double quote), \, /, @, or space.
nodeType = nodeType_example # String | The node type to be provisioned for the cluster. For information about node types, go to Working with Clusters in the Amazon Redshift Cluster Management Guide.
Valid Values: ds2.xlarge | ds2.8xlarge | dc1.large | dc1.8xlarge | dc2.large | dc2.8xlarge | ra3.4xlarge | ra3.16xlarge
additionalInfo = additionalInfo_example # String | Reserved (optional)
allowVersionUpgrade = true # Boolean | If true, major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster.
When a new major version of the Amazon Redshift engine is released, you can request that the service automatically apply upgrades during the maintenance window to the Amazon Redshift engine that is running on your cluster.
Default: true (optional)
automatedSnapshotRetentionPeriod = 56 # Integer | The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshots when you want with CreateClusterSnapshot.
Default: 1
Constraints: Must be a value from 0 to 35. (optional)
availabilityZone = availabilityZone_example # String | The EC2 Availability Zone (AZ) in which you want Amazon Redshift to provision the cluster. For example, if you have several EC2 instances running in a specific Availability Zone, then you might want the cluster to be provisioned in the same zone in order to decrease network latency.
Default: A random, system-chosen Availability Zone in the region that is specified by the endpoint.
Example: us-east-2d
Constraint: The specified Availability Zone must be in the same region as the current endpoint. (optional)
clusterParameterGroupName = clusterParameterGroupName_example # String | The name of the parameter group to be associated with this cluster.
Default: The default Amazon Redshift cluster parameter group. For information about the default parameter group, go to Working with Amazon Redshift Parameter Groups
Constraints:
Must be 1 to 255 alphanumeric characters or hyphens.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens. (optional)
clusterSubnetGroupName = clusterSubnetGroupName_example # String | The name of a cluster subnet group to be associated with this cluster.
If this parameter is not provided the resulting cluster will be deployed outside virtual private cloud (VPC). (optional)
clusterType = clusterType_example # String | The type of the cluster. When cluster type is specified as
single-node, the NumberOfNodes parameter is not required.
multi-node, the NumberOfNodes parameter is required.
Valid Values: multi-node | single-node
Default: multi-node (optional)
clusterVersion = clusterVersion_example # String | The version of the Amazon Redshift engine software that you want to deploy on the cluster.
The version selected runs on all the nodes in the cluster.
Constraints: Only version 1.0 is currently available.
Example: 1.0 (optional)
dBName = dBName_example # String | The name of the first database to be created when the cluster is created.
To create additional databases after the cluster is created, connect to the cluster with a SQL client and use SQL commands to create a database. For more information, go to Create a Database in the Amazon Redshift Database Developer Guide.
Default: dev (optional)
elasticIp = elasticIp_example # String | The Elastic IP (EIP) address for the cluster.
Constraints: The cluster must be provisioned in EC2-VPC and publicly -accessible through an Internet gateway. For more information about provisioning clusters in EC2-VPC, go to Supported Platforms to Launch Your Cluster in the Amazon Redshift Cluster Management Guide. (optional)
encrypted = true # Boolean | If true, the data in the cluster is encrypted at rest.
Default: false (optional)
enhancedVpcRouting = true # Boolean | An option that specifies whether to create the cluster with enhanced VPC routing enabled. To create a cluster that uses enhanced VPC routing, the cluster must be in a VPC. For more information, see Enhanced VPC Routing in the Amazon Redshift Cluster Management Guide.
If this option is true, enhanced VPC routing is enabled.
Default: false (optional)
hsmClientCertificateIdentifier = hsmClientCertificateIdentifier_example # String | Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM. (optional)
hsmConfigurationIdentifier = hsmConfigurationIdentifier_example # String | Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM. (optional)
iamRoles.IamRoleArn.N = # array[String] | A list of AWS Identity and Access Management (IAM) roles that can be used by the cluster to access other AWS services. You must supply the IAM roles in their Amazon Resource Name (ARN) format. You can supply up to 10 IAM roles in a single request.
A cluster can have up to 10 IAM roles associated with it at any time. (optional)
kmsKeyId = kmsKeyId_example # String | The AWS Key Management Service (KMS) key ID of the encryption key that you want to use to encrypt data in the cluster. (optional)
port = 8.14 # BigDecimal | The port number on which the cluster accepts incoming connections.
The cluster is accessible only via the JDBC and ODBC connection strings. Part of the connection string requires the port on which the cluster will listen for incoming connections.
Default: 5439
Valid Values: 1150-65535 (optional)
try:
api_response = api_instance.create_cluster(apiecoKey, clusterIdentifier, masterUsername, masterUserPassword, nodeType, additionalInfo=additionalInfo, allowVersionUpgrade=allowVersionUpgrade, automatedSnapshotRetentionPeriod=automatedSnapshotRetentionPeriod, availabilityZone=availabilityZone, clusterParameterGroupName=clusterParameterGroupName, clusterSubnetGroupName=clusterSubnetGroupName, clusterType=clusterType, clusterVersion=clusterVersion, dBName=dBName, elasticIp=elasticIp, encrypted=encrypted, enhancedVpcRouting=enhancedVpcRouting, hsmClientCertificateIdentifier=hsmClientCertificateIdentifier, hsmConfigurationIdentifier=hsmConfigurationIdentifier, iamRoles.IamRoleArn.N=iamRoles.IamRoleArn.N, kmsKeyId=kmsKeyId, port=port)
pprint(api_response)
except ApiException as e:
print("Exception when calling CreateClusterApi->createCluster: %s\n" % e)
Name |
Description |
ClusterIdentifier* |
String
A unique identifier for the cluster. You use this identifier to refer to the cluster for any subsequent cluster operations such as deleting or modifying. The identifier also appears in the Amazon Redshift console.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens.
Alphabetic characters must be lowercase.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
Must be unique for all clusters within an AWS account.
Example: myexamplecluster
Required
|
MasterUsername* |
String
The user name associated with the master user account for the cluster that is being created.
Constraints:
Must be 1 - 128 alphanumeric characters. The user name can`t be PUBLIC.
First character must be a letter.
Cannot be a reserved word. A list of reserved words can be found in Reserved Words in the Amazon Redshift Database Developer Guide.
Required
|
MasterUserPassword* |
String
The password associated with the master user account for the cluster that is being created.
Constraints:
Must be between 8 and 64 characters in length.
Must contain at least one uppercase letter.
Must contain at least one lowercase letter.
Must contain one number.
Can be any printable ASCII character (ASCII code 33 to 126) except (singl quote), (double quote), \, /, @, or space.
Required
|
NodeType* |
String
The node type to be provisioned for the cluster. For information about node types, go to Working with Clusters in the Amazon Redshift Cluster Management Guide.
Valid Values: ds2.xlarge | ds2.8xlarge | dc1.large | dc1.8xlarge | dc2.large | dc2.8xlarge | ra3.4xlarge | ra3.16xlarge
Required
|
AdditionalInfo |
|
AllowVersionUpgrade |
Boolean
If true, major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster.
When a new major version of the Amazon Redshift engine is released, you can request that the service automatically apply upgrades during the maintenance window to the Amazon Redshift engine that is running on your cluster.
Default: true
|
AutomatedSnapshotRetentionPeriod |
Integer
The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshots when you want with CreateClusterSnapshot.
Default: 1
Constraints: Must be a value from 0 to 35.
|
AvailabilityZone |
String
The EC2 Availability Zone (AZ) in which you want Amazon Redshift to provision the cluster. For example, if you have several EC2 instances running in a specific Availability Zone, then you might want the cluster to be provisioned in the same zone in order to decrease network latency.
Default: A random, system-chosen Availability Zone in the region that is specified by the endpoint.
Example: us-east-2d
Constraint: The specified Availability Zone must be in the same region as the current endpoint.
|
ClusterParameterGroupName |
String
The name of the parameter group to be associated with this cluster.
Default: The default Amazon Redshift cluster parameter group. For information about the default parameter group, go to Working with Amazon Redshift Parameter Groups
Constraints:
Must be 1 to 255 alphanumeric characters or hyphens.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
|
ClusterSubnetGroupName |
String
The name of a cluster subnet group to be associated with this cluster.
If this parameter is not provided the resulting cluster will be deployed outside virtual private cloud (VPC).
|
ClusterType |
String
The type of the cluster. When cluster type is specified as
single-node, the NumberOfNodes parameter is not required.
multi-node, the NumberOfNodes parameter is required.
Valid Values: multi-node | single-node
Default: multi-node
|
ClusterVersion |
String
The version of the Amazon Redshift engine software that you want to deploy on the cluster.
The version selected runs on all the nodes in the cluster.
Constraints: Only version 1.0 is currently available.
Example: 1.0
|
DBName |
String
The name of the first database to be created when the cluster is created.
To create additional databases after the cluster is created, connect to the cluster with a SQL client and use SQL commands to create a database. For more information, go to Create a Database in the Amazon Redshift Database Developer Guide.
Default: dev
|
ElasticIp |
String
The Elastic IP (EIP) address for the cluster.
Constraints: The cluster must be provisioned in EC2-VPC and publicly -accessible through an Internet gateway. For more information about provisioning clusters in EC2-VPC, go to Supported Platforms to Launch Your Cluster in the Amazon Redshift Cluster Management Guide.
|
Encrypted |
Boolean
If true, the data in the cluster is encrypted at rest.
Default: false
|
EnhancedVpcRouting |
Boolean
An option that specifies whether to create the cluster with enhanced VPC routing enabled. To create a cluster that uses enhanced VPC routing, the cluster must be in a VPC. For more information, see Enhanced VPC Routing in the Amazon Redshift Cluster Management Guide.
If this option is true, enhanced VPC routing is enabled.
Default: false
|
HsmClientCertificateIdentifier |
String
Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM.
|
HsmConfigurationIdentifier |
String
Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM.
|
IamRoles.IamRoleArn.N |
array[String]
A list of AWS Identity and Access Management (IAM) roles that can be used by the cluster to access other AWS services. You must supply the IAM roles in their Amazon Resource Name (ARN) format. You can supply up to 10 IAM roles in a single request.
A cluster can have up to 10 IAM roles associated with it at any time.
|
KmsKeyId |
String
The AWS Key Management Service (KMS) key ID of the encryption key that you want to use to encrypt data in the cluster.
|
Port |
BigDecimal
The port number on which the cluster accepts incoming connections.
The cluster is accessible only via the JDBC and ODBC connection strings. Part of the connection string requires the port on which the cluster will listen for incoming connections.
Default: 5439
Valid Values: 1150-65535
|