Creates a job with the long-term usage option for a device. The long-term usage is a 1-year or 3-year long-term pricing type for the device. You are billed upfront, and Amazon Web Services provides discounts for long-term pricing.
Parameters:
-
long_term_pricing_type
(LongTermPricingType)
–
The type of long-term pricing option you want for the device, either 1-year or 3-year long-term pricing.
-
is_long_term_pricing_auto_renew
(Optional[JavaBoolean], default:
None
)
–
Specifies whether the current long-term pricing type for the device should be renewed.
-
snowball_type
(SnowballType)
–
The type of Snow Family devices to use for the long-term pricing job.
Raises:
-
InvalidResourceException
–
The specified resource can't be found. Check the information you provided in your last request, and try again.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_snowball/_services/snowball.py
| def create_long_term_pricing(
self,
long_term_pricing_type: "capo_snowball.types.long_term_pricing_type.LongTermPricingType",
snowball_type: "capo_snowball.types.snowball_type.SnowballType",
*,
config_overrides: Optional[SnowballClientConfig] = None,
is_long_term_pricing_auto_renew: Optional[
"capo_snowball.types.java_boolean.JavaBoolean"
] = None,
) -> "capo_snowball.types.create_long_term_pricing_result.CreateLongTermPricingResult":
"""<p>Creates a job with the long-term usage option for a device. The long-term usage is a 1-year or 3-year long-term pricing type for the device. You are billed upfront, and Amazon Web Services provides discounts for long-term pricing. </p>
Args:
long_term_pricing_type: <p>The type of long-term pricing option you want for the device, either 1-year or 3-year long-term pricing.</p>
is_long_term_pricing_auto_renew: <p>Specifies whether the current long-term pricing type for the device should be renewed.</p>
snowball_type: <p>The type of Snow Family devices to use for the long-term pricing job.</p>
Raises:
capo_snowball.errors.invalid_resource_exception.InvalidResourceException: <p>The specified resource can't be found. Check the information you provided in your last request, and try again.</p>
capo_snowball.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_snowball.types.create_long_term_pricing_request.CreateLongTermPricingRequest]",
) -> OperationResponse[
"capo_snowball.types.create_long_term_pricing_result.CreateLongTermPricingResult"
]:
import capo_snowball._operations.awsie_snowball_job_management_service.create_long_term_pricing
output, http_response = (
capo_snowball._operations.awsie_snowball_job_management_service.create_long_term_pricing.create_long_term_pricing(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateLongTermPricing")
)
input_: capo_snowball.types.create_long_term_pricing_request.CreateLongTermPricingRequest = {
"long_term_pricing_type": long_term_pricing_type,
"snowball_type": snowball_type,
}
if is_long_term_pricing_auto_renew is not None:
input_["is_long_term_pricing_auto_renew"] = is_long_term_pricing_auto_renew
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|