本文整理了Java中com.amazonaws.services.s3.model.Grant.<init>()
方法的一些代码示例,展示了Grant.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Grant.<init>()
方法的具体详情如下:
包路径:com.amazonaws.services.s3.model.Grant
类名称:Grant
方法名:<init>
[英]Constructs a new Grant object using the specified grantee and permission objects.
[中]使用指定的授权对象和权限对象构造新的授权对象。
代码示例来源:origin: aws/aws-sdk-java
/**
* Adds a grantee to the access control list (ACL) with the given permission.
* If this access control list already
* contains the grantee (i.e. the same grantee object) the permission for the
* grantee will be updated.
*
* @param grantee
* The grantee to whom the permission will apply.
* @param permission
* The permission to apply to the grantee.
*/
public void grantPermission(Grantee grantee, Permission permission) {
getGrantsAsList().add(new Grant(grantee, permission));
}
代码示例来源:origin: apache/incubator-druid
static AccessControlList grantFullControlToBucketOwner(ServerSideEncryptingAmazonS3 s3Client, String bucket)
{
final AccessControlList acl = s3Client.getBucketAcl(bucket);
acl.grantAllPermissions(new Grant(new CanonicalGrantee(acl.getOwner().getId()), Permission.FullControl));
return acl;
}
代码示例来源:origin: aws-amplify/aws-sdk-android
/**
* Adds a grantee to the access control list (ACL) with the given permission.
* If this access control list already
* contains the grantee (i.e. the same grantee object) the permission for the
* grantee will be updated.
*
* @param grantee The grantee to whom the permission will apply.
* @param permission The permission to apply to the grantee.
*/
public void grantPermission(Grantee grantee, Permission permission) {
getGrantsAsList().add(new Grant(grantee, permission));
}
代码示例来源:origin: com.amazonaws/aws-android-sdk-s3
/**
* Adds a grantee to the access control list (ACL) with the given permission.
* If this access control list already
* contains the grantee (i.e. the same grantee object) the permission for the
* grantee will be updated.
*
* @param grantee The grantee to whom the permission will apply.
* @param permission The permission to apply to the grantee.
*/
public void grantPermission(Grantee grantee, Permission permission) {
getGrantsAsList().add(new Grant(grantee, permission));
}
代码示例来源:origin: Nextdoor/bender
/**
* Adds a grantee to the access control list (ACL) with the given permission.
* If this access control list already
* contains the grantee (i.e. the same grantee object) the permission for the
* grantee will be updated.
*
* @param grantee
* The grantee to whom the permission will apply.
* @param permission
* The permission to apply to the grantee.
*/
public void grantPermission(Grantee grantee, Permission permission) {
getGrantsAsList().add(new Grant(grantee, permission));
}
代码示例来源:origin: org.apache.druid.extensions/druid-s3-extensions
static AccessControlList grantFullControlToBucketOwner(ServerSideEncryptingAmazonS3 s3Client, String bucket)
{
final AccessControlList acl = s3Client.getBucketAcl(bucket);
acl.grantAllPermissions(new Grant(new CanonicalGrantee(acl.getOwner().getId()), Permission.FullControl));
return acl;
}
内容来源于网络,如有侵权,请联系作者删除!