Skip to content
v2.277.0

RepositoryGrants Facade ​

Collection of grant methods for a IRepositoryRef.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_codecommit as codecommit } from 'aws-cdk-lib';
import { aws_codecommit as interfaces_codecommit } from 'aws-cdk-lib/interfaces';

declare const repositoryRef: interfaces_codecommit.IRepositoryRef;
const repositoryGrants = codecommit.RepositoryGrants.fromRepository(repositoryRef);
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_codecommit as codecommit
from aws_cdk.interfaces import aws_codecommit as interfaces_codecommit

# repository_ref: interfaces_codecommit.IRepositoryRef

repository_grants = codecommit.RepositoryGrants.from_repository(repository_ref)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.codecommit.*;
import software.amazon.awscdk.interfaces.codecommit.*;

IRepositoryRef repositoryRef;

RepositoryGrants repositoryGrants = RepositoryGrants.fromRepository(repositoryRef);
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CodeCommit;
using Amazon.CDK.Interfaces.CodeCommit;

IRepositoryRef repositoryRef;

var repositoryGrants = RepositoryGrants.FromRepository(repositoryRef);
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var repositoryRef IRepositoryRef

repositoryGrants := awscdk.Aws_codecommit.RepositoryGrants_FromRepository(repositoryRef)

Methods ​

actions(grantee: IGrantable, actions: string[], options?: PermissionsOptions): Grantdef actions(self, grantee: IGrantable, actions: typing.List[str], options: typing.Optional[PermissionsOptions] = None) -> Grantpublic Grant actions(IGrantable grantee, List<String> actions, PermissionsOptions options)public Grant Actions(IGrantable grantee, string[] actions, PermissionsOptions? options = null)func Actions(Grantee IGrantable, Actions *[]*string, Options PermissionsOptions) Grant #
Grant the given identity custom permissions.
fromRepository(resource: IRepositoryRef): RepositoryGrants // chainable@staticmethod def from_repository(resource: IRepositoryRef) -> RepositoryGrantspublic static RepositoryGrants fromRepository(IRepositoryRef resource)public static RepositoryGrants FromRepository(IRepositoryRef resource)func FromRepository(Resource IRepositoryRef) RepositoryGrants static #
Creates grants for RepositoryGrants.
pull(grantee: IGrantable): Grantdef pull(self, grantee: IGrantable) -> Grantpublic Grant pull(IGrantable grantee)public Grant Pull(IGrantable grantee)func Pull(Grantee IGrantable) Grant #
Grants pull permissions.
pullPush(grantee: IGrantable): Grantdef pull_push(self, grantee: IGrantable) -> Grantpublic Grant pullPush(IGrantable grantee)public Grant PullPush(IGrantable grantee)func PullPush(Grantee IGrantable) Grant #
Grants pullPush permissions.
read(grantee: IGrantable): Grantdef read(self, grantee: IGrantable) -> Grantpublic Grant read(IGrantable grantee)public Grant Read(IGrantable grantee)func Read(Grantee IGrantable) Grant #
Grants read permissions.