# CfnRouteProps

Properties for defining a `CfnRoute`.

Used as props by: [CfnRoute](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_refactorspaces.CfnRoute.html)

- Source: Generated at build time
- Type last changed: v2.227.0 · 21 Nov 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_refactorspaces as refactorspaces } from 'aws-cdk-lib';
const cfnRouteProps: refactorspaces.CfnRouteProps = {
  applicationIdentifier: 'applicationIdentifier',
  environmentIdentifier: 'environmentIdentifier',
  routeType: 'routeType',
  serviceIdentifier: 'serviceIdentifier',

  // the properties below are optional
  defaultRoute: {
    activationState: 'activationState',
  },
  tags: [{
    key: 'key',
    value: 'value',
  }],
  uriPathRoute: {
    activationState: 'activationState',

    // the properties below are optional
    appendSourcePath: false,
    includeChildPaths: false,
    methods: ['methods'],
    sourcePath: 'sourcePath',
  },
};
```

Python:

```python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_refactorspaces as refactorspaces

cfn_route_props = refactorspaces.CfnRouteProps(
    application_identifier="applicationIdentifier",
    environment_identifier="environmentIdentifier",
    route_type="routeType",
    service_identifier="serviceIdentifier",

    # the properties below are optional
    default_route=refactorspaces.CfnRoute.DefaultRouteInputProperty(
        activation_state="activationState"
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    uri_path_route=refactorspaces.CfnRoute.UriPathRouteInputProperty(
        activation_state="activationState",

        # the properties below are optional
        append_source_path=False,
        include_child_paths=False,
        methods=["methods"],
        source_path="sourcePath"
    )
)
```

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

CfnRouteProps cfnRouteProps = CfnRouteProps.builder()
        .applicationIdentifier("applicationIdentifier")
        .environmentIdentifier("environmentIdentifier")
        .routeType("routeType")
        .serviceIdentifier("serviceIdentifier")

        // the properties below are optional
        .defaultRoute(DefaultRouteInputProperty.builder()
                .activationState("activationState")
                .build())
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .uriPathRoute(UriPathRouteInputProperty.builder()
                .activationState("activationState")

                // the properties below are optional
                .appendSourcePath(false)
                .includeChildPaths(false)
                .methods(List.of("methods"))
                .sourcePath("sourcePath")
                .build())
        .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.RefactorSpaces;

var cfnRouteProps = new CfnRouteProps {
    ApplicationIdentifier = "applicationIdentifier",
    EnvironmentIdentifier = "environmentIdentifier",
    RouteType = "routeType",
    ServiceIdentifier = "serviceIdentifier",

    // the properties below are optional
    DefaultRoute = new DefaultRouteInputProperty {
        ActivationState = "activationState"
    },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    UriPathRoute = new UriPathRouteInputProperty {
        ActivationState = "activationState",

        // the properties below are optional
        AppendSourcePath = false,
        IncludeChildPaths = false,
        Methods = new [] { "methods" },
        SourcePath = "sourcePath"
    }
};
```

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"

cfnRouteProps := &CfnRouteProps{
	ApplicationIdentifier: jsii.String("applicationIdentifier"),
	EnvironmentIdentifier: jsii.String("environmentIdentifier"),
	RouteType: jsii.String("routeType"),
	ServiceIdentifier: jsii.String("serviceIdentifier"),

	// the properties below are optional
	DefaultRoute: &DefaultRouteInputProperty{
		ActivationState: jsii.String("activationState"),
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	UriPathRoute: &UriPathRouteInputProperty{
		ActivationState: jsii.String("activationState"),

		// the properties below are optional
		AppendSourcePath: jsii.Boolean(false),
		IncludeChildPaths: jsii.Boolean(false),
		Methods: []*string{
			jsii.String("methods"),
		},
		SourcePath: jsii.String("sourcePath"),
	},
}
```

## Properties

- `applicationIdentifier`: string | [IApplicationRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_refactorspaces.IApplicationRef.html) (required) — The unique identifier of the application.

- `defaultRoute`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnRoute.DefaultRouteInputProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_refactorspaces.CfnRoute.DefaultRouteInputProperty.html) — Configuration for the default route type.

- `environmentIdentifier`: string | [IEnvironmentRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_refactorspaces.IEnvironmentRef.html) (required) — The unique identifier of the environment.

- `routeType`: string (required) — The route type of the route.

- `serviceIdentifier`: string | [IServiceRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_refactorspaces.IServiceRef.html) (required) — The unique identifier of the service.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — The tags assigned to the route.

- `uriPathRoute`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnRoute.UriPathRouteInputProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_refactorspaces.CfnRoute.UriPathRouteInputProperty.html) — The configuration for the URI path route type.
