/// <summary> /// Initiates the asynchronous execution of the RestoreTableFromClusterSnapshot operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the RestoreTableFromClusterSnapshot 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<RestoreTableFromClusterSnapshotResponse> RestoreTableFromClusterSnapshotAsync(RestoreTableFromClusterSnapshotRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new RestoreTableFromClusterSnapshotRequestMarshaller(); var unmarshaller = RestoreTableFromClusterSnapshotResponseUnmarshaller.Instance; return InvokeAsync<RestoreTableFromClusterSnapshotRequest,RestoreTableFromClusterSnapshotResponse>(request, marshaller, unmarshaller, cancellationToken); }
public void RestoreTableFromClusterSnapshotMarshallTest() { var operation = service_model.FindOperation("RestoreTableFromClusterSnapshot"); var request = InstantiateClassGenerator.Execute<RestoreTableFromClusterSnapshotRequest>(); var marshaller = new RestoreTableFromClusterSnapshotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = RestoreTableFromClusterSnapshotResponseUnmarshaller.Instance.Unmarshall(context) as RestoreTableFromClusterSnapshotResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Creates a new table from a table in an Amazon Redshift cluster snapshot. You must /// create the new table within the Amazon Redshift cluster that the snapshot was taken /// from. /// /// /// <para> /// You cannot use <code>RestoreTableFromClusterSnapshot</code> to restore a table with /// the same name as an existing table in an Amazon Redshift cluster. That is, you cannot /// overwrite an existing table in a cluster with a restored table. If you want to replace /// your original table with a new, restored table, then rename or drop your original /// table before you call <code>RestoreTableFromClusterSnapshot</code>. When you have /// renamed your original table, then you can pass the original name of the table as the /// <code>NewTableName</code> parameter value in the call to <code>RestoreTableFromClusterSnapshot</code>. /// This way, you can replace the original table with the table created from the snapshot. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the RestoreTableFromClusterSnapshot service method.</param> /// /// <returns>The response from the RestoreTableFromClusterSnapshot service method, as returned by Redshift.</returns> /// <exception cref="Amazon.Redshift.Model.ClusterNotFoundException"> /// The <code>ClusterIdentifier</code> parameter does not refer to an existing cluster. /// </exception> /// <exception cref="Amazon.Redshift.Model.ClusterSnapshotNotFoundException"> /// The snapshot identifier does not refer to an existing cluster snapshot. /// </exception> /// <exception cref="Amazon.Redshift.Model.InProgressTableRestoreQuotaExceededException"> /// You have exceeded the allowed number of table restore requests. Wait for your current /// table restore requests to complete before making a new request. /// </exception> /// <exception cref="Amazon.Redshift.Model.InvalidClusterSnapshotStateException"> /// The specified cluster snapshot is not in the <code>available</code> state, or other /// accounts are authorized to access the snapshot. /// </exception> /// <exception cref="Amazon.Redshift.Model.InvalidClusterStateException"> /// The specified cluster is not in the <code>available</code> state. /// </exception> /// <exception cref="Amazon.Redshift.Model.InvalidTableRestoreArgumentException"> /// The value specified for the <code>sourceDatabaseName</code>, <code>sourceSchemaName</code>, /// or <code>sourceTableName</code> parameter, or a combination of these, doesn't exist /// in the snapshot. /// </exception> /// <exception cref="Amazon.Redshift.Model.UnsupportedOperationException"> /// The requested operation isn't supported. /// </exception> public RestoreTableFromClusterSnapshotResponse RestoreTableFromClusterSnapshot(RestoreTableFromClusterSnapshotRequest request) { var marshaller = new RestoreTableFromClusterSnapshotRequestMarshaller(); var unmarshaller = RestoreTableFromClusterSnapshotResponseUnmarshaller.Instance; return Invoke<RestoreTableFromClusterSnapshotRequest,RestoreTableFromClusterSnapshotResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the RestoreTableFromClusterSnapshot operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the RestoreTableFromClusterSnapshot operation on AmazonRedshiftClient.</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 EndRestoreTableFromClusterSnapshot /// operation.</returns> public IAsyncResult BeginRestoreTableFromClusterSnapshot(RestoreTableFromClusterSnapshotRequest request, AsyncCallback callback, object state) { var marshaller = new RestoreTableFromClusterSnapshotRequestMarshaller(); var unmarshaller = RestoreTableFromClusterSnapshotResponseUnmarshaller.Instance; return BeginInvoke<RestoreTableFromClusterSnapshotRequest>(request, marshaller, unmarshaller, callback, state); }