# ResourceAttributes

Attributes that can be specified when importing a Resource.

Used as argument in: [Resource.fromResourceAttributes](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.Resource.html#fromresourceattributes)

- Source: [`aws-apigateway/lib/resource.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-apigateway/lib/resource.ts#L404)

## Example

TypeScript:

```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';

declare const restApi: apigateway.RestApi;
const resourceAttributes: apigateway.ResourceAttributes = {
  path: 'path',
  resourceId: 'resourceId',
  restApi: restApi,
};
```

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_apigateway as apigateway

# rest_api: apigateway.RestApi

resource_attributes = apigateway.ResourceAttributes(
    path="path",
    resource_id="resourceId",
    rest_api=rest_api
)
```

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.apigateway.*;

RestApi restApi;

ResourceAttributes resourceAttributes = ResourceAttributes.builder()
        .path("path")
        .resourceId("resourceId")
        .restApi(restApi)
        .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.APIGateway;

RestApi restApi;

var resourceAttributes = new ResourceAttributes {
    Path = "path",
    ResourceId = "resourceId",
    RestApi = restApi
};
```

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"

var restApi RestApi

resourceAttributes := &ResourceAttributes{
	Path: jsii.String("path"),
	ResourceId: jsii.String("resourceId"),
	RestApi: restApi,
}
```

## Properties

- `path`: string (required) — The full path of this resource.

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

- `restApi`: [IRestApi](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.IRestApi.html) (required) — The rest API that this resource is part of.
