/// <summary> /// Initiates the asynchronous execution of the ModifyDBCluster operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ModifyDBCluster operation.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// <returns>The task object representing the asynchronous operation.</returns> public Task<ModifyDBClusterResponse> ModifyDBClusterAsync(ModifyDBClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new ModifyDBClusterRequestMarshaller(); var unmarshaller = ModifyDBClusterResponseUnmarshaller.Instance; return InvokeAsync<ModifyDBClusterRequest,ModifyDBClusterResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// Modify a setting for an Amazon Aurora DB cluster. You can change one or more database /// configuration parameters by specifying these parameters and the new values in the /// request. For more information on Amazon Aurora, see <a href="http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Aurora.html">Aurora /// on Amazon RDS</a> in the <i>Amazon RDS User Guide.</i> /// </summary> /// <param name="request">Container for the necessary parameters to execute the ModifyDBCluster service method.</param> /// /// <returns>The response from the ModifyDBCluster service method, as returned by RDS.</returns> /// <exception cref="Amazon.RDS.Model.DBClusterAlreadyExistsException"> /// User already has a DB cluster with the given identifier. /// </exception> /// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException"> /// <i>DBClusterIdentifier</i> does not refer to an existing DB cluster. /// </exception> /// <exception cref="Amazon.RDS.Model.DBClusterParameterGroupNotFoundException"> /// <i>DBClusterParameterGroupName</i> does not refer to an existing DB Cluster parameter /// group. /// </exception> /// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException"> /// <i>DBSubnetGroupName</i> does not refer to an existing DB subnet group. /// </exception> /// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException"> /// The supplied value is not a valid DB cluster state. /// </exception> /// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException"> /// The specified DB instance is not in the <i>available</i> state. /// </exception> /// <exception cref="Amazon.RDS.Model.InvalidDBSecurityGroupStateException"> /// The state of the DB security group does not allow deletion. /// </exception> /// <exception cref="Amazon.RDS.Model.InvalidDBSubnetGroupStateException"> /// The DB subnet group cannot be deleted because it is in use. /// </exception> /// <exception cref="Amazon.RDS.Model.InvalidSubnetException"> /// The requested subnet is invalid, or multiple subnets were requested that are not /// all in a common VPC. /// </exception> /// <exception cref="Amazon.RDS.Model.InvalidVPCNetworkStateException"> /// DB subnet group does not cover all Availability Zones after it is created because /// users' change. /// </exception> /// <exception cref="Amazon.RDS.Model.StorageQuotaExceededException"> /// Request would result in user exceeding the allowed amount of storage available across /// all DB instances. /// </exception> public ModifyDBClusterResponse ModifyDBCluster(ModifyDBClusterRequest request) { var marshaller = new ModifyDBClusterRequestMarshaller(); var unmarshaller = ModifyDBClusterResponseUnmarshaller.Instance; return Invoke<ModifyDBClusterRequest,ModifyDBClusterResponse>(request, marshaller, unmarshaller); }
private Amazon.RDS.Model.ModifyDBClusterResponse CallAWSServiceOperation(IAmazonRDS client, Amazon.RDS.Model.ModifyDBClusterRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Relational Database Service", "ModifyDBCluster"); try { #if DESKTOP return(client.ModifyDBCluster(request)); #elif CORECLR return(client.ModifyDBClusterAsync(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; } }
/// <summary> /// Initiates the asynchronous execution of the ModifyDBCluster operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ModifyDBCluster operation on AmazonRDSClient.</param> /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param> /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.</param> /// /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndModifyDBCluster /// operation.</returns> public IAsyncResult BeginModifyDBCluster(ModifyDBClusterRequest request, AsyncCallback callback, object state) { var marshaller = new ModifyDBClusterRequestMarshaller(); var unmarshaller = ModifyDBClusterResponseUnmarshaller.Instance; return BeginInvoke<ModifyDBClusterRequest>(request, marshaller, unmarshaller, callback, state); }
public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.RDS.Model.ModifyDBClusterRequest(); if (cmdletContext.AllowMajorVersionUpgrade != null) { request.AllowMajorVersionUpgrade = cmdletContext.AllowMajorVersionUpgrade.Value; } if (cmdletContext.ApplyImmediately != null) { request.ApplyImmediately = cmdletContext.ApplyImmediately.Value; } if (cmdletContext.BacktrackWindow != null) { request.BacktrackWindow = cmdletContext.BacktrackWindow.Value; } if (cmdletContext.BackupRetentionPeriod != null) { request.BackupRetentionPeriod = cmdletContext.BackupRetentionPeriod.Value; } // populate CloudwatchLogsExportConfiguration var requestCloudwatchLogsExportConfigurationIsNull = true; request.CloudwatchLogsExportConfiguration = new Amazon.RDS.Model.CloudwatchLogsExportConfiguration(); List <System.String> requestCloudwatchLogsExportConfiguration_cloudwatchLogsExportConfiguration_DisableLogType = null; if (cmdletContext.CloudwatchLogsExportConfiguration_DisableLogType != null) { requestCloudwatchLogsExportConfiguration_cloudwatchLogsExportConfiguration_DisableLogType = cmdletContext.CloudwatchLogsExportConfiguration_DisableLogType; } if (requestCloudwatchLogsExportConfiguration_cloudwatchLogsExportConfiguration_DisableLogType != null) { request.CloudwatchLogsExportConfiguration.DisableLogTypes = requestCloudwatchLogsExportConfiguration_cloudwatchLogsExportConfiguration_DisableLogType; requestCloudwatchLogsExportConfigurationIsNull = false; } List <System.String> requestCloudwatchLogsExportConfiguration_cloudwatchLogsExportConfiguration_EnableLogType = null; if (cmdletContext.CloudwatchLogsExportConfiguration_EnableLogType != null) { requestCloudwatchLogsExportConfiguration_cloudwatchLogsExportConfiguration_EnableLogType = cmdletContext.CloudwatchLogsExportConfiguration_EnableLogType; } if (requestCloudwatchLogsExportConfiguration_cloudwatchLogsExportConfiguration_EnableLogType != null) { request.CloudwatchLogsExportConfiguration.EnableLogTypes = requestCloudwatchLogsExportConfiguration_cloudwatchLogsExportConfiguration_EnableLogType; requestCloudwatchLogsExportConfigurationIsNull = false; } // determine if request.CloudwatchLogsExportConfiguration should be set to null if (requestCloudwatchLogsExportConfigurationIsNull) { request.CloudwatchLogsExportConfiguration = null; } if (cmdletContext.CopyTagsToSnapshot != null) { request.CopyTagsToSnapshot = cmdletContext.CopyTagsToSnapshot.Value; } if (cmdletContext.DBClusterIdentifier != null) { request.DBClusterIdentifier = cmdletContext.DBClusterIdentifier; } if (cmdletContext.DBClusterParameterGroupName != null) { request.DBClusterParameterGroupName = cmdletContext.DBClusterParameterGroupName; } if (cmdletContext.DBInstanceParameterGroupName != null) { request.DBInstanceParameterGroupName = cmdletContext.DBInstanceParameterGroupName; } if (cmdletContext.DeletionProtection != null) { request.DeletionProtection = cmdletContext.DeletionProtection.Value; } if (cmdletContext.Domain != null) { request.Domain = cmdletContext.Domain; } if (cmdletContext.DomainIAMRoleName != null) { request.DomainIAMRoleName = cmdletContext.DomainIAMRoleName; } if (cmdletContext.EnableGlobalWriteForwarding != null) { request.EnableGlobalWriteForwarding = cmdletContext.EnableGlobalWriteForwarding.Value; } if (cmdletContext.EnableHttpEndpoint != null) { request.EnableHttpEndpoint = cmdletContext.EnableHttpEndpoint.Value; } if (cmdletContext.EnableIAMDatabaseAuthentication != null) { request.EnableIAMDatabaseAuthentication = cmdletContext.EnableIAMDatabaseAuthentication.Value; } if (cmdletContext.EngineVersion != null) { request.EngineVersion = cmdletContext.EngineVersion; } if (cmdletContext.MasterUserPassword != null) { request.MasterUserPassword = cmdletContext.MasterUserPassword; } if (cmdletContext.NewDBClusterIdentifier != null) { request.NewDBClusterIdentifier = cmdletContext.NewDBClusterIdentifier; } if (cmdletContext.OptionGroupName != null) { request.OptionGroupName = cmdletContext.OptionGroupName; } if (cmdletContext.Port != null) { request.Port = cmdletContext.Port.Value; } if (cmdletContext.PreferredBackupWindow != null) { request.PreferredBackupWindow = cmdletContext.PreferredBackupWindow; } if (cmdletContext.PreferredMaintenanceWindow != null) { request.PreferredMaintenanceWindow = cmdletContext.PreferredMaintenanceWindow; } // populate ScalingConfiguration var requestScalingConfigurationIsNull = true; request.ScalingConfiguration = new Amazon.RDS.Model.ScalingConfiguration(); System.Boolean?requestScalingConfiguration_scalingConfiguration_AutoPause = null; if (cmdletContext.ScalingConfiguration_AutoPause != null) { requestScalingConfiguration_scalingConfiguration_AutoPause = cmdletContext.ScalingConfiguration_AutoPause.Value; } if (requestScalingConfiguration_scalingConfiguration_AutoPause != null) { request.ScalingConfiguration.AutoPause = requestScalingConfiguration_scalingConfiguration_AutoPause.Value; requestScalingConfigurationIsNull = false; } System.Int32?requestScalingConfiguration_scalingConfiguration_MaxCapacity = null; if (cmdletContext.ScalingConfiguration_MaxCapacity != null) { requestScalingConfiguration_scalingConfiguration_MaxCapacity = cmdletContext.ScalingConfiguration_MaxCapacity.Value; } if (requestScalingConfiguration_scalingConfiguration_MaxCapacity != null) { request.ScalingConfiguration.MaxCapacity = requestScalingConfiguration_scalingConfiguration_MaxCapacity.Value; requestScalingConfigurationIsNull = false; } System.Int32?requestScalingConfiguration_scalingConfiguration_MinCapacity = null; if (cmdletContext.ScalingConfiguration_MinCapacity != null) { requestScalingConfiguration_scalingConfiguration_MinCapacity = cmdletContext.ScalingConfiguration_MinCapacity.Value; } if (requestScalingConfiguration_scalingConfiguration_MinCapacity != null) { request.ScalingConfiguration.MinCapacity = requestScalingConfiguration_scalingConfiguration_MinCapacity.Value; requestScalingConfigurationIsNull = false; } System.Int32?requestScalingConfiguration_scalingConfiguration_SecondsUntilAutoPause = null; if (cmdletContext.ScalingConfiguration_SecondsUntilAutoPause != null) { requestScalingConfiguration_scalingConfiguration_SecondsUntilAutoPause = cmdletContext.ScalingConfiguration_SecondsUntilAutoPause.Value; } if (requestScalingConfiguration_scalingConfiguration_SecondsUntilAutoPause != null) { request.ScalingConfiguration.SecondsUntilAutoPause = requestScalingConfiguration_scalingConfiguration_SecondsUntilAutoPause.Value; requestScalingConfigurationIsNull = false; } System.String requestScalingConfiguration_scalingConfiguration_TimeoutAction = null; if (cmdletContext.ScalingConfiguration_TimeoutAction != null) { requestScalingConfiguration_scalingConfiguration_TimeoutAction = cmdletContext.ScalingConfiguration_TimeoutAction; } if (requestScalingConfiguration_scalingConfiguration_TimeoutAction != null) { request.ScalingConfiguration.TimeoutAction = requestScalingConfiguration_scalingConfiguration_TimeoutAction; requestScalingConfigurationIsNull = false; } // determine if request.ScalingConfiguration should be set to null if (requestScalingConfigurationIsNull) { request.ScalingConfiguration = null; } if (cmdletContext.VpcSecurityGroupId != null) { request.VpcSecurityGroupIds = cmdletContext.VpcSecurityGroupId; } CmdletOutput output; // issue call var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); try { var response = CallAWSServiceOperation(client, request); object pipelineOutput = null; pipelineOutput = cmdletContext.Select(response, this); output = new CmdletOutput { PipelineOutput = pipelineOutput, ServiceResponse = response }; } catch (Exception e) { output = new CmdletOutput { ErrorResponse = e }; } return(output); }