Creates an address for a Snow device to be shipped to. In most regions, addresses are validated at the time of creation. The address you provide must be located within the serviceable area of your region. If the address is invalid or unsupported, then an exception is thrown. If providing an address as a JSON file through the cli-input-json option, include the full file path. For example, --cli-input-json file://create-address.json.
Parameters:
-
address
(Address)
–
The address that you want the Snow device shipped to.
Raises:
-
InvalidAddressException
–
The address provided was invalid. Check the address with your region's carrier, and try again.
-
UnsupportedAddressException
–
The address is either outside the serviceable area for your region, or an error occurred. Check the address with your region's carrier and try again. If the issue persists, contact Amazon Web Services Support.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Examples:
To create an address for a job
This operation creates an address for a job. Addresses are validated at the time of creation. The address you provide must be located within the serviceable area of your region. If the address is invalid or unsupported, then an exception is thrown.
>>> client.create_address(address={'City': 'Seattle', 'Company': "My Company's Name", 'Country': 'USA', 'Name': 'My Name', 'PhoneNumber': '425-555-5555', 'PostalCode': '98101', 'StateOrProvince': 'WA', 'Street1': '123 Main Street'})
Source code in docs_src/capo_snowball/_services/snowball.py
| def create_address(
self,
address: "capo_snowball.types.address.Address",
*,
config_overrides: Optional[SnowballClientConfig] = None,
) -> "capo_snowball.types.create_address_result.CreateAddressResult":
"""<p>Creates an address for a Snow device to be shipped to. In most regions, addresses are validated at the time of creation. The address you provide must be located within the serviceable area of your region. If the address is invalid or unsupported, then an exception is thrown. If providing an address as a JSON file through the <code>cli-input-json</code> option, include the full file path. For example, <code>--cli-input-json file://create-address.json</code>.</p>
Args:
address: <p>The address that you want the Snow device shipped to.</p>
Raises:
capo_snowball.errors.invalid_address_exception.InvalidAddressException: <p>The address provided was invalid. Check the address with your region's carrier, and try again.</p>
capo_snowball.errors.unsupported_address_exception.UnsupportedAddressException: <p>The address is either outside the serviceable area for your region, or an error occurred. Check the address with your region's carrier and try again. If the issue persists, contact Amazon Web Services Support.</p>
capo_snowball.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To create an address for a job
This operation creates an address for a job. Addresses are validated at the time of creation. The address you provide must be located within the serviceable area of your region. If the address is invalid or unsupported, then an exception is thrown.
>>> client.create_address(address={'City': 'Seattle', 'Company': "My Company's Name", 'Country': 'USA', 'Name': 'My Name', 'PhoneNumber': '425-555-5555', 'PostalCode': '98101', 'StateOrProvince': 'WA', 'Street1': '123 Main Street'})
"""
def _handler(
req: "OperationRequest[capo_snowball.types.create_address_request.CreateAddressRequest]",
) -> OperationResponse[
"capo_snowball.types.create_address_result.CreateAddressResult"
]:
import capo_snowball._operations.awsie_snowball_job_management_service.create_address
output, http_response = (
capo_snowball._operations.awsie_snowball_job_management_service.create_address.create_address(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateAddress")
)
input_: capo_snowball.types.create_address_request.CreateAddressRequest = {
"address": address
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|