# ResourceAccessPolicyProperty

A list of the [resources](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinitionversion-resourceinstance.html) in the group that the function can access, with the corresponding read-only or read-write permissions. The maximum is 10 resources.

> This property applies only to Lambda functions that run in a Greengrass container.

In an CloudFormation template, `ResourceAccessPolicy` is a property of the [`Environment`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinitionversion-environment.html) property type.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_greengrass as greengrass } from 'aws-cdk-lib';
const resourceAccessPolicyProperty: greengrass.CfnFunctionDefinitionVersion.ResourceAccessPolicyProperty = {
  resourceId: 'resourceId',

  // the properties below are optional
  permission: 'permission',
};
```

Python:

```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_greengrass as greengrass

resource_access_policy_property = greengrass.CfnFunctionDefinitionVersion.ResourceAccessPolicyProperty(
    resource_id="resourceId",

    # the properties below are optional
    permission="permission"
)
```

Java:

```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.greengrass.*;

ResourceAccessPolicyProperty resourceAccessPolicyProperty = ResourceAccessPolicyProperty.builder()
        .resourceId("resourceId")

        // the properties below are optional
        .permission("permission")
        .build();
```

C# / .NET:

```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.Greengrass;

var resourceAccessPolicyProperty = new ResourceAccessPolicyProperty {
    ResourceId = "resourceId",

    // the properties below are optional
    Permission = "permission"
};
```

Golang:

```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"

resourceAccessPolicyProperty := &ResourceAccessPolicyProperty{
	ResourceId: jsii.String("resourceId"),

	// the properties below are optional
	Permission: jsii.String("permission"),
}
```

## Properties

- `permission`: string — The read-only or read-write access that the Lambda function has to the resource.

  Valid values are `ro` or `rw` .

- `resourceId`: string (required) — The ID of the resource.

  This ID is assigned to the resource when you create the resource definition.
