Amazon.S3.AmazonS3Client.ListBucketsAsync C# (CSharp) Метод

ListBucketsAsync() публичный Метод

Returns a list of all buckets owned by the authenticated sender of the request.
public ListBucketsAsync ( System cancellationToken = default(CancellationToken) ) : Task
cancellationToken System /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task
        public Task<ListBucketsResponse> ListBucketsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            return ListBucketsAsync(new ListBucketsRequest(), cancellationToken);
        }

Same methods

AmazonS3Client::ListBucketsAsync ( ListBucketsRequest request, System cancellationToken = default(CancellationToken) ) : Task
AmazonS3Client::ListBucketsAsync ( ListBucketsResponse>.AmazonServiceCallback callback, AsyncOptions options = null ) : void
AmazonS3Client::ListBucketsAsync ( ListBucketsRequest request, ListBucketsResponse>.AmazonServiceCallback callback, AsyncOptions options = null ) : void

Usage Example

Пример #1
0
    // Use this for initialization
    void Start () {
        // ResultText is a label used for displaying status information
        Debug.Log("hallo1");

        


    Debug.Log("hallo2");
        S3Client = new AmazonS3Client(Credentials);
        Debug.Log("hallo3");
        ResultText.text = "Fetching all the Buckets";
        S3Client.ListBucketsAsync(new ListBucketsRequest(), (responseObject) =>
        {
            ResultText.text += "\n";
            if (responseObject.Exception == null)
            {
                ResultText.text += "Got Response \nPrinting now \n";
                responseObject.Response.Buckets.ForEach((s3b) =>
                {
                    ResultText.text += string.Format("bucket = {0}, created date = {1} \n",
                    s3b.BucketName, s3b.CreationDate);
                });
            }
            else
            {
                ResultText.text += "Got Exception \n";
            }
        });
    }
All Usage Examples Of Amazon.S3.AmazonS3Client::ListBucketsAsync
AmazonS3Client