private GetIamPolicyRequest CreateGetBucketIamPolicyRequest(string bucket, GetBucketIamPolicyOptions options) { ValidateBucketName(bucket); var bucketEntity = new Bucket { Name = bucket }; var request = Service.Buckets.GetIamPolicy(bucket); options?.ModifyRequest(request); return(request); }
/// <inheritdoc /> public override Task <Policy> GetBucketIamPolicyAsync(string bucket, GetBucketIamPolicyOptions options = null, CancellationToken cancellationToken = default) => CreateGetBucketIamPolicyRequest(bucket, options).ExecuteAsync(cancellationToken);
/// <summary> /// Fetches the IAM policy information about a bucket asynchronously. /// </summary> /// <param name="bucket">The name of the bucket. Must not be null.</param> /// <param name="options">Additional options for the fetch operation. May be null, in which case appropriate /// defaults will be used.</param> /// <param name="cancellationToken">The token to monitor for cancellation requests.</param> /// <returns>A task representing the asynchronous operation, with a result returning the /// <see cref="Policy"/> representation of the storage bucket IAM policy.</returns> public virtual Task <Policy> GetBucketIamPolicyAsync(string bucket, GetBucketIamPolicyOptions options = null, CancellationToken cancellationToken = default(CancellationToken)) { throw new NotImplementedException(); }
/// <inheritdoc /> public override Policy GetBucketIamPolicy(string bucket, GetBucketIamPolicyOptions options = null) => CreateGetBucketIamPolicyRequest(bucket, options).Execute();
/// <summary> /// Fetches the IAM policy information about a bucket synchronously. /// </summary> /// <param name="bucket">The name of the bucket. Must not be null.</param> /// <param name="options">Additional options for the fetch operation. May be null, in which case appropriate /// defaults will be used.</param> /// <returns>The <see cref="Policy"/> representation of the storage bucket IAM policy.</returns> public virtual Policy GetBucketIamPolicy(string bucket, GetBucketIamPolicyOptions options = null) { throw new NotImplementedException(); }