Container for the parameters to the GetVaultNotifications operation. This operation retrieves the notification-configuration subresource of the specified vault.

For information about setting a notification configuration on a vault, see SetVaultNotifications. If a notification configuration for a vault is not set, the operation returns a 404 Not Found error. For more information about vault notifications, see Configuring Vault Notifications in Amazon Glacier.

An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see Access Control Using AWS Identity and Access Management (IAM).

For conceptual information and underlying REST API, see Configuring Vault Notifications in Amazon Glacier and Get Vault Notification Configuration in the Amazon Glacier Developer Guide.

Inheritance: AmazonGlacierRequest
Ejemplo n.º 1
0
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.Glacier.Model.GetVaultNotificationsRequest();

            if (cmdletContext.AccountId != null)
            {
                request.AccountId = cmdletContext.AccountId;
            }
            if (cmdletContext.VaultName != null)
            {
                request.VaultName = cmdletContext.VaultName;
            }

            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);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetVaultNotifications operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the GetVaultNotifications 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<GetVaultNotificationsResponse> GetVaultNotificationsAsync(GetVaultNotificationsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new GetVaultNotificationsRequestMarshaller();
            var unmarshaller = GetVaultNotificationsResponseUnmarshaller.Instance;

            return InvokeAsync<GetVaultNotificationsRequest,GetVaultNotificationsResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
Ejemplo n.º 3
0
        internal GetVaultNotificationsResponse GetVaultNotifications(GetVaultNotificationsRequest request)
        {
            var marshaller = new GetVaultNotificationsRequestMarshaller();
            var unmarshaller = GetVaultNotificationsResponseUnmarshaller.Instance;

            return Invoke<GetVaultNotificationsRequest,GetVaultNotificationsResponse>(request, marshaller, unmarshaller);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetVaultNotifications operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the GetVaultNotifications operation on AmazonGlacierClient.</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 EndGetVaultNotifications
        ///         operation.</returns>
        public IAsyncResult BeginGetVaultNotifications(GetVaultNotificationsRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new GetVaultNotificationsRequestMarshaller();
            var unmarshaller = GetVaultNotificationsResponseUnmarshaller.Instance;

            return BeginInvoke<GetVaultNotificationsRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetVaultNotifications operation.
        /// <seealso cref="Amazon.Glacier.IAmazonGlacier.GetVaultNotifications"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the GetVaultNotifications 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<GetVaultNotificationsResponse> GetVaultNotificationsAsync(GetVaultNotificationsRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new GetVaultNotificationsRequestMarshaller();
            var unmarshaller = GetVaultNotificationsResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, GetVaultNotificationsRequest, GetVaultNotificationsResponse>(request, marshaller, unmarshaller, signer, cancellationToken);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// <para>This operation retrieves the <c>notification-configuration</c> subresource of the specified vault.</para> <para>For information about
        /// setting a notification configuration on a vault, see SetVaultNotifications. If a notification configuration for a vault is not set, the
        /// operation returns a <c>404 Not Found</c> error. For more information about vault notifications, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/configuring-notifications.html">Configuring Vault Notifications in Amazon
        /// Glacier</a> . </para> <para>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access
        /// Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more
        /// information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS
        /// Identity and Access Management (IAM)</a> .</para> <para>For conceptual information and underlying REST API, go to <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/configuring-notifications.html">Configuring Vault Notifications in Amazon
        /// Glacier</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-notifications-get.html">Get Vault Notification
        /// Configuration </a> in the <i>Amazon Glacier Developer Guide</i> .
        /// </para>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the GetVaultNotifications service method on
        /// AmazonGlacier.</param>
        /// 
        /// <returns>The response from the GetVaultNotifications service method, as returned by AmazonGlacier.</returns>
        /// 
        /// <exception cref="T:Amazon.Glacier.Model.ResourceNotFoundException" />
        /// <exception cref="T:Amazon.Glacier.Model.MissingParameterValueException" />
        /// <exception cref="T:Amazon.Glacier.Model.ServiceUnavailableException" />
        /// <exception cref="T:Amazon.Glacier.Model.InvalidParameterValueException" />
		public GetVaultNotificationsResponse GetVaultNotifications(GetVaultNotificationsRequest request)
        {
            var task = GetVaultNotificationsAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return null;
            }
        }
Ejemplo n.º 7
0
 /// <summary>
 /// Initiates the asynchronous execution of the GetVaultNotifications operation.
 /// <seealso cref="Amazon.Glacier.AmazonGlacier.GetVaultNotifications"/>
 /// </summary>
 /// 
 /// <param name="getVaultNotificationsRequest">Container for the necessary parameters to execute the GetVaultNotifications operation on
 ///          AmazonGlacier.</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
 ///         EndGetVaultNotifications operation.</returns>
 public IAsyncResult BeginGetVaultNotifications(GetVaultNotificationsRequest getVaultNotificationsRequest, AsyncCallback callback, object state)
 {
     return invokeGetVaultNotifications(getVaultNotificationsRequest, callback, state, false);
 }
Ejemplo n.º 8
0
 IAsyncResult invokeGetVaultNotifications(GetVaultNotificationsRequest getVaultNotificationsRequest, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new GetVaultNotificationsRequestMarshaller().Marshall(getVaultNotificationsRequest);
     var unmarshaller = GetVaultNotificationsResponseUnmarshaller.GetInstance();
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }
Ejemplo n.º 9
0
 /// <summary>
 /// <para>This operation retrieves the <c>notification-configuration</c> subresource of the specified vault.</para> <para>For information about
 /// setting a notification configuration on a vault, see SetVaultNotifications. If a notification configuration for a vault is not set, the
 /// operation returns a <c>404 Not Found</c> error. For more information about vault notifications, see Configuring Vault Notifications in
 /// Amazon Glacier. </para> <para>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access
 /// Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more
 /// information, see Access Control Using AWS Identity and Access Management (IAM).</para> <para>For conceptual information and underlying REST
 /// API, go to Configuring Vault Notifications in Amazon Glacier and Get Vault Notification Configuration in the <i>Amazon Glacier Developer
 /// Guide</i> .
 /// </para>
 /// </summary>
 /// 
 /// <param name="getVaultNotificationsRequest">Container for the necessary parameters to execute the GetVaultNotifications service method on
 ///          AmazonGlacier.</param>
 /// 
 /// <returns>The response from the GetVaultNotifications service method, as returned by AmazonGlacier.</returns>
 /// 
 /// <exception cref="ResourceNotFoundException"/>
 /// <exception cref="MissingParameterValueException"/>
 /// <exception cref="ServiceUnavailableException"/>
 /// <exception cref="InvalidParameterValueException"/>
 public GetVaultNotificationsResponse GetVaultNotifications(GetVaultNotificationsRequest getVaultNotificationsRequest)
 {
     IAsyncResult asyncResult = invokeGetVaultNotifications(getVaultNotificationsRequest, null, null, true);
     return EndGetVaultNotifications(asyncResult);
 }
Ejemplo n.º 10
0
        /// <summary>
        /// <para>This operation retrieves the <c>notification-configuration</c> subresource of the specified vault.</para> <para>For information about
        /// setting a notification configuration on a vault, see SetVaultNotifications. If a notification configuration for a vault is not set, the
        /// operation returns a <c>404 Not Found</c> error. For more information about vault notifications, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/configuring-notifications.html">Configuring Vault Notifications in Amazon
        /// Glacier</a> . </para> <para>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access
        /// Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more
        /// information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS
        /// Identity and Access Management (IAM)</a> .</para> <para>For conceptual information and underlying REST API, go to <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/configuring-notifications.html">Configuring Vault Notifications in Amazon
        /// Glacier</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-notifications-get.html">Get Vault Notification
        /// Configuration </a> in the <i>Amazon Glacier Developer Guide</i> .
        /// </para>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the GetVaultNotifications service method on
        /// AmazonGlacier.</param>
        /// 
        /// <returns>The response from the GetVaultNotifications service method, as returned by AmazonGlacier.</returns>
        /// 
        /// <exception cref="T:Amazon.Glacier.Model.ResourceNotFoundException" />
        /// <exception cref="T:Amazon.Glacier.Model.MissingParameterValueException" />
        /// <exception cref="T:Amazon.Glacier.Model.ServiceUnavailableException" />
        /// <exception cref="T:Amazon.Glacier.Model.InvalidParameterValueException" />
		public GetVaultNotificationsResponse GetVaultNotifications(GetVaultNotificationsRequest request)
        {
            var task = GetVaultNotificationsAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                throw e.InnerException;
            }
        }
Ejemplo n.º 11
0
 private Amazon.Glacier.Model.GetVaultNotificationsResponse CallAWSServiceOperation(IAmazonGlacier client, Amazon.Glacier.Model.GetVaultNotificationsRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Glacier", "GetVaultNotifications");
     try
     {
         #if DESKTOP
         return(client.GetVaultNotifications(request));
         #elif CORECLR
         return(client.GetVaultNotificationsAsync(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;
     }
 }
Ejemplo n.º 12
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetVaultNotifications operation.
        /// <seealso cref="Amazon.Glacier.IAmazonGlacier.GetVaultNotifications"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the GetVaultNotifications 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 async Task<GetVaultNotificationsResponse> GetVaultNotificationsAsync(GetVaultNotificationsRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new GetVaultNotificationsRequestMarshaller();
            var unmarshaller = GetVaultNotificationsResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, GetVaultNotificationsRequest, GetVaultNotificationsResponse>(request, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }