• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# AmazonServiceCallback类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中AmazonServiceCallback的典型用法代码示例。如果您正苦于以下问题:C# AmazonServiceCallback类的具体用法?C# AmazonServiceCallback怎么用?C# AmazonServiceCallback使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AmazonServiceCallback类属于命名空间,在下文中一共展示了AmazonServiceCallback类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: PostObjectAsync

        /// <summary>
        /// Upload data to Amazon S3 using HTTP POST.
        /// </summary>
        /// <remarks>
        /// For more information, <see href="http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingHTTPPOST.html"/>
        /// </remarks>
        /// <param name="request">Request object which describes the data to POST</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 PostObjectAsync(PostObjectRequest request, AmazonServiceCallback<PostObjectRequest, PostObjectResponse> callback, AsyncOptions options = null)
        {
            options = options == null ? new AsyncOptions() : options;

            Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper
                = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) =>
                {
                    AmazonServiceResult<PostObjectRequest, PostObjectResponse> responseObject
                        = new AmazonServiceResult<PostObjectRequest, PostObjectResponse>((PostObjectRequest)req, (PostObjectResponse)res, ex, ao.State);
                    if (callback != null)
                        callback(responseObject);
                };

            ThreadPool.QueueUserWorkItem(new WaitCallback(delegate
            {
                // Provide a default policy if user doesn't set it.
                try
                {
                    InferContentType(request);
                    if (request.SignedPolicy == null)
                    {
                        CreateSignedPolicy(request);
                    }
                    PostObject(request, options, callbackHelper);
                }
                catch (Exception e)
                {
                    callback(new AmazonServiceResult<PostObjectRequest, PostObjectResponse>(request, null, e, options.State));
                }
            }));

        }
开发者ID:aws,项目名称:aws-sdk-net,代码行数:42,代码来源:AmazonS3Client.unity.cs


示例2: AbortMultipartUploadAsync

 /// <summary>
 /// Aborts a multipart upload.
 /// 
 /// 
 /// <para>
 /// To verify that all parts have been removed, so you don't get charged for the part
 /// storage, you should call the List Parts operation and ensure the parts list is empty.
 /// </para>
 /// This API is supported only when AWSConfigs.HttpClient is set to AWSConfigs.HttpClientOption.UnityWebRequest, the default value of this configuration option is AWSConfigs.HttpClientOption.UnityWWW
 /// </summary>
 /// <param name="bucketName">A property of AbortMultipartUploadRequest used to execute the AbortMultipartUpload service method.</param>
 /// <param name="key">A property of AbortMultipartUploadRequest used to execute the AbortMultipartUpload service method.</param>
 /// <param name="uploadId">A property of AbortMultipartUploadRequest used to execute the AbortMultipartUpload service method.</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>
 /// 
 /// <returns>The response from the AbortMultipartUpload service method, as returned by S3.</returns>
 public void AbortMultipartUploadAsync(string bucketName, string key, string uploadId,  AmazonServiceCallback<AbortMultipartUploadRequest, AbortMultipartUploadResponse> callback, AsyncOptions options = null)
 {
     var request = new AbortMultipartUploadRequest();
     request.BucketName = bucketName;
     request.Key = key;
     request.UploadId = uploadId;
     AbortMultipartUploadAsync(request, callback, options);
 }
开发者ID:aws,项目名称:aws-sdk-net,代码行数:28,代码来源:AmazonS3Client.cs


示例3: SetIdentityPoolConfigurationAsync

 /// <summary>
 /// Initiates the asynchronous execution of the SetIdentityPoolConfiguration operation.
 /// </summary>
 /// 
 /// <param name="request">Container for the necessary parameters to execute the SetIdentityPoolConfiguration operation on AmazonCognitoSyncClient.</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 SetIdentityPoolConfigurationAsync(SetIdentityPoolConfigurationRequest request, AmazonServiceCallback<SetIdentityPoolConfigurationRequest, SetIdentityPoolConfigurationResponse> callback, AsyncOptions options = null)
 {
     options = options == null?new AsyncOptions():options;
     var marshaller = new SetIdentityPoolConfigurationRequestMarshaller();
     var unmarshaller = SetIdentityPoolConfigurationResponseUnmarshaller.Instance;
     Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
     if(callback !=null )
         callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { 
             AmazonServiceResult<SetIdentityPoolConfigurationRequest,SetIdentityPoolConfigurationResponse> responseObject 
                     = new AmazonServiceResult<SetIdentityPoolConfigurationRequest,SetIdentityPoolConfigurationResponse>((SetIdentityPoolConfigurationRequest)req, (SetIdentityPoolConfigurationResponse)res, ex , ao.State);    
                 callback(responseObject); 
         };
     BeginInvoke<SetIdentityPoolConfigurationRequest>(request, marshaller, unmarshaller, options, callbackHelper);
 }
开发者ID:NathanSDunn,项目名称:aws-sdk-unity-samples,代码行数:22,代码来源:AmazonCognitoSyncClient.cs


示例4: DescribeIdentityUsageAsync

 /// <summary>
 /// Initiates the asynchronous execution of the DescribeIdentityUsage operation.
 /// </summary>
 /// 
 /// <param name="request">Container for the necessary parameters to execute the DescribeIdentityUsage operation on AmazonCognitoSyncClient.</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 DescribeIdentityUsageAsync(DescribeIdentityUsageRequest request, AmazonServiceCallback<DescribeIdentityUsageRequest, DescribeIdentityUsageResponse> callback, AsyncOptions options = null)
 {
     options = options == null?new AsyncOptions():options;
     var marshaller = new DescribeIdentityUsageRequestMarshaller();
     var unmarshaller = DescribeIdentityUsageResponseUnmarshaller.Instance;
     Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
     if(callback !=null )
         callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { 
             AmazonServiceResult<DescribeIdentityUsageRequest,DescribeIdentityUsageResponse> responseObject 
                     = new AmazonServiceResult<DescribeIdentityUsageRequest,DescribeIdentityUsageResponse>((DescribeIdentityUsageRequest)req, (DescribeIdentityUsageResponse)res, ex , ao.State);    
                 callback(responseObject); 
         };
     BeginInvoke<DescribeIdentityUsageRequest>(request, marshaller, unmarshaller, options, callbackHelper);
 }
开发者ID:NathanSDunn,项目名称:aws-sdk-unity-samples,代码行数:22,代码来源:AmazonCognitoSyncClient.cs


示例5: GetOpenIdTokenForDeveloperIdentityAsync

 /// <summary>
 /// Initiates the asynchronous execution of the GetOpenIdTokenForDeveloperIdentity operation.
 /// </summary>
 /// 
 /// <param name="request">Container for the necessary parameters to execute the GetOpenIdTokenForDeveloperIdentity operation on AmazonCognitoIdentityClient.</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 GetOpenIdTokenForDeveloperIdentityAsync(GetOpenIdTokenForDeveloperIdentityRequest request, AmazonServiceCallback<GetOpenIdTokenForDeveloperIdentityRequest, GetOpenIdTokenForDeveloperIdentityResponse> callback, AsyncOptions options = null)
 {
     options = options == null?new AsyncOptions():options;
     var marshaller = new GetOpenIdTokenForDeveloperIdentityRequestMarshaller();
     var unmarshaller = GetOpenIdTokenForDeveloperIdentityResponseUnmarshaller.Instance;
     Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
     if(callback !=null )
         callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { 
             AmazonServiceResult<GetOpenIdTokenForDeveloperIdentityRequest,GetOpenIdTokenForDeveloperIdentityResponse> responseObject 
                     = new AmazonServiceResult<GetOpenIdTokenForDeveloperIdentityRequest,GetOpenIdTokenForDeveloperIdentityResponse>((GetOpenIdTokenForDeveloperIdentityRequest)req, (GetOpenIdTokenForDeveloperIdentityResponse)res, ex , ao.State);    
                 callback(responseObject); 
         };
     BeginInvoke<GetOpenIdTokenForDeveloperIdentityRequest>(request, marshaller, unmarshaller, options, callbackHelper);
 }
开发者ID:NathanSDunn,项目名称:aws-sdk-unity-samples,代码行数:22,代码来源:AmazonCognitoIdentityClient.cs


示例6: GetCredentialsForIdentityAsync

 /// <summary>
 /// Returns credentials for the the provided identity ID. Any provided logins will be
 /// validated against supported login providers. If the token is for cognito-identity.amazonaws.com,
 /// it will be passed through to AWS Security Token Service with the appropriate role
 /// for the token.
 /// </summary>
 /// <param name="identityId">A unique identifier in the format REGION:GUID.</param>
 /// <param name="logins">A set of optional name-value pairs that map provider names to provider tokens.</param>
 /// 
 /// <returns>The response from the GetCredentialsForIdentity service method, as returned by CognitoIdentity.</returns>
 /// <exception cref="Amazon.CognitoIdentity.Model.InternalErrorException">
 /// Thrown when the service encounters an error during processing the request.
 /// </exception>
 /// <exception cref="Amazon.CognitoIdentity.Model.InvalidIdentityPoolConfigurationException">
 /// Thrown if the identity pool has no role associated for the given auth type (auth/unauth)
 /// or if the AssumeRole fails.
 /// </exception>
 /// <exception cref="Amazon.CognitoIdentity.Model.InvalidParameterException">
 /// Thrown for missing or bad input parameter(s).
 /// </exception>
 /// <exception cref="Amazon.CognitoIdentity.Model.NotAuthorizedException">
 /// Thrown when a user is not authorized to access the requested resource.
 /// </exception>
 /// <exception cref="Amazon.CognitoIdentity.Model.ResourceConflictException">
 /// Thrown when a user tries to use a login which is already linked to another account.
 /// </exception>
 /// <exception cref="Amazon.CognitoIdentity.Model.ResourceNotFoundException">
 /// Thrown when the requested resource (for example, a dataset or record) does not exist.
 /// </exception>
 /// <exception cref="Amazon.CognitoIdentity.Model.TooManyRequestsException">
 /// Thrown when a request is throttled.
 /// </exception>
 public void GetCredentialsForIdentityAsync(string identityId, Dictionary<string, string> logins, AmazonServiceCallback<GetCredentialsForIdentityRequest, GetCredentialsForIdentityResponse> callback, AsyncOptions options = null)
 {
     var request = new GetCredentialsForIdentityRequest();
     request.IdentityId = identityId;
     request.Logins = logins;
     GetCredentialsForIdentityAsync(request, callback, options);
 }
开发者ID:NathanSDunn,项目名称:aws-sdk-unity-samples,代码行数:39,代码来源:AmazonCognitoIdentityClient.cs


示例7: GetSessionTokenAsync

 /// <summary>
 /// Returns a set of temporary credentials for an AWS account or IAM user. The credentials
 /// consist of an access key ID, a secret access key, and a security token. Typically,
 /// you use <code>GetSessionToken</code> if you want to use MFA to protect programmatic
 /// calls to specific AWS APIs like Amazon EC2 <code>StopInstances</code>. MFA-enabled
 /// IAM users would need to call <code>GetSessionToken</code> and submit an MFA code that
 /// is associated with their MFA device. Using the temporary security credentials that
 /// are returned from the call, IAM users can then make programmatic calls to APIs that
 /// require MFA authentication. 
 /// 
 ///  
 /// <para>
 /// The <code>GetSessionToken</code> action must be called by using the long-term AWS
 /// security credentials of the AWS account or an IAM user. Credentials that are created
 /// by IAM users are valid for the duration that you specify, between 900 seconds (15
 /// minutes) and 129600 seconds (36 hours); credentials that are created by using account
 /// credentials have a maximum duration of 3600 seconds (1 hour). 
 /// </para>
 ///  <note> 
 /// <para>
 /// We recommend that you do not call <code>GetSessionToken</code> with root account credentials.
 /// Instead, follow our <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/IAMBestPractices.html#create-iam-users">best
 /// practices</a> by creating one or more IAM users, giving them the necessary permissions,
 /// and using IAM users for everyday interaction with AWS. 
 /// </para>
 ///  </note> 
 /// <para>
 /// The permissions associated with the temporary security credentials returned by <code>GetSessionToken</code>
 /// are based on the permissions associated with account or IAM user whose credentials
 /// are used to call the action. If <code>GetSessionToken</code> is called using root
 /// account credentials, the temporary credentials have root account permissions. Similarly,
 /// if <code>GetSessionToken</code> is called using the credentials of an IAM user, the
 /// temporary credentials have the same permissions as the IAM user. 
 /// </para>
 ///  
 /// <para>
 /// For more information about using <code>GetSessionToken</code> to create temporary
 /// credentials, go to <a href="http://docs.aws.amazon.com/STS/latest/UsingSTS/CreatingSessionTokens.html"
 /// target="_blank">Creating Temporary Credentials to Enable Access for IAM Users</a>.
 /// 
 /// </para>
 /// </summary>
  /// <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>
 /// 
 /// <returns>The response from the GetSessionToken service method, as returned by SecurityTokenService.</returns>
 public void GetSessionTokenAsync(AmazonServiceCallback<GetSessionTokenRequest, GetSessionTokenResponse> callback, AsyncOptions options = null)
 {
     GetSessionTokenAsync(new GetSessionTokenRequest(), callback, options);
 }
开发者ID:NathanSDunn,项目名称:aws-sdk-unity-samples,代码行数:52,代码来源:AmazonSecurityTokenServiceClient.cs


示例8: DeleteObjectAsync

 /// <summary>
 /// Removes the null version (if there is one) of an object and inserts a delete marker,
 /// which becomes the latest version of the object. If there isn't a null version, Amazon
 /// S3 does not remove any objects.
 /// This API is supported only when AWSConfigs.HttpClient is set to AWSConfigs.HttpClientOption.UnityWebRequest, the default value of this configuration option is AWSConfigs.HttpClientOption.UnityWWW
 /// </summary>
 /// <param name="bucketName">A property of DeleteObjectRequest used to execute the DeleteObject service method.</param>
 /// <param name="key">A property of DeleteObjectRequest used to execute the DeleteObject service method.</param>
 /// <param name="versionId">VersionId used to reference a specific version of the object.</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>
 /// 
 /// <returns>The response from the DeleteObject service method, as returned by S3.</returns>
 public void DeleteObjectAsync(string bucketName, string key, string versionId,  AmazonServiceCallback<DeleteObjectRequest, DeleteObjectResponse> callback, AsyncOptions options = null)
 {
     var request = new DeleteObjectRequest();
     request.BucketName = bucketName;
     request.Key = key;
     request.VersionId = versionId;
     DeleteObjectAsync(request, callback, options);
 }
开发者ID:aws,项目名称:aws-sdk-net,代码行数:24,代码来源:AmazonS3Client.cs


示例9: PutBucketPolicyAsync

 /// <summary>
 /// Replaces a policy on a bucket. If the bucket already has a policy, the one in this
 /// request completely replaces it.
 /// This API is supported only when AWSConfigs.HttpClient is set to AWSConfigs.HttpClientOption.UnityWebRequest, the default value of this configuration option is AWSConfigs.HttpClientOption.UnityWWW
 /// </summary>
 /// <param name="bucketName">A property of PutBucketPolicyRequest used to execute the PutBucketPolicy service method.</param>
 /// <param name="policy">The bucket policy as a JSON document.</param>
 /// <param name="contentMD5">A property of PutBucketPolicyRequest used to execute the PutBucketPolicy service method.</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>
 /// 
 /// <returns>The response from the PutBucketPolicy service method, as returned by S3.</returns>
 public void PutBucketPolicyAsync(string bucketName, string policy, string contentMD5,  AmazonServiceCallback<PutBucketPolicyRequest, PutBucketPolicyResponse> callback, AsyncOptions options = null)
 {
     var request = new PutBucketPolicyRequest();
     request.BucketName = bucketName;
     request.Policy = policy;
     request.ContentMD5 = contentMD5;
     PutBucketPolicyAsync(request, callback, options);
 }
开发者ID:aws,项目名称:aws-sdk-net,代码行数:23,代码来源:AmazonS3Client.cs


示例10: PutBucketAsync

 /// <summary>
 /// Creates a new bucket.
 /// This API is supported only when AWSConfigs.HttpClient is set to AWSConfigs.HttpClientOption.UnityWebRequest, the default value of this configuration option is AWSConfigs.HttpClientOption.UnityWWW
 /// </summary>
 /// <param name="bucketName">A property of PutBucketRequest used to execute the PutBucket service method.</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>
 /// 
 /// <returns>The response from the PutBucket service method, as returned by S3.</returns>
 public void PutBucketAsync(string bucketName,  AmazonServiceCallback<PutBucketRequest, PutBucketResponse> callback, AsyncOptions options = null)
 {
     var request = new PutBucketRequest();
     request.BucketName = bucketName;
     PutBucketAsync(request, callback, options);
 }
开发者ID:aws,项目名称:aws-sdk-net,代码行数:18,代码来源:AmazonS3Client.cs


示例11: ListVersionsAsync

 /// <summary>
 /// Returns metadata about all of the versions of objects in a bucket.
 /// </summary>
 /// <param name="bucketName">A property of ListVersionsRequest used to execute the ListVersions service method.</param>
 /// <param name="prefix">Limits the response to keys that begin with the specified prefix.</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>
 /// 
 /// <returns>The response from the ListVersions service method, as returned by S3.</returns>
 public void ListVersionsAsync(string bucketName, string prefix,  AmazonServiceCallback<ListVersionsRequest, ListVersionsResponse> callback, AsyncOptions options = null)
 {
     var request = new ListVersionsRequest();
     request.BucketName = bucketName;
     request.Prefix = prefix;
     ListVersionsAsync(request, callback, options);
 }
开发者ID:aws,项目名称:aws-sdk-net,代码行数:19,代码来源:AmazonS3Client.cs


示例12: ListPartsAsync

 /// <summary>
 /// Lists the parts that have been uploaded for a specific multipart upload.
 /// This API is supported only when AWSConfigs.HttpClient is set to AWSConfigs.HttpClientOption.UnityWebRequest, the default value of this configuration option is AWSConfigs.HttpClientOption.UnityWWW
 /// </summary>
 /// <param name="bucketName">A property of ListPartsRequest used to execute the ListParts service method.</param>
 /// <param name="key">A property of ListPartsRequest used to execute the ListParts service method.</param>
 /// <param name="uploadId">Upload ID identifying the multipart upload whose parts are being listed.</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>
 /// 
 /// <returns>The response from the ListParts service method, as returned by S3.</returns>
 public void ListPartsAsync(string bucketName, string key, string uploadId,  AmazonServiceCallback<ListPartsRequest, ListPartsResponse> callback, AsyncOptions options = null)
 {
     var request = new ListPartsRequest();
     request.BucketName = bucketName;
     request.Key = key;
     request.UploadId = uploadId;
     ListPartsAsync(request, callback, options);
 }
开发者ID:aws,项目名称:aws-sdk-net,代码行数:22,代码来源:AmazonS3Client.cs


示例13: ListObjectsAsync

 /// <summary>
 /// Returns some or all (up to 1000) of the objects in a bucket. You can use the request
 /// parameters as selection criteria to return a subset of the objects in a bucket.
 /// </summary>
 /// <param name="bucketName">A property of ListObjectsRequest used to execute the ListObjects service method.</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>
 /// 
 /// <returns>The response from the ListObjects service method, as returned by S3.</returns>
 public void ListObjectsAsync(string bucketName,  AmazonServiceCallback<ListObjectsRequest, ListObjectsResponse> callback, AsyncOptions options = null)
 {
     var request = new ListObjectsRequest();
     request.BucketName = bucketName;
     ListObjectsAsync(request, callback, options);
 }
开发者ID:aws,项目名称:aws-sdk-net,代码行数:18,代码来源:AmazonS3Client.cs


示例14: ListBucketsAsync

 /// <summary>
 /// Returns a list of all buckets owned by the authenticated sender of the request.
 /// </summary>
 /// <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>
 /// 
 /// <returns>The response from the ListBuckets service method, as returned by S3.</returns>
 public void ListBucketsAsync(AmazonServiceCallback<ListBucketsRequest, ListBucketsResponse> callback, AsyncOptions options = null)
 {
     ListBucketsAsync(new ListBucketsRequest(), callback, options);
 }
开发者ID:aws,项目名称:aws-sdk-net,代码行数:15,代码来源:AmazonS3Client.cs


示例15: ListBucketMetricsConfigurationsAsync

 /// <summary>
 /// Initiates the asynchronous execution of the ListBucketMetricsConfigurations operation.
 /// </summary>
 /// 
 /// <param name="request">Container for the necessary parameters to execute the ListBucketMetricsConfigurations operation on AmazonS3Client.</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 ListBucketMetricsConfigurationsAsync(ListBucketMetricsConfigurationsRequest request, AmazonServiceCallback<ListBucketMetricsConfigurationsRequest, ListBucketMetricsConfigurationsResponse> callback, AsyncOptions options = null)
 {
     options = options == null?new AsyncOptions():options;
     var marshaller = new ListBucketMetricsConfigurationsRequestMarshaller();
     var unmarshaller = ListBucketMetricsConfigurationsResponseUnmarshaller.Instance;
     Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
     if(callback !=null )
         callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { 
             AmazonServiceResult<ListBucketMetricsConfigurationsRequest,ListBucketMetricsConfigurationsResponse> responseObject 
                     = new AmazonServiceResult<ListBucketMetricsConfigurationsRequest,ListBucketMetricsConfigurationsResponse>((ListBucketMetricsConfigurationsRequest)req, (ListBucketMetricsConfigurationsResponse)res, ex , ao.State);    
                 callback(responseObject); 
         };
     BeginInvoke<ListBucketMetricsConfigurationsRequest>(request, marshaller, unmarshaller, options, callbackHelper);
 }
开发者ID:aws,项目名称:aws-sdk-net,代码行数:22,代码来源:AmazonS3Client.cs


示例16: DeleteBucketWebsiteAsync

 /// <summary>
 /// This operation removes the website configuration from the bucket.
 /// This API is supported only when AWSConfigs.HttpClient is set to AWSConfigs.HttpClientOption.UnityWebRequest, the default value of this configuration option is AWSConfigs.HttpClientOption.UnityWWW
 /// </summary>
 /// <param name="bucketName">A property of DeleteBucketWebsiteRequest used to execute the DeleteBucketWebsite service method.</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>
 /// 
 /// <returns>The response from the DeleteBucketWebsite service method, as returned by S3.</returns>
 public void DeleteBucketWebsiteAsync(string bucketName,  AmazonServiceCallback<DeleteBucketWebsiteRequest, DeleteBucketWebsiteResponse> callback, AsyncOptions options = null)
 {
     var request = new DeleteBucketWebsiteRequest();
     request.BucketName = bucketName;
     DeleteBucketWebsiteAsync(request, callback, options);
 }
开发者ID:aws,项目名称:aws-sdk-net,代码行数:18,代码来源:AmazonS3Client.cs


示例17: DeleteLifecycleConfigurationAsync

 /// <summary>
 /// Deletes the lifecycle configuration from the bucket.
 /// This API is supported only when AWSConfigs.HttpClient is set to AWSConfigs.HttpClientOption.UnityWebRequest, the default value of this configuration option is AWSConfigs.HttpClientOption.UnityWWW
 /// </summary>
 /// <param name="bucketName">A property of DeleteLifecycleConfigurationRequest used to execute the DeleteLifecycleConfiguration service method.</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>
 /// 
 /// <returns>The response from the DeleteLifecycleConfiguration service method, as returned by S3.</returns>
 public void DeleteLifecycleConfigurationAsync(string bucketName,  AmazonServiceCallback<DeleteLifecycleConfigurationRequest, DeleteLifecycleConfigurationResponse> callback, AsyncOptions options = null)
 {
     var request = new DeleteLifecycleConfigurationRequest();
     request.BucketName = bucketName;
     DeleteLifecycleConfigurationAsync(request, callback, options);
 }
开发者ID:aws,项目名称:aws-sdk-net,代码行数:18,代码来源:AmazonS3Client.cs


示例18: PutBucketRequestPaymentAsync

 /// <summary>
 /// Sets the request payment configuration for a bucket. By default, the bucket owner
 /// pays for downloads from the bucket. This configuration parameter enables the bucket
 /// owner (only) to specify that the person requesting the download will be charged for
 /// the download. Documentation on requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html
 /// This API is supported only when AWSConfigs.HttpClient is set to AWSConfigs.HttpClientOption.UnityWebRequest, the default value of this configuration option is AWSConfigs.HttpClientOption.UnityWWW
 /// </summary>
 /// <param name="bucketName">A property of PutBucketRequestPaymentRequest used to execute the PutBucketRequestPayment service method.</param>
 /// <param name="requestPaymentConfiguration">A property of PutBucketRequestPaymentRequest used to execute the PutBucketRequestPayment service method.</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>
 /// 
 /// <returns>The response from the PutBucketRequestPayment service method, as returned by S3.</returns>
 public void PutBucketRequestPaymentAsync(string bucketName, RequestPaymentConfiguration requestPaymentConfiguration,  AmazonServiceCallback<PutBucketRequestPaymentRequest, PutBucketRequestPaymentResponse> callback, AsyncOptions options = null)
 {
     var request = new PutBucketRequestPaymentRequest();
     request.BucketName = bucketName;
     request.RequestPaymentConfiguration = requestPaymentConfiguration;
     PutBucketRequestPaymentAsync(request, callback, options);
 }
开发者ID:aws,项目名称:aws-sdk-net,代码行数:23,代码来源:AmazonS3Client.cs


示例19: PutBucketTaggingAsync

 /// <summary>
 /// Sets the tags for a bucket.
 /// This API is supported only when AWSConfigs.HttpClient is set to AWSConfigs.HttpClientOption.UnityWebRequest, the default value of this configuration option is AWSConfigs.HttpClientOption.UnityWWW
 /// </summary>
 /// <param name="bucketName">A property of PutBucketTaggingRequest used to execute the PutBucketTagging service method.</param>
 /// <param name="tagSet">A property of PutBucketTaggingRequest used to execute the PutBucketTagging service method.</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>
 /// 
 /// <returns>The response from the PutBucketTagging service method, as returned by S3.</returns>
 public void PutBucketTaggingAsync(string bucketName, List<Tag> tagSet,  AmazonServiceCallback<PutBucketTaggingRequest, PutBucketTaggingResponse> callback, AsyncOptions options = null)
 {
     var request = new PutBucketTaggingRequest();
     request.BucketName = bucketName;
     request.TagSet = tagSet;
     PutBucketTaggingAsync(request, callback, options);
 }
开发者ID:aws,项目名称:aws-sdk-net,代码行数:20,代码来源:AmazonS3Client.cs


示例20: SetIdentityPoolRolesAsync

 /// <summary>
 /// Sets the roles for an identity pool. These roles are used when making calls to <code>GetCredentialsForIdentity</code>
 /// action.
 /// </summary>
 /// <param name="identityPoolId">An identity pool ID in the format REGION:GUID.</param>
 /// <param name="roles">The map of roles associated with this pool. Currently only authenticated and unauthenticated roles are supported.</param>
 /// 
 /// <returns>The response from the SetIdentityPoolRoles service method, as returned by CognitoIdentity.</returns>
 /// <exception cref="Amazon.CognitoIdentity.Model.InternalErrorException">
 /// Thrown when the service encounters an error during processing the request.
 /// </exception>
 /// <exception cref="Amazon.CognitoIdentity.Model.InvalidParameterException">
 /// Thrown for missing or bad input parameter(s).
 /// </exception>
 /// <exception cref="Amazon.CognitoIdentity.Model.NotAuthorizedException">
 /// Thrown when a user is not authorized to access the requested resource.
 /// </exception>
 /// <exception cref="Amazon.CognitoIdentity.Model.ResourceConflictException">
 /// Thrown when a user tries to use a login which is already linked to another account.
 /// </exception>
 /// <exception cref="Amazon.CognitoIdentity.Model.ResourceNotFoundException">
 /// Thrown when the requested resource (for example, a dataset or record) does not exist.
 /// </exception>
 /// <exception cref="Amazon.CognitoIdentity.Model.TooManyRequestsException">
 /// Thrown when a request is throttled.
 /// </exception>
 public void SetIdentityPoolRolesAsync(string identityPoolId, Dictionary<string, string> roles, AmazonServiceCallback<SetIdentityPoolRolesRequest, SetIdentityPoolRolesResponse> callback, AsyncOptions options = null)
 {
     var request = new SetIdentityPoolRolesRequest();
     request.IdentityPoolId = identityPoolId;
     request.Roles = roles;
     SetIdentityPoolRolesAsync(request, callback, options);
 }
开发者ID:NathanSDunn,项目名称:aws-sdk-unity-samples,代码行数:33,代码来源:AmazonCognitoIdentityClient.cs



注:本文中的AmazonServiceCallback类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# AmazonServiceResult类代码示例发布时间:2022-05-24
下一篇:
C# AmazonS3类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap