Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Creates an Api resource.
Synopsis
- data CreateApi = CreateApi' {
- apiKeySelectionExpression :: Maybe Text
- corsConfiguration :: Maybe Cors
- credentialsArn :: Maybe Text
- description :: Maybe Text
- disableExecuteApiEndpoint :: Maybe Bool
- disableSchemaValidation :: Maybe Bool
- routeKey :: Maybe Text
- routeSelectionExpression :: Maybe Text
- tags :: Maybe (HashMap Text Text)
- target :: Maybe Text
- version :: Maybe Text
- protocolType :: ProtocolType
- name :: Text
- newCreateApi :: ProtocolType -> Text -> CreateApi
- createApi_apiKeySelectionExpression :: Lens' CreateApi (Maybe Text)
- createApi_corsConfiguration :: Lens' CreateApi (Maybe Cors)
- createApi_credentialsArn :: Lens' CreateApi (Maybe Text)
- createApi_description :: Lens' CreateApi (Maybe Text)
- createApi_disableExecuteApiEndpoint :: Lens' CreateApi (Maybe Bool)
- createApi_disableSchemaValidation :: Lens' CreateApi (Maybe Bool)
- createApi_routeKey :: Lens' CreateApi (Maybe Text)
- createApi_routeSelectionExpression :: Lens' CreateApi (Maybe Text)
- createApi_tags :: Lens' CreateApi (Maybe (HashMap Text Text))
- createApi_target :: Lens' CreateApi (Maybe Text)
- createApi_version :: Lens' CreateApi (Maybe Text)
- createApi_protocolType :: Lens' CreateApi ProtocolType
- createApi_name :: Lens' CreateApi Text
- data CreateApiResponse = CreateApiResponse' {
- apiEndpoint :: Maybe Text
- apiGatewayManaged :: Maybe Bool
- apiId :: Maybe Text
- apiKeySelectionExpression :: Maybe Text
- corsConfiguration :: Maybe Cors
- createdDate :: Maybe ISO8601
- description :: Maybe Text
- disableExecuteApiEndpoint :: Maybe Bool
- disableSchemaValidation :: Maybe Bool
- importInfo :: Maybe [Text]
- name :: Maybe Text
- protocolType :: Maybe ProtocolType
- routeSelectionExpression :: Maybe Text
- tags :: Maybe (HashMap Text Text)
- version :: Maybe Text
- warnings :: Maybe [Text]
- httpStatus :: Int
- newCreateApiResponse :: Int -> CreateApiResponse
- createApiResponse_apiEndpoint :: Lens' CreateApiResponse (Maybe Text)
- createApiResponse_apiGatewayManaged :: Lens' CreateApiResponse (Maybe Bool)
- createApiResponse_apiId :: Lens' CreateApiResponse (Maybe Text)
- createApiResponse_apiKeySelectionExpression :: Lens' CreateApiResponse (Maybe Text)
- createApiResponse_corsConfiguration :: Lens' CreateApiResponse (Maybe Cors)
- createApiResponse_createdDate :: Lens' CreateApiResponse (Maybe UTCTime)
- createApiResponse_description :: Lens' CreateApiResponse (Maybe Text)
- createApiResponse_disableExecuteApiEndpoint :: Lens' CreateApiResponse (Maybe Bool)
- createApiResponse_disableSchemaValidation :: Lens' CreateApiResponse (Maybe Bool)
- createApiResponse_importInfo :: Lens' CreateApiResponse (Maybe [Text])
- createApiResponse_name :: Lens' CreateApiResponse (Maybe Text)
- createApiResponse_protocolType :: Lens' CreateApiResponse (Maybe ProtocolType)
- createApiResponse_routeSelectionExpression :: Lens' CreateApiResponse (Maybe Text)
- createApiResponse_tags :: Lens' CreateApiResponse (Maybe (HashMap Text Text))
- createApiResponse_version :: Lens' CreateApiResponse (Maybe Text)
- createApiResponse_warnings :: Lens' CreateApiResponse (Maybe [Text])
- createApiResponse_httpStatus :: Lens' CreateApiResponse Int
Creating a Request
Creates a new Api resource to represent an API.
See: newCreateApi
smart constructor.
CreateApi' | |
|
Instances
Create a value of CreateApi
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
CreateApi
, createApi_apiKeySelectionExpression
- An API key selection expression. Supported only for WebSocket APIs. See
API Key Selection Expressions.
CreateApi
, createApi_corsConfiguration
- A CORS configuration. Supported only for HTTP APIs. See
Configuring CORS
for more information.
CreateApi
, createApi_credentialsArn
- This property is part of quick create. It specifies the credentials
required for the integration, if any. For a Lambda integration, three
options are available. To specify an IAM Role for API Gateway to assume,
use the role's Amazon Resource Name (ARN). To require that the
caller's identity be passed through from the request, specify
arn:aws:iam::*:user/*. To use resource-based permissions on supported
AWS services, specify null. Currently, this property is not used for
HTTP integrations. Supported only for HTTP APIs.
CreateApi
, createApi_description
- The description of the API.
CreateApi
, createApi_disableExecuteApiEndpoint
- Specifies whether clients can invoke your API by using the default
execute-api endpoint. By default, clients can invoke your API with the
default https://{api_id}.execute-api.{region}.amazonaws.com endpoint.
To require that clients use a custom domain name to invoke your API,
disable the default endpoint.
CreateApi
, createApi_disableSchemaValidation
- Avoid validating models when creating a deployment. Supported only for
WebSocket APIs.
CreateApi
, createApi_routeKey
- This property is part of quick create. If you don't specify a routeKey,
a default route of $default is created. The $default route acts as a
catch-all for any request made to your API, for a particular stage. The
$default route key can't be modified. You can add routes after creating
the API, and you can update the route keys of additional routes.
Supported only for HTTP APIs.
CreateApi
, createApi_routeSelectionExpression
- The route selection expression for the API. For HTTP APIs, the
routeSelectionExpression must be ${request.method} ${request.path}. If
not provided, this will be the default for HTTP APIs. This property is
required for WebSocket APIs.
CreateApi
, createApi_tags
- The collection of tags. Each tag element is associated with a given
resource.
CreateApi
, createApi_target
- This property is part of quick create. Quick create produces an API with
an integration, a default catch-all route, and a default stage which is
configured to automatically deploy changes. For HTTP integrations,
specify a fully qualified URL. For Lambda integrations, specify a
function ARN. The type of the integration will be HTTP_PROXY or
AWS_PROXY, respectively. Supported only for HTTP APIs.
CreateApi
, createApi_version
- A version identifier for the API.
CreateApi
, createApi_protocolType
- The API protocol.
CreateApi
, createApi_name
- The name of the API.
Request Lenses
createApi_apiKeySelectionExpression :: Lens' CreateApi (Maybe Text) Source #
An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions.
createApi_corsConfiguration :: Lens' CreateApi (Maybe Cors) Source #
A CORS configuration. Supported only for HTTP APIs. See Configuring CORS for more information.
createApi_credentialsArn :: Lens' CreateApi (Maybe Text) Source #
This property is part of quick create. It specifies the credentials required for the integration, if any. For a Lambda integration, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify arn:aws:iam::*:user/*. To use resource-based permissions on supported AWS services, specify null. Currently, this property is not used for HTTP integrations. Supported only for HTTP APIs.
createApi_disableExecuteApiEndpoint :: Lens' CreateApi (Maybe Bool) Source #
Specifies whether clients can invoke your API by using the default execute-api endpoint. By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint.
createApi_disableSchemaValidation :: Lens' CreateApi (Maybe Bool) Source #
Avoid validating models when creating a deployment. Supported only for WebSocket APIs.
createApi_routeKey :: Lens' CreateApi (Maybe Text) Source #
This property is part of quick create. If you don't specify a routeKey, a default route of $default is created. The $default route acts as a catch-all for any request made to your API, for a particular stage. The $default route key can't be modified. You can add routes after creating the API, and you can update the route keys of additional routes. Supported only for HTTP APIs.
createApi_routeSelectionExpression :: Lens' CreateApi (Maybe Text) Source #
The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket APIs.
createApi_tags :: Lens' CreateApi (Maybe (HashMap Text Text)) Source #
The collection of tags. Each tag element is associated with a given resource.
createApi_target :: Lens' CreateApi (Maybe Text) Source #
This property is part of quick create. Quick create produces an API with an integration, a default catch-all route, and a default stage which is configured to automatically deploy changes. For HTTP integrations, specify a fully qualified URL. For Lambda integrations, specify a function ARN. The type of the integration will be HTTP_PROXY or AWS_PROXY, respectively. Supported only for HTTP APIs.
createApi_protocolType :: Lens' CreateApi ProtocolType Source #
The API protocol.
Destructuring the Response
data CreateApiResponse Source #
See: newCreateApiResponse
smart constructor.
CreateApiResponse' | |
|
Instances
Create a value of CreateApiResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
CreateApiResponse
, createApiResponse_apiEndpoint
- The URI of the API, of the form
{api-id}.execute-api.{region}.amazonaws.com. The stage name is typically
appended to this URI to form a complete path to a deployed API stage.
CreateApiResponse
, createApiResponse_apiGatewayManaged
- Specifies whether an API is managed by API Gateway. You can't update or
delete a managed API by using API Gateway. A managed API can be deleted
only through the tooling or service that created it.
CreateApiResponse
, createApiResponse_apiId
- The API ID.
CreateApi
, createApiResponse_apiKeySelectionExpression
- An API key selection expression. Supported only for WebSocket APIs. See
API Key Selection Expressions.
CreateApi
, createApiResponse_corsConfiguration
- A CORS configuration. Supported only for HTTP APIs.
CreateApiResponse
, createApiResponse_createdDate
- The timestamp when the API was created.
CreateApi
, createApiResponse_description
- The description of the API.
CreateApi
, createApiResponse_disableExecuteApiEndpoint
- Specifies whether clients can invoke your API by using the default
execute-api endpoint. By default, clients can invoke your API with the
default https://{api_id}.execute-api.{region}.amazonaws.com endpoint.
To require that clients use a custom domain name to invoke your API,
disable the default endpoint.
CreateApi
, createApiResponse_disableSchemaValidation
- Avoid validating models when creating a deployment. Supported only for
WebSocket APIs.
CreateApiResponse
, createApiResponse_importInfo
- The validation information during API import. This may include
particular properties of your OpenAPI definition which are ignored
during import. Supported only for HTTP APIs.
CreateApi
, createApiResponse_name
- The name of the API.
CreateApi
, createApiResponse_protocolType
- The API protocol.
CreateApi
, createApiResponse_routeSelectionExpression
- The route selection expression for the API. For HTTP APIs, the
routeSelectionExpression must be ${request.method} ${request.path}. If
not provided, this will be the default for HTTP APIs. This property is
required for WebSocket APIs.
CreateApi
, createApiResponse_tags
- A collection of tags associated with the API.
CreateApi
, createApiResponse_version
- A version identifier for the API.
CreateApiResponse
, createApiResponse_warnings
- The warning messages reported when failonwarnings is turned on during
API import.
$sel:httpStatus:CreateApiResponse'
, createApiResponse_httpStatus
- The response's http status code.
Response Lenses
createApiResponse_apiEndpoint :: Lens' CreateApiResponse (Maybe Text) Source #
The URI of the API, of the form {api-id}.execute-api.{region}.amazonaws.com. The stage name is typically appended to this URI to form a complete path to a deployed API stage.
createApiResponse_apiGatewayManaged :: Lens' CreateApiResponse (Maybe Bool) Source #
Specifies whether an API is managed by API Gateway. You can't update or delete a managed API by using API Gateway. A managed API can be deleted only through the tooling or service that created it.
createApiResponse_apiId :: Lens' CreateApiResponse (Maybe Text) Source #
The API ID.
createApiResponse_apiKeySelectionExpression :: Lens' CreateApiResponse (Maybe Text) Source #
An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions.
createApiResponse_corsConfiguration :: Lens' CreateApiResponse (Maybe Cors) Source #
A CORS configuration. Supported only for HTTP APIs.
createApiResponse_createdDate :: Lens' CreateApiResponse (Maybe UTCTime) Source #
The timestamp when the API was created.
createApiResponse_description :: Lens' CreateApiResponse (Maybe Text) Source #
The description of the API.
createApiResponse_disableExecuteApiEndpoint :: Lens' CreateApiResponse (Maybe Bool) Source #
Specifies whether clients can invoke your API by using the default execute-api endpoint. By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint.
createApiResponse_disableSchemaValidation :: Lens' CreateApiResponse (Maybe Bool) Source #
Avoid validating models when creating a deployment. Supported only for WebSocket APIs.
createApiResponse_importInfo :: Lens' CreateApiResponse (Maybe [Text]) Source #
The validation information during API import. This may include particular properties of your OpenAPI definition which are ignored during import. Supported only for HTTP APIs.
createApiResponse_name :: Lens' CreateApiResponse (Maybe Text) Source #
The name of the API.
createApiResponse_protocolType :: Lens' CreateApiResponse (Maybe ProtocolType) Source #
The API protocol.
createApiResponse_routeSelectionExpression :: Lens' CreateApiResponse (Maybe Text) Source #
The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket APIs.
createApiResponse_tags :: Lens' CreateApiResponse (Maybe (HashMap Text Text)) Source #
A collection of tags associated with the API.
createApiResponse_version :: Lens' CreateApiResponse (Maybe Text) Source #
A version identifier for the API.
createApiResponse_warnings :: Lens' CreateApiResponse (Maybe [Text]) Source #
The warning messages reported when failonwarnings is turned on during API import.
createApiResponse_httpStatus :: Lens' CreateApiResponse Int Source #
The response's http status code.