public async Task CreateAsync_With_BucketId() { var namePrefix = "prefix"; var request = new CreateKeyRequest(Storage.AccountId, $"{_keyName}-with-bucket-id", Capabilities.BucketOnly()) { ValidDurationInSeconds = DateTime.Now.AddDays(5).Second, BucketId = BucketId, NamePrefix = namePrefix }; var results = await Storage.Keys.CreateAsync(request); results.EnsureSuccessStatusCode(); _keyId[1] = results.Response.ApplicationKeyId; Assert.Equal(typeof(CreateKeyResponse), results.Response.GetType()); Assert.Equal(Capabilities.BucketOnly(), results.Response.Capabilities); Assert.Equal(namePrefix, results.Response.NamePrefix); }