Skip to content
v2.278.0

LogGroupGrants ​

Facade Stable

Collection of grant methods for a ILogGroupRef.

Example ​

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

declare const logGroupRef: interfaces_logs.ILogGroupRef;
const logGroupGrants = logs.LogGroupGrants.fromLogGroup(logGroupRef);
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_logs as logs
from aws_cdk.interfaces import aws_logs as interfaces_logs

# log_group_ref: interfaces_logs.ILogGroupRef

log_group_grants = logs.LogGroupGrants.from_log_group(log_group_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.logs.*;
import software.amazon.awscdk.interfaces.logs.*;

ILogGroupRef logGroupRef;

LogGroupGrants logGroupGrants = LogGroupGrants.fromLogGroup(logGroupRef);
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.Logs;
using Amazon.CDK.Interfaces.Logs;

ILogGroupRef logGroupRef;

var logGroupGrants = LogGroupGrants.FromLogGroup(logGroupRef);
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 logGroupRef ILogGroupRef

logGroupGrants := awscdk.Aws_logs.LogGroupGrants_FromLogGroup(logGroupRef)

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.
fromLogGroup(resource: ILogGroupRef): LogGroupGrants // chainable@staticmethod def from_log_group(resource: ILogGroupRef) -> LogGroupGrantspublic static LogGroupGrants fromLogGroup(ILogGroupRef resource)public static LogGroupGrants FromLogGroup(ILogGroupRef resource)func FromLogGroup(Resource ILogGroupRef) LogGroupGrants static #
Creates grants for LogGroupGrants.
read(grantee: IGrantable): Grantdef read(self, grantee: IGrantable) -> Grantpublic Grant read(IGrantable grantee)public Grant Read(IGrantable grantee)func Read(Grantee IGrantable) Grant #
Give permissions to read and filter events from this log group.
write(grantee: IGrantable): Grantdef write(self, grantee: IGrantable) -> Grantpublic Grant write(IGrantable grantee)public Grant Write(IGrantable grantee)func Write(Grantee IGrantable) Grant #
Give permissions to create and write to streams in this log group.