Skip to content
v2.273.0

ApiKeyGrants Facade ​

Collection of grant methods for a IApiKeyRef.

Example ​

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

declare const apiKeyRef: interfaces_apigateway.IApiKeyRef;
const apiKeyGrants = apigateway.ApiKeyGrants.fromApiKey(apiKeyRef);

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.
fromApiKey(resource: IApiKeyRef): ApiKeyGrants // chainable@staticmethod def from_api_key(resource: IApiKeyRef) -> ApiKeyGrantspublic static ApiKeyGrants fromApiKey(IApiKeyRef resource)public static ApiKeyGrants FromApiKey(IApiKeyRef resource)func FromApiKey(Resource IApiKeyRef) ApiKeyGrantsstatic#
Creates grants for ApiKeyGrants.
read(grantee: IGrantable): Grantdef read(self, grantee: IGrantable) -> Grantpublic Grant read(IGrantable grantee)public Grant Read(IGrantable grantee)func Read(Grantee IGrantable) Grant#
Permits the IAM principal all read operations through this key.
readWrite(grantee: IGrantable): Grantdef read_write(self, grantee: IGrantable) -> Grantpublic Grant readWrite(IGrantable grantee)public Grant ReadWrite(IGrantable grantee)func ReadWrite(Grantee IGrantable) Grant#
Permits the IAM principal all read and write operations through this key.
write(grantee: IGrantable): Grantdef write(self, grantee: IGrantable) -> Grantpublic Grant write(IGrantable grantee)public Grant Write(IGrantable grantee)func Write(Grantee IGrantable) Grant#
Permits the IAM principal all write operations through this key.