# IndexActionResourceType

The resource type to index.

This is implemented as an enum-like class so that resource types the AWS Backup
service adds in the future can be used before they are added to the CDK, e.g.
`new IndexActionResourceType('EFS')`.

Obtainable from: IndexActionResourceType.EBS, IndexActionResourceType.S3

- Source: [`aws-backup/lib/rule.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-backup/lib/rule.ts#L153)
- Type last changed: v2.267.0 · 27 Aug 2026

## Example

TypeScript:

```ts
declare const plan: backup.BackupPlan;
plan.addRule(new backup.BackupPlanRule({
  indexActions: [{
      resourceTypes: [backup.IndexActionResourceType.S3],
  }],
}));
```

Python:

```python
# plan: backup.BackupPlan

plan.add_rule(backup.BackupPlanRule(
    index_actions=[backup.BackupPlanIndexActionProps(
        resource_types=[backup.IndexActionResourceType.S3]
    )]
))
```

Java:

```java
BackupPlan plan;

plan.addRule(BackupPlanRule.Builder.create()
        .indexActions(List.of(BackupPlanIndexActionProps.builder()
                .resourceTypes(List.of(IndexActionResourceType.S3))
                .build()))
        .build());
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
BackupPlan plan;

plan.AddRule(new BackupPlanRule(new BackupPlanRuleProps {
    IndexActions = new [] { new BackupPlanIndexActionProps {
        ResourceTypes = new [] { IndexActionResourceType.S3 }
    } }
}));
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var plan BackupPlan

plan.AddRule(backup.NewBackupPlanRule(&BackupPlanRuleProps{
	IndexActions: []BackupPlanIndexActionProps{
		&BackupPlanIndexActionProps{
			ResourceTypes: []IndexActionResourceType{
				backup.IndexActionResourceType_S3(),
			},
		},
	},
}))
```

## Initializer

TypeScript:

```ts
new IndexActionResourceType(value: string)
```

Python:

```python
IndexActionResourceType(value: str)
```

Java:

```java
new IndexActionResourceType(String value)
```

C# / .NET:

```csharp
new IndexActionResourceType(string value)
```

Golang:

```go
NewIndexActionResourceType(Value *string)
```

## Properties

- `EBS`: [IndexActionResourceType](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_backup.IndexActionResourceType.html) (static) — Amazon Elastic Block Store (Amazon EBS).

- `S3`: [IndexActionResourceType](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_backup.IndexActionResourceType.html) (static) — Amazon Simple Storage Service (Amazon S3).

- `value`: string — the resource type string value, e.g. `S3` or `EBS`.

## Methods

- `toString(): string` — Returns the string representation of this resource type.
