Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Creates an Api resource.
Synopsis
- data CreateApi = CreateApi' {
- credentialsArn :: Maybe Text
- disableExecuteApiEndpoint :: Maybe Bool
- version :: Maybe Text
- apiKeySelectionExpression :: Maybe Text
- corsConfiguration :: Maybe Cors
- routeSelectionExpression :: Maybe Text
- disableSchemaValidation :: Maybe Bool
- description :: Maybe Text
- routeKey :: Maybe Text
- tags :: Maybe (HashMap Text Text)
- target :: Maybe Text
- protocolType :: ProtocolType
- name :: Text
- newCreateApi :: ProtocolType -> Text -> CreateApi
- createApi_credentialsArn :: Lens' CreateApi (Maybe Text)
- createApi_disableExecuteApiEndpoint :: Lens' CreateApi (Maybe Bool)
- createApi_version :: Lens' CreateApi (Maybe Text)
- createApi_apiKeySelectionExpression :: Lens' CreateApi (Maybe Text)
- createApi_corsConfiguration :: Lens' CreateApi (Maybe Cors)
- createApi_routeSelectionExpression :: Lens' CreateApi (Maybe Text)
- createApi_disableSchemaValidation :: Lens' CreateApi (Maybe Bool)
- createApi_description :: Lens' CreateApi (Maybe Text)
- createApi_routeKey :: Lens' CreateApi (Maybe Text)
- createApi_tags :: Lens' CreateApi (Maybe (HashMap Text Text))
- createApi_target :: Lens' CreateApi (Maybe Text)
- createApi_protocolType :: Lens' CreateApi ProtocolType
- createApi_name :: Lens' CreateApi Text
- data CreateApiResponse = CreateApiResponse' {
- apiId :: Maybe Text
- disableExecuteApiEndpoint :: Maybe Bool
- apiEndpoint :: Maybe Text
- warnings :: Maybe [Text]
- createdDate :: Maybe POSIX
- name :: Maybe Text
- version :: Maybe Text
- apiGatewayManaged :: Maybe Bool
- apiKeySelectionExpression :: Maybe Text
- corsConfiguration :: Maybe Cors
- routeSelectionExpression :: Maybe Text
- importInfo :: Maybe [Text]
- disableSchemaValidation :: Maybe Bool
- description :: Maybe Text
- protocolType :: Maybe ProtocolType
- tags :: Maybe (HashMap Text Text)
- httpStatus :: Int
- newCreateApiResponse :: Int -> CreateApiResponse
- createApiResponse_apiId :: Lens' CreateApiResponse (Maybe Text)
- createApiResponse_disableExecuteApiEndpoint :: Lens' CreateApiResponse (Maybe Bool)
- createApiResponse_apiEndpoint :: Lens' CreateApiResponse (Maybe Text)
- createApiResponse_warnings :: Lens' CreateApiResponse (Maybe [Text])
- createApiResponse_createdDate :: Lens' CreateApiResponse (Maybe UTCTime)
- createApiResponse_name :: Lens' CreateApiResponse (Maybe Text)
- createApiResponse_version :: Lens' CreateApiResponse (Maybe Text)
- createApiResponse_apiGatewayManaged :: Lens' CreateApiResponse (Maybe Bool)
- createApiResponse_apiKeySelectionExpression :: Lens' CreateApiResponse (Maybe Text)
- createApiResponse_corsConfiguration :: Lens' CreateApiResponse (Maybe Cors)
- createApiResponse_routeSelectionExpression :: Lens' CreateApiResponse (Maybe Text)
- createApiResponse_importInfo :: Lens' CreateApiResponse (Maybe [Text])
- createApiResponse_disableSchemaValidation :: Lens' CreateApiResponse (Maybe Bool)
- createApiResponse_description :: Lens' CreateApiResponse (Maybe Text)
- createApiResponse_protocolType :: Lens' CreateApiResponse (Maybe ProtocolType)
- createApiResponse_tags :: Lens' CreateApiResponse (Maybe (HashMap Text 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:
$sel:credentialsArn: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.
$sel:disableExecuteApiEndpoint: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.
$sel:version:CreateApi'
, createApi_version
- A version identifier for the API.
$sel:apiKeySelectionExpression:CreateApi'
, createApi_apiKeySelectionExpression
- An API key selection expression. Supported only for WebSocket APIs. See
API Key Selection Expressions.
$sel:corsConfiguration:CreateApi'
, createApi_corsConfiguration
- A CORS configuration. Supported only for HTTP APIs. See
Configuring CORS
for more information.
$sel:routeSelectionExpression: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.
$sel:disableSchemaValidation:CreateApi'
, createApi_disableSchemaValidation
- Avoid validating models when creating a deployment. Supported only for
WebSocket APIs.
$sel:description:CreateApi'
, createApi_description
- The description of the API.
$sel:routeKey: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.
$sel:tags:CreateApi'
, createApi_tags
- The collection of tags. Each tag element is associated with a given
resource.
$sel:target: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.
$sel:protocolType:CreateApi'
, createApi_protocolType
- The API protocol.
$sel:name:CreateApi'
, createApi_name
- The name of the API.
Request Lenses
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_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_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_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_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:
$sel:apiId:CreateApiResponse'
, createApiResponse_apiId
- The API ID.
$sel:disableExecuteApiEndpoint: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.
$sel:apiEndpoint: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.
$sel:warnings:CreateApiResponse'
, createApiResponse_warnings
- The warning messages reported when failonwarnings is turned on during
API import.
$sel:createdDate:CreateApiResponse'
, createApiResponse_createdDate
- The timestamp when the API was created.
$sel:name:CreateApi'
, createApiResponse_name
- The name of the API.
$sel:version:CreateApi'
, createApiResponse_version
- A version identifier for the API.
$sel:apiGatewayManaged: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.
$sel:apiKeySelectionExpression:CreateApi'
, createApiResponse_apiKeySelectionExpression
- An API key selection expression. Supported only for WebSocket APIs. See
API Key Selection Expressions.
$sel:corsConfiguration:CreateApi'
, createApiResponse_corsConfiguration
- A CORS configuration. Supported only for HTTP APIs.
$sel:routeSelectionExpression: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.
$sel:importInfo: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.
$sel:disableSchemaValidation:CreateApi'
, createApiResponse_disableSchemaValidation
- Avoid validating models when creating a deployment. Supported only for
WebSocket APIs.
$sel:description:CreateApi'
, createApiResponse_description
- The description of the API.
$sel:protocolType:CreateApi'
, createApiResponse_protocolType
- The API protocol.
$sel:tags:CreateApi'
, createApiResponse_tags
- A collection of tags associated with the API.
$sel:httpStatus:CreateApiResponse'
, createApiResponse_httpStatus
- The response's http status code.
Response Lenses
createApiResponse_apiId :: Lens' CreateApiResponse (Maybe Text) Source #
The API ID.
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_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_warnings :: Lens' CreateApiResponse (Maybe [Text]) Source #
The warning messages reported when failonwarnings is turned on during API import.
createApiResponse_createdDate :: Lens' CreateApiResponse (Maybe UTCTime) Source #
The timestamp when the API was created.
createApiResponse_name :: Lens' CreateApiResponse (Maybe Text) Source #
The name of the API.
createApiResponse_version :: Lens' CreateApiResponse (Maybe Text) Source #
A version identifier for the API.
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_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_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_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_disableSchemaValidation :: Lens' CreateApiResponse (Maybe Bool) Source #
Avoid validating models when creating a deployment. Supported only for WebSocket APIs.
createApiResponse_description :: Lens' CreateApiResponse (Maybe Text) Source #
The description of the API.
createApiResponse_protocolType :: Lens' CreateApiResponse (Maybe ProtocolType) Source #
The API protocol.
createApiResponse_tags :: Lens' CreateApiResponse (Maybe (HashMap Text Text)) Source #
A collection of tags associated with the API.
createApiResponse_httpStatus :: Lens' CreateApiResponse Int Source #
The response's http status code.