コード例 #1
0
        public void NeptuneCreateDBCluster()
        {
            #region create-db-cluster-423b998d-eba9-40dd-8e19-96c5b6e5f31d

            var response = client.CreateDBCluster(new CreateDBClusterRequest
            {
                AvailabilityZones = new List <string> {
                    "us-east-1a"
                },
                BackupRetentionPeriod       = 1,
                DBClusterIdentifier         = "mydbcluster",
                DBClusterParameterGroupName = "mydbclusterparametergroup",
                DatabaseName       = "myauroradb",
                Engine             = "aurora",
                EngineVersion      = "5.6.10a",
                MasterUserPassword = "******",
                MasterUsername     = "******",
                Port             = 3306,
                StorageEncrypted = true
            });

            DBCluster dbCluster = response.DBCluster;

            #endregion
        }
コード例 #2
0
 private Amazon.Neptune.Model.CreateDBClusterResponse CallAWSServiceOperation(IAmazonNeptune client, Amazon.Neptune.Model.CreateDBClusterRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Neptune", "CreateDBCluster");
     try
     {
         #if DESKTOP
         return(client.CreateDBCluster(request));
         #elif CORECLR
         return(client.CreateDBClusterAsync(request).GetAwaiter().GetResult());
         #else
                 #error "Unknown build edition"
         #endif
     }
     catch (AmazonServiceException exc)
     {
         var webException = exc.InnerException as System.Net.WebException;
         if (webException != null)
         {
             throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException);
         }
         throw;
     }
 }