class ApiKeyGrants
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.APIGateway.ApiKeyGrants |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsapigateway#ApiKeyGrants |
Java | software.amazon.awscdk.services.apigateway.ApiKeyGrants |
Python | aws_cdk.aws_apigateway.ApiKeyGrants |
TypeScript | aws-cdk-lib » aws_apigateway » ApiKeyGrants |
Collection of grant methods for a IApiKeyRef.
Example
// 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_aws_apigateway } from 'aws-cdk-lib/interfaces';
declare const apiKeyRef: interfaces_aws_apigateway.IApiKeyRef;
const apiKeyGrants = apigateway.ApiKeyGrants.fromApiKey(apiKeyRef);
Properties
| Name | Type | Description |
|---|---|---|
| resource | IApi |
resource
Type:
IApi
Methods
| Name | Description |
|---|---|
| read(grantee) | Permits the IAM principal all read operations through this key. |
| read | Permits the IAM principal all read and write operations through this key. |
| write(grantee) | Permits the IAM principal all write operations through this key. |
| static from | Creates grants for ApiKeyGrants. |
read(grantee)
public read(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Permits the IAM principal all read operations through this key.
readWrite(grantee)
public readWrite(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Permits the IAM principal all read and write operations through this key.
write(grantee)
public write(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Permits the IAM principal all write operations through this key.
static fromApiKey(resource)
public static fromApiKey(resource: IApiKeyRef): ApiKeyGrants
Parameters
- resource
IApiKey Ref
Returns
Creates grants for ApiKeyGrants.

.NET
Go
Java
Python
TypeScript