# RecoveryOptionProperty

A recovery option for a user.

The `AccountRecoverySettingType` data type is an array of this object. Each `RecoveryOptionType` has a priority property that determines whether it is a primary or secondary option.

For example, if `verified_email` has a priority of `1` and `verified_phone_number` has a priority of `2` , your user pool sends account-recovery messages to a verified email address but falls back to an SMS message if the user has a verified phone number. The `admin_only` option prevents self-service account recovery.

- 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_cognito as cognito } from 'aws-cdk-lib';
const recoveryOptionProperty: cognito.CfnUserPool.RecoveryOptionProperty = {
  name: 'name',
  priority: 123,
};
```

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_cognito as cognito

recovery_option_property = cognito.CfnUserPool.RecoveryOptionProperty(
    name="name",
    priority=123
)
```

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

RecoveryOptionProperty recoveryOptionProperty = RecoveryOptionProperty.builder()
        .name("name")
        .priority(123)
        .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.Cognito;

var recoveryOptionProperty = new RecoveryOptionProperty {
    Name = "name",
    Priority = 123
};
```

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"

recoveryOptionProperty := &RecoveryOptionProperty{
	Name: jsii.String("name"),
	Priority: jsii.Number(123),
}
```

## Properties

- `name`: string — The recovery method that this object sets a recovery option for.

- `priority`: number — Your priority preference for using the specified attribute in account recovery.

  The highest priority is `1` .
