本文整理了Java中com.google.api.services.storage.model.Bucket.setVersioning()
方法的一些代码示例,展示了Bucket.setVersioning()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bucket.setVersioning()
方法的具体详情如下:
包路径:com.google.api.services.storage.model.Bucket
类名称:Bucket
方法名:setVersioning
暂无
代码示例来源:origin: googleapis/google-cloud-java
bucketPb.setVersioning(new Versioning().setEnabled(versioningEnabled));
代码示例来源:origin: spinnaker/kayenta
Bucket bucket = new Bucket().setName(bucketName).setVersioning(versioning);
代码示例来源:origin: spinnaker/halyard
private static Bucket createBucket(Storage storage, String projectId, String locationId, String bucketId) {
try {
Bucket bucket = new Bucket()
.setLocation(locationId)
.setName(bucketId)
.setVersioning(new Bucket.Versioning().setEnabled(true));
if (!StringUtils.isEmpty(locationId)) {
bucket.setLocation(locationId);
}
return storage.buckets().insert(projectId, bucket).execute();
} catch (IOException e) {
throw new RuntimeException("Unable to create bucket", e);
}
}
代码示例来源:origin: com.netflix.spinnaker.halyard/halyard-backup
private static Bucket createBucket(Storage storage, String projectId, String locationId, String bucketId) {
try {
Bucket bucket = new Bucket()
.setLocation(locationId)
.setName(bucketId)
.setVersioning(new Bucket.Versioning().setEnabled(true));
if (!StringUtils.isEmpty(locationId)) {
bucket.setLocation(locationId);
}
return storage.buckets().insert(projectId, bucket).execute();
} catch (IOException e) {
throw new RuntimeException("Unable to create bucket", e);
}
}
代码示例来源:origin: com.google.gcloud/gcloud-java-storage
bucketPb.setVersioning(new Versioning().setEnabled(versioningEnabled));
代码示例来源:origin: com.google.cloud/google-cloud-storage
bucketPb.setVersioning(new Versioning().setEnabled(versioningEnabled));
内容来源于网络,如有侵权,请联系作者删除!