createEndpoint method
Creates an endpoint and associates it with the specified Outpost.
Related actions include:
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw OutpostOfflineException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter outpostId :
The ID of the Outposts.
Parameter securityGroupId :
The ID of the security group to use with the endpoint.
Parameter subnetId :
The ID of the subnet in the selected VPC. The endpoint subnet must belong
to the Outpost that has Amazon S3 on Outposts provisioned.
Parameter accessType :
The type of access for the network connectivity for the Amazon S3 on
Outposts endpoint. To use the Amazon Web Services VPC, choose
Private. To use the endpoint with an on-premises network,
choose CustomerOwnedIp. If you choose
CustomerOwnedIp, you must also provide the customer-owned IP
address pool (CoIP pool).
Parameter customerOwnedIpv4Pool :
The ID of the customer-owned IPv4 address pool (CoIP pool) for the
endpoint. IP addresses are allocated from this pool for the endpoint.
Implementation
Future<CreateEndpointResult> createEndpoint({
required String outpostId,
required String securityGroupId,
required String subnetId,
EndpointAccessType? accessType,
String? customerOwnedIpv4Pool,
}) async {
final $payload = <String, dynamic>{
'OutpostId': outpostId,
'SecurityGroupId': securityGroupId,
'SubnetId': subnetId,
if (accessType != null) 'AccessType': accessType.value,
if (customerOwnedIpv4Pool != null)
'CustomerOwnedIpv4Pool': customerOwnedIpv4Pool,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/S3Outposts/CreateEndpoint',
exceptionFnMap: _exceptionFns,
);
return CreateEndpointResult.fromJson(response);
}