APIGateway class

Amazon API Gateway helps developers deliver robust, secure, and scalable mobile and web application back ends. API Gateway allows developers to securely connect mobile and web applications to APIs that run on AWS Lambda, Amazon EC2, or other publicly addressable web services that are hosted outside of AWS.

Constructors

APIGateway({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() → void
Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
createApiKey({String? customerId, String? description, bool? enabled, bool? generateDistinctId, String? name, List<StageKey>? stageKeys, Map<String, String>? tags, String? value}) Future<ApiKey>
Create an ApiKey resource.
createAuthorizer({required String name, required String restApiId, required AuthorizerType type, String? authType, String? authorizerCredentials, int? authorizerResultTtlInSeconds, String? authorizerUri, String? identitySource, String? identityValidationExpression, List<String>? providerARNs}) Future<Authorizer>
Adds a new Authorizer resource to an existing RestApi resource.
createBasePathMapping({required String domainName, required String restApiId, String? basePath, String? stage}) Future<BasePathMapping>
Creates a new BasePathMapping resource.
createDeployment({required String restApiId, bool? cacheClusterEnabled, CacheClusterSize? cacheClusterSize, DeploymentCanarySettings? canarySettings, String? description, String? stageDescription, String? stageName, bool? tracingEnabled, Map<String, String>? variables}) Future<Deployment>
Creates a Deployment resource, which makes a specified RestApi callable over the internet.
createDocumentationPart({required DocumentationPartLocation location, required String properties, required String restApiId}) Future<DocumentationPart>
May throw BadRequestException. May throw ConflictException. May throw UnauthorizedException. May throw NotFoundException. May throw LimitExceededException. May throw TooManyRequestsException.
createDocumentationVersion({required String documentationVersion, required String restApiId, String? description, String? stageName}) Future<DocumentationVersion>
May throw BadRequestException. May throw ConflictException. May throw UnauthorizedException. May throw NotFoundException. May throw LimitExceededException. May throw TooManyRequestsException.
createDomainName({required String domainName, String? certificateArn, String? certificateBody, String? certificateChain, String? certificateName, String? certificatePrivateKey, EndpointConfiguration? endpointConfiguration, MutualTlsAuthenticationInput? mutualTlsAuthentication, String? regionalCertificateArn, String? regionalCertificateName, SecurityPolicy? securityPolicy, Map<String, String>? tags}) Future<DomainName>
Creates a new domain name.
createModel({required String contentType, required String name, required String restApiId, String? description, String? schema}) Future<Model>
Adds a new Model resource to an existing RestApi resource.
createRequestValidator({required String restApiId, String? name, bool? validateRequestBody, bool? validateRequestParameters}) Future<RequestValidator>
Creates a ReqeustValidator of a given RestApi.
createResource({required String parentId, required String pathPart, required String restApiId}) Future<Resource>
Creates a Resource resource.
createRestApi({required String name, ApiKeySourceType? apiKeySource, List<String>? binaryMediaTypes, String? cloneFrom, String? description, bool? disableExecuteApiEndpoint, EndpointConfiguration? endpointConfiguration, int? minimumCompressionSize, String? policy, Map<String, String>? tags, String? version}) Future<RestApi>
Creates a new RestApi resource.
createStage({required String deploymentId, required String restApiId, required String stageName, bool? cacheClusterEnabled, CacheClusterSize? cacheClusterSize, CanarySettings? canarySettings, String? description, String? documentationVersion, Map<String, String>? tags, bool? tracingEnabled, Map<String, String>? variables}) Future<Stage>
Creates a new Stage resource that references a pre-existing Deployment for the API.
createUsagePlan({required String name, List<ApiStage>? apiStages, String? description, QuotaSettings? quota, Map<String, String>? tags, ThrottleSettings? throttle}) Future<UsagePlan>
Creates a usage plan with the throttle and quota limits, as well as the associated API stages, specified in the payload.
createUsagePlanKey({required String keyId, required String keyType, required String usagePlanId}) Future<UsagePlanKey>
Creates a usage plan key for adding an existing API key to a usage plan.
Creates a VPC link, under the caller's account in a selected region, in an asynchronous operation that typically takes 2-4 minutes to complete and become operational. The caller must have permissions to create and update VPC Endpoint services.
deleteApiKey({required String apiKey}) Future<void>
Deletes the ApiKey resource.
deleteAuthorizer({required String authorizerId, required String restApiId}) Future<void>
Deletes an existing Authorizer resource.
deleteBasePathMapping({required String basePath, required String domainName}) Future<void>
Deletes the BasePathMapping resource.
deleteClientCertificate({required String clientCertificateId}) Future<void>
Deletes the ClientCertificate resource.
deleteDeployment({required String deploymentId, required String restApiId}) Future<void>
Deletes a Deployment resource. Deleting a deployment will only succeed if there are no Stage resources associated with it.
deleteDocumentationPart({required String documentationPartId, required String restApiId}) Future<void>
May throw UnauthorizedException. May throw NotFoundException. May throw TooManyRequestsException. May throw ConflictException. May throw BadRequestException.
deleteDocumentationVersion({required String documentationVersion, required String restApiId}) Future<void>
May throw UnauthorizedException. May throw NotFoundException. May throw BadRequestException. May throw ConflictException. May throw TooManyRequestsException.
deleteDomainName({required String domainName}) Future<void>
Deletes the DomainName resource.
deleteGatewayResponse({required GatewayResponseType responseType, required String restApiId}) Future<void>
Clears any customization of a GatewayResponse of a specified response type on the given RestApi and resets it with the default settings.
deleteIntegration({required String httpMethod, required String resourceId, required String restApiId}) Future<void>
Represents a delete integration.
deleteIntegrationResponse({required String httpMethod, required String resourceId, required String restApiId, required String statusCode}) Future<void>
Represents a delete integration response.
deleteMethod({required String httpMethod, required String resourceId, required String restApiId}) Future<void>
Deletes an existing Method resource.
deleteMethodResponse({required String httpMethod, required String resourceId, required String restApiId, required String statusCode}) Future<void>
Deletes an existing MethodResponse resource.
deleteModel({required String modelName, required String restApiId}) Future<void>
Deletes a model.
deleteRequestValidator({required String requestValidatorId, required String restApiId}) Future<void>
Deletes a RequestValidator of a given RestApi.
deleteResource({required String resourceId, required String restApiId}) Future<void>
Deletes a Resource resource.
deleteRestApi({required String restApiId}) Future<void>
Deletes the specified API.
deleteStage({required String restApiId, required String stageName}) Future<void>
Deletes a Stage resource.
deleteUsagePlan({required String usagePlanId}) Future<void>
Deletes a usage plan of a given plan Id.
deleteUsagePlanKey({required String keyId, required String usagePlanId}) Future<void>
Deletes a usage plan key and remove the underlying API key from the associated usage plan.
Deletes an existing VpcLink of a specified identifier.
flushStageAuthorizersCache({required String restApiId, required String stageName}) Future<void>
Flushes all authorizer cache entries on a stage.
flushStageCache({required String restApiId, required String stageName}) Future<void>
Flushes a stage's cache.
generateClientCertificate({String? description, Map<String, String>? tags}) Future<ClientCertificate>
Generates a ClientCertificate resource.
getAccount() Future<Account>
Gets information about the current Account resource.
getApiKey({required String apiKey, bool? includeValue}) Future<ApiKey>
Gets information about the current ApiKey resource.
getApiKeys({String? customerId, bool? includeValues, int? limit, String? nameQuery, String? position}) Future<ApiKeys>
Gets information about the current ApiKeys resource.
getAuthorizer({required String authorizerId, required String restApiId}) Future<Authorizer>
Describe an existing Authorizer resource.
getAuthorizers({required String restApiId, int? limit, String? position}) Future<Authorizers>
Describe an existing Authorizers resource.
getBasePathMapping({required String basePath, required String domainName}) Future<BasePathMapping>
Describe a BasePathMapping resource.
getBasePathMappings({required String domainName, int? limit, String? position}) Future<BasePathMappings>
Represents a collection of BasePathMapping resources.
getClientCertificate({required String clientCertificateId}) Future<ClientCertificate>
Gets information about the current ClientCertificate resource.
getClientCertificates({int? limit, String? position}) Future<ClientCertificates>
Gets a collection of ClientCertificate resources.
getDeployment({required String deploymentId, required String restApiId, List<String>? embed}) Future<Deployment>
Gets information about a Deployment resource.
getDeployments({required String restApiId, int? limit, String? position}) Future<Deployments>
Gets information about a Deployments collection.
getDocumentationPart({required String documentationPartId, required String restApiId}) Future<DocumentationPart>
May throw UnauthorizedException. May throw NotFoundException. May throw TooManyRequestsException.
getDocumentationParts({required String restApiId, int? limit, LocationStatusType? locationStatus, String? nameQuery, String? path, String? position, DocumentationPartType? type}) Future<DocumentationParts>
May throw BadRequestException. May throw UnauthorizedException. May throw NotFoundException. May throw TooManyRequestsException.
getDocumentationVersion({required String documentationVersion, required String restApiId}) Future<DocumentationVersion>
May throw UnauthorizedException. May throw NotFoundException. May throw TooManyRequestsException.
getDocumentationVersions({required String restApiId, int? limit, String? position}) Future<DocumentationVersions>
May throw BadRequestException. May throw UnauthorizedException. May throw NotFoundException. May throw TooManyRequestsException.
getDomainName({required String domainName}) Future<DomainName>
Represents a domain name that is contained in a simpler, more intuitive URL that can be called.
getDomainNames({int? limit, String? position}) Future<DomainNames>
Represents a collection of DomainName resources.
getExport({required String exportType, required String restApiId, required String stageName, String? accepts, Map<String, String>? parameters}) Future<ExportResponse>
Exports a deployed version of a RestApi in a specified format.
getGatewayResponse({required GatewayResponseType responseType, required String restApiId}) Future<GatewayResponse>
Gets a GatewayResponse of a specified response type on the given RestApi.
getGatewayResponses({required String restApiId, int? limit, String? position}) Future<GatewayResponses>
Gets the GatewayResponses collection on the given RestApi. If an API developer has not added any definitions for gateway responses, the result will be the API Gateway-generated default GatewayResponses collection for the supported response types.
getIntegration({required String httpMethod, required String resourceId, required String restApiId}) Future<Integration>
Get the integration settings.
getIntegrationResponse({required String httpMethod, required String resourceId, required String restApiId, required String statusCode}) Future<IntegrationResponse>
Represents a get integration response.
getMethod({required String httpMethod, required String resourceId, required String restApiId}) Future<Method>
Describe an existing Method resource.
getMethodResponse({required String httpMethod, required String resourceId, required String restApiId, required String statusCode}) Future<MethodResponse>
Describes a MethodResponse resource.
getModel({required String modelName, required String restApiId, bool? flatten}) Future<Model>
Describes an existing model defined for a RestApi resource.
getModels({required String restApiId, int? limit, String? position}) Future<Models>
Describes existing Models defined for a RestApi resource.
getModelTemplate({required String modelName, required String restApiId}) Future<Template>
Generates a sample mapping template that can be used to transform a payload into the structure of a model.
getRequestValidator({required String requestValidatorId, required String restApiId}) Future<RequestValidator>
Gets a RequestValidator of a given RestApi.
getRequestValidators({required String restApiId, int? limit, String? position}) Future<RequestValidators>
Gets the RequestValidators collection of a given RestApi.
getResource({required String resourceId, required String restApiId, List<String>? embed}) Future<Resource>
Lists information about a resource.
getResources({required String restApiId, List<String>? embed, int? limit, String? position}) Future<Resources>
Lists information about a collection of Resource resources.
getRestApi({required String restApiId}) Future<RestApi>
Lists the RestApi resource in the collection.
getRestApis({int? limit, String? position}) Future<RestApis>
Lists the RestApis resources for your collection.
getSdk({required String restApiId, required String sdkType, required String stageName, Map<String, String>? parameters}) Future<SdkResponse>
Generates a client SDK for a RestApi and Stage.
getSdkType({required String id}) Future<SdkType>
May throw UnauthorizedException. May throw NotFoundException. May throw TooManyRequestsException.
getSdkTypes({int? limit, String? position}) Future<SdkTypes>
May throw UnauthorizedException. May throw TooManyRequestsException.
getStage({required String restApiId, required String stageName}) Future<Stage>
Gets information about a Stage resource.
getStages({required String restApiId, String? deploymentId}) Future<Stages>
Gets information about one or more Stage resources.
getTags({required String resourceArn, int? limit, String? position}) Future<Tags>
Gets the Tags collection for a given resource.
getUsage({required String endDate, required String startDate, required String usagePlanId, String? keyId, int? limit, String? position}) Future<Usage>
Gets the usage data of a usage plan in a specified time interval.
getUsagePlan({required String usagePlanId}) Future<UsagePlan>
Gets a usage plan of a given plan identifier.
getUsagePlanKey({required String keyId, required String usagePlanId}) Future<UsagePlanKey>
Gets a usage plan key of a given key identifier.
getUsagePlanKeys({required String usagePlanId, int? limit, String? nameQuery, String? position}) Future<UsagePlanKeys>
Gets all the usage plan keys representing the API keys added to a specified usage plan.
getUsagePlans({String? keyId, int? limit, String? position}) Future<UsagePlans>
Gets all the usage plans of the caller's account.
Gets a specified VPC link under the caller's account in a region.
Gets the VpcLinks collection under the caller's account in a selected region.
importApiKeys({required Uint8List body, required ApiKeysFormat format, bool? failOnWarnings}) Future<ApiKeyIds>
Import API keys from an external source, such as a CSV-formatted file.
importDocumentationParts({required Uint8List body, required String restApiId, bool? failOnWarnings, PutMode? mode}) Future<DocumentationPartIds>
May throw UnauthorizedException. May throw NotFoundException. May throw BadRequestException. May throw LimitExceededException. May throw TooManyRequestsException.
importRestApi({required Uint8List body, bool? failOnWarnings, Map<String, String>? parameters}) Future<RestApi>
A feature of the API Gateway control service for creating a new API from an external API definition file.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
putGatewayResponse({required GatewayResponseType responseType, required String restApiId, Map<String, String>? responseParameters, Map<String, String>? responseTemplates, String? statusCode}) Future<GatewayResponse>
Creates a customization of a GatewayResponse of a specified response type and status code on the given RestApi.
putIntegration({required String httpMethod, required String resourceId, required String restApiId, required IntegrationType type, List<String>? cacheKeyParameters, String? cacheNamespace, String? connectionId, ConnectionType? connectionType, ContentHandlingStrategy? contentHandling, String? credentials, String? integrationHttpMethod, String? passthroughBehavior, Map<String, String>? requestParameters, Map<String, String>? requestTemplates, int? timeoutInMillis, TlsConfig? tlsConfig, String? uri}) Future<Integration>
Sets up a method's integration.
putIntegrationResponse({required String httpMethod, required String resourceId, required String restApiId, required String statusCode, ContentHandlingStrategy? contentHandling, Map<String, String>? responseParameters, Map<String, String>? responseTemplates, String? selectionPattern}) Future<IntegrationResponse>
Represents a put integration.
putMethod({required String authorizationType, required String httpMethod, required String resourceId, required String restApiId, bool? apiKeyRequired, List<String>? authorizationScopes, String? authorizerId, String? operationName, Map<String, String>? requestModels, Map<String, bool>? requestParameters, String? requestValidatorId}) Future<Method>
Add a method to an existing Resource resource.
putMethodResponse({required String httpMethod, required String resourceId, required String restApiId, required String statusCode, Map<String, String>? responseModels, Map<String, bool>? responseParameters}) Future<MethodResponse>
Adds a MethodResponse to an existing Method resource.
putRestApi({required Uint8List body, required String restApiId, bool? failOnWarnings, PutMode? mode, Map<String, String>? parameters}) Future<RestApi>
A feature of the API Gateway control service for updating an existing API with an input of external API definitions. The update can take the form of merging the supplied definition into the existing API or overwriting the existing API.
tagResource({required String resourceArn, required Map<String, String> tags}) Future<void>
Adds or updates a tag on a given resource.
testInvokeAuthorizer({required String authorizerId, required String restApiId, Map<String, String>? additionalContext, String? body, Map<String, String>? headers, Map<String, List<String>>? multiValueHeaders, String? pathWithQueryString, Map<String, String>? stageVariables}) Future<TestInvokeAuthorizerResponse>
Simulate the execution of an Authorizer in your RestApi with headers, parameters, and an incoming request body.
testInvokeMethod({required String httpMethod, required String resourceId, required String restApiId, String? body, String? clientCertificateId, Map<String, String>? headers, Map<String, List<String>>? multiValueHeaders, String? pathWithQueryString, Map<String, String>? stageVariables}) Future<TestInvokeMethodResponse>
Simulate the execution of a Method in your RestApi with headers, parameters, and an incoming request body.
toString() String
A string representation of this object.
inherited
untagResource({required String resourceArn, required List<String> tagKeys}) Future<void>
Removes a tag from a given resource.
updateAccount({List<PatchOperation>? patchOperations}) Future<Account>
Changes information about the current Account resource.
updateApiKey({required String apiKey, List<PatchOperation>? patchOperations}) Future<ApiKey>
Changes information about an ApiKey resource.
updateAuthorizer({required String authorizerId, required String restApiId, List<PatchOperation>? patchOperations}) Future<Authorizer>
Updates an existing Authorizer resource.
updateBasePathMapping({required String basePath, required String domainName, List<PatchOperation>? patchOperations}) Future<BasePathMapping>
Changes information about the BasePathMapping resource.
updateClientCertificate({required String clientCertificateId, List<PatchOperation>? patchOperations}) Future<ClientCertificate>
Changes information about an ClientCertificate resource.
updateDeployment({required String deploymentId, required String restApiId, List<PatchOperation>? patchOperations}) Future<Deployment>
Changes information about a Deployment resource.
updateDocumentationPart({required String documentationPartId, required String restApiId, List<PatchOperation>? patchOperations}) Future<DocumentationPart>
May throw BadRequestException. May throw UnauthorizedException. May throw NotFoundException. May throw ConflictException. May throw LimitExceededException. May throw TooManyRequestsException.
updateDocumentationVersion({required String documentationVersion, required String restApiId, List<PatchOperation>? patchOperations}) Future<DocumentationVersion>
May throw UnauthorizedException. May throw NotFoundException. May throw ConflictException. May throw BadRequestException. May throw TooManyRequestsException.
updateDomainName({required String domainName, List<PatchOperation>? patchOperations}) Future<DomainName>
Changes information about the DomainName resource.
updateGatewayResponse({required GatewayResponseType responseType, required String restApiId, List<PatchOperation>? patchOperations}) Future<GatewayResponse>
Updates a GatewayResponse of a specified response type on the given RestApi.
updateIntegration({required String httpMethod, required String resourceId, required String restApiId, List<PatchOperation>? patchOperations}) Future<Integration>
Represents an update integration.
updateIntegrationResponse({required String httpMethod, required String resourceId, required String restApiId, required String statusCode, List<PatchOperation>? patchOperations}) Future<IntegrationResponse>
Represents an update integration response.
updateMethod({required String httpMethod, required String resourceId, required String restApiId, List<PatchOperation>? patchOperations}) Future<Method>
Updates an existing Method resource.
updateMethodResponse({required String httpMethod, required String resourceId, required String restApiId, required String statusCode, List<PatchOperation>? patchOperations}) Future<MethodResponse>
Updates an existing MethodResponse resource.
updateModel({required String modelName, required String restApiId, List<PatchOperation>? patchOperations}) Future<Model>
Changes information about a model.
updateRequestValidator({required String requestValidatorId, required String restApiId, List<PatchOperation>? patchOperations}) Future<RequestValidator>
Updates a RequestValidator of a given RestApi.
updateResource({required String resourceId, required String restApiId, List<PatchOperation>? patchOperations}) Future<Resource>
Changes information about a Resource resource.
updateRestApi({required String restApiId, List<PatchOperation>? patchOperations}) Future<RestApi>
Changes information about the specified API.
updateStage({required String restApiId, required String stageName, List<PatchOperation>? patchOperations}) Future<Stage>
Changes information about a Stage resource.
updateUsage({required String keyId, required String usagePlanId, List<PatchOperation>? patchOperations}) Future<Usage>
Grants a temporary extension to the remaining quota of a usage plan associated with a specified API key.
updateUsagePlan({required String usagePlanId, List<PatchOperation>? patchOperations}) Future<UsagePlan>
Updates a usage plan of a given plan Id.
Updates an existing VpcLink of a specified identifier.

Operators

operator ==(Object other) bool
The equality operator.
inherited