# HttpApiAttributes

Attributes for importing an HttpApi into the CDK.

Used as argument in: [HttpApi.fromHttpApiAttributes](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2.HttpApi.html#fromhttpapiattributes)

- Source: [`aws-apigatewayv2/lib/http/api.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-apigatewayv2/lib/http/api.ts#L367)
- Type last changed: v2.112.0 · 1 Dec 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_apigatewayv2 as apigatewayv2 } from 'aws-cdk-lib';
const httpApiAttributes: apigatewayv2.HttpApiAttributes = {
  httpApiId: 'httpApiId',

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

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_apigatewayv2 as apigatewayv2

http_api_attributes = apigatewayv2.HttpApiAttributes(
    http_api_id="httpApiId",

    # the properties below are optional
    api_endpoint="apiEndpoint"
)
```

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

HttpApiAttributes httpApiAttributes = HttpApiAttributes.builder()
        .httpApiId("httpApiId")

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

var httpApiAttributes = new HttpApiAttributes {
    HttpApiId = "httpApiId",

    // the properties below are optional
    ApiEndpoint = "apiEndpoint"
};
```

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"

httpApiAttributes := &HttpApiAttributes{
	HttpApiId: jsii.String("httpApiId"),

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

## Properties

- `apiEndpoint`: string — The endpoint URL of the HttpApi.

  **Default:** throws an error if apiEndpoint is accessed.

- `httpApiId`: string (required) — The identifier of the HttpApi.
