Ejemplo n.º 1
0
        internal virtual GetCallerIdentityResponse GetCallerIdentity(GetCallerIdentityRequest request)
        {
            var marshaller   = new GetCallerIdentityRequestMarshaller();
            var unmarshaller = GetCallerIdentityResponseUnmarshaller.Instance;

            return(Invoke <GetCallerIdentityRequest, GetCallerIdentityResponse>(request, marshaller, unmarshaller));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetCallerIdentity operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetCallerIdentity 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>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentity">REST API Reference for GetCallerIdentity Operation</seealso>
        public Task <GetCallerIdentityResponse> GetCallerIdentityAsync(GetCallerIdentityRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new GetCallerIdentityRequestMarshaller();
            var unmarshaller = GetCallerIdentityResponseUnmarshaller.Instance;

            return(InvokeAsync <GetCallerIdentityRequest, GetCallerIdentityResponse>(request, marshaller,
                                                                                     unmarshaller, cancellationToken));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetCallerIdentity operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetCallerIdentity operation on AmazonSecurityTokenServiceClient.</param>
        /// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
        /// <param name="options">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>
        public void GetCallerIdentityAsync(GetCallerIdentityRequest request, AmazonServiceCallback <GetCallerIdentityRequest, GetCallerIdentityResponse> callback, AsyncOptions options = null)
        {
            options = options == null?new AsyncOptions():options;
            var marshaller   = new GetCallerIdentityRequestMarshaller();
            var unmarshaller = GetCallerIdentityResponseUnmarshaller.Instance;
            Action <AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;

            if (callback != null)
            {
                callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
                    AmazonServiceResult <GetCallerIdentityRequest, GetCallerIdentityResponse> responseObject
                        = new AmazonServiceResult <GetCallerIdentityRequest, GetCallerIdentityResponse>((GetCallerIdentityRequest)req, (GetCallerIdentityResponse)res, ex, ao.State);
                    callback(responseObject);
                }
            }
            ;
            BeginInvoke <GetCallerIdentityRequest>(request, marshaller, unmarshaller, options, callbackHelper);
        }
Ejemplo n.º 4
0
        public void GetCallerIdentityAsync(GetCallerIdentityRequest request, AmazonServiceCallback <GetCallerIdentityRequest, GetCallerIdentityResponse> callback, AsyncOptions options = null)
        {
            //IL_0013: Unknown result type (might be due to invalid IL or missing references)
            options = ((options == null) ? ((object)new AsyncOptions()) : ((object)options));
            GetCallerIdentityRequestMarshaller    getCallerIdentityRequestMarshaller = new GetCallerIdentityRequestMarshaller();
            GetCallerIdentityResponseUnmarshaller instance = GetCallerIdentityResponseUnmarshaller.Instance;
            Action <AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> action = null;

            if (callback != null)
            {
                action = delegate(AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao)
                {
                    AmazonServiceResult <GetCallerIdentityRequest, GetCallerIdentityResponse> val = new AmazonServiceResult <GetCallerIdentityRequest, GetCallerIdentityResponse>((GetCallerIdentityRequest)req, (GetCallerIdentityResponse)res, ex, ao.get_State());
                    callback.Invoke(val);
                };
            }
            this.BeginInvoke <GetCallerIdentityRequest>(request, getCallerIdentityRequestMarshaller, instance, options, action);
        }
        public void GetCallerIdentityMarshallTest()
        {
            var operation = service_model.FindOperation("GetCallerIdentity");

            var request         = InstantiateClassGenerator.Execute <GetCallerIdentityRequest>();
            var marshaller      = new GetCallerIdentityRequestMarshaller();
            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        = GetCallerIdentityResponseUnmarshaller.Instance.Unmarshall(context)
                                  as GetCallerIdentityResponse;

            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the GetCallerIdentity operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the GetCallerIdentity 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<GetCallerIdentityResponse> GetCallerIdentityAsync(GetCallerIdentityRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new GetCallerIdentityRequestMarshaller();
            var unmarshaller = GetCallerIdentityResponseUnmarshaller.Instance;

            return InvokeAsync<GetCallerIdentityRequest,GetCallerIdentityResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
        /// <summary>
        /// Returns details about the IAM identity whose credentials are used to call the API.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the GetCallerIdentity service method.</param>
        /// 
        /// <returns>The response from the GetCallerIdentity service method, as returned by SecurityTokenService.</returns>
        public GetCallerIdentityResponse GetCallerIdentity(GetCallerIdentityRequest request)
        {
            var marshaller = new GetCallerIdentityRequestMarshaller();
            var unmarshaller = GetCallerIdentityResponseUnmarshaller.Instance;

            return Invoke<GetCallerIdentityRequest,GetCallerIdentityResponse>(request, marshaller, unmarshaller);
        }
 /// <summary>
 /// Initiates the asynchronous execution of the GetCallerIdentity operation.
 /// </summary>
 /// 
 /// <param name="request">Container for the necessary parameters to execute the GetCallerIdentity operation on AmazonSecurityTokenServiceClient.</param>
 /// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
 /// <param name="options">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>
 public void GetCallerIdentityAsync(GetCallerIdentityRequest request, AmazonServiceCallback<GetCallerIdentityRequest, GetCallerIdentityResponse> callback, AsyncOptions options = null)
 {
     options = options == null?new AsyncOptions():options;
     var marshaller = new GetCallerIdentityRequestMarshaller();
     var unmarshaller = GetCallerIdentityResponseUnmarshaller.Instance;
     Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
     if(callback !=null )
         callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { 
             AmazonServiceResult<GetCallerIdentityRequest,GetCallerIdentityResponse> responseObject 
                     = new AmazonServiceResult<GetCallerIdentityRequest,GetCallerIdentityResponse>((GetCallerIdentityRequest)req, (GetCallerIdentityResponse)res, ex , ao.State);    
                 callback(responseObject); 
         };
     BeginInvoke<GetCallerIdentityRequest>(request, marshaller, unmarshaller, options, callbackHelper);
 }
        public void GetCallerIdentityMarshallTest()
        {
            var operation = service_model.FindOperation("GetCallerIdentity");

            var request = InstantiateClassGenerator.Execute<GetCallerIdentityRequest>();
            var marshaller = new GetCallerIdentityRequestMarshaller();
            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 = GetCallerIdentityResponseUnmarshaller.Instance.Unmarshall(context)
                as GetCallerIdentityResponse;   
            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);       
        }
        /// <summary>
        /// Initiates the asynchronous execution of the GetCallerIdentity operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the GetCallerIdentity operation on AmazonSecurityTokenServiceClient.</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 EndGetCallerIdentity
        ///         operation.</returns>
        public IAsyncResult BeginGetCallerIdentity(GetCallerIdentityRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new GetCallerIdentityRequestMarshaller();
            var unmarshaller = GetCallerIdentityResponseUnmarshaller.Instance;

            return BeginInvoke<GetCallerIdentityRequest>(request, marshaller, unmarshaller,
                callback, state);
        }