# GatewayRouteHostnameMatchConfig

Struct · Stable

Configuration for gateway route host name match.

Returned by: [GatewayRouteHostnameMatch.bind](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_appmesh.GatewayRouteHostnameMatch.html#bind)

- Source: [`aws-appmesh/lib/gateway-route-spec.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-appmesh/lib/gateway-route-spec.ts#L14)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appmesh as appmesh } from 'aws-cdk-lib';
const gatewayRouteHostnameMatchConfig: appmesh.GatewayRouteHostnameMatchConfig = {
  hostnameMatch: {
    exact: 'exact',
    suffix: 'suffix',
  },
};
```

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_appmesh as appmesh

gateway_route_hostname_match_config = appmesh.GatewayRouteHostnameMatchConfig(
    hostname_match=appmesh.CfnGatewayRoute.GatewayRouteHostnameMatchProperty(
        exact="exact",
        suffix="suffix"
    )
)
```

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

GatewayRouteHostnameMatchConfig gatewayRouteHostnameMatchConfig = GatewayRouteHostnameMatchConfig.builder()
        .hostnameMatch(GatewayRouteHostnameMatchProperty.builder()
                .exact("exact")
                .suffix("suffix")
                .build())
        .build();
```

C#:

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

var gatewayRouteHostnameMatchConfig = new GatewayRouteHostnameMatchConfig {
    HostnameMatch = new GatewayRouteHostnameMatchProperty {
        Exact = "exact",
        Suffix = "suffix"
    }
};
```

Go:

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

gatewayRouteHostnameMatchConfig := &GatewayRouteHostnameMatchConfig{
	HostnameMatch: &GatewayRouteHostnameMatchProperty{
		Exact: jsii.String("exact"),
		Suffix: jsii.String("suffix"),
	},
}
```

## Properties

- `hostnameMatch`: [CfnGatewayRoute.GatewayRouteHostnameMatchProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_appmesh.CfnGatewayRoute.GatewayRouteHostnameMatchProperty.html) (required) — GatewayRoute CFN configuration for host name match.
