# RedirectAllRequestsToProperty

Struct · External

Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3 bucket.

- 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_s3 as s3 } from 'aws-cdk-lib';
const redirectAllRequestsToProperty: s3.CfnBucket.RedirectAllRequestsToProperty = {
  hostName: 'hostName',

  // the properties below are optional
  protocol: 'protocol',
};
```

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_s3 as s3

redirect_all_requests_to_property = s3.CfnBucket.RedirectAllRequestsToProperty(
    host_name="hostName",

    # the properties below are optional
    protocol="protocol"
)
```

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

RedirectAllRequestsToProperty redirectAllRequestsToProperty = RedirectAllRequestsToProperty.builder()
        .hostName("hostName")

        // the properties below are optional
        .protocol("protocol")
        .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.S3;

var redirectAllRequestsToProperty = new RedirectAllRequestsToProperty {
    HostName = "hostName",

    // the properties below are optional
    Protocol = "protocol"
};
```

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"

redirectAllRequestsToProperty := &RedirectAllRequestsToProperty{
	HostName: jsii.String("hostName"),

	// the properties below are optional
	Protocol: jsii.String("protocol"),
}
```

## Properties

- `hostName`: string (required) — Name of the host where requests are redirected.

- `protocol`: string — Protocol to use when redirecting requests.

  The default is the protocol that is used in the original request.
