Package software.amazon.awscdk.core
Class Size
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.core.Size
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:29:55.111Z")
@Stability(Stable)
public class Size
extends software.amazon.jsii.JsiiObject
Represents the amount of digital storage.
The amount can be specified either as a literal value (e.g: 10
) which
cannot be negative, or as an unresolved number token.
When the amount is passed as a token, unit conversion is not possible.
Example:
Bucket bucket; // Provide a Lambda function that will transform records before delivery, with custom // buffering and retry configuration Function lambdaFunction = Function.Builder.create(this, "Processor") .runtime(Runtime.NODEJS_14_X) .handler("index.handler") .code(Code.fromAsset(join(__dirname, "process-records"))) .build(); LambdaFunctionProcessor lambdaProcessor = LambdaFunctionProcessor.Builder.create(lambdaFunction) .bufferInterval(Duration.minutes(5)) .bufferSize(Size.mebibytes(5)) .retries(5) .build(); S3Bucket s3Destination = S3Bucket.Builder.create(bucket) .processor(lambdaProcessor) .build(); DeliveryStream.Builder.create(this, "Delivery Stream") .destinations(List.of(s3Destination)) .build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Size
Create a Storage representing an amount gibibytes.Checks if size is a token or a resolvable object.static Size
Create a Storage representing an amount kibibytes.static Size
Create a Storage representing an amount mebibytes.static Size
Deprecated.static Size
Create a Storage representing an amount pebibytes.static Size
Create a Storage representing an amount tebibytes.Return this storage as a total number of gibibytes.Return this storage as a total number of gibibytes.Return this storage as a total number of kibibytes.Return this storage as a total number of kibibytes.Return this storage as a total number of mebibytes.Return this storage as a total number of mebibytes.Return this storage as a total number of pebibytes.Return this storage as a total number of pebibytes.Return this storage as a total number of tebibytes.Return this storage as a total number of tebibytes.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
Size
protected Size(software.amazon.jsii.JsiiObjectRef objRef) -
Size
protected Size(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
-
Method Details
-
gibibytes
Create a Storage representing an amount gibibytes.1 GiB = 1024 MiB
- Parameters:
amount
- the amount of gibibytes to be represented. This parameter is required.- Returns:
- a new
Size
instance
-
kibibytes
Create a Storage representing an amount kibibytes.1 KiB = 1024 bytes
- Parameters:
amount
- the amount of kibibytes to be represented. This parameter is required.- Returns:
- a new
Size
instance
-
mebibytes
Create a Storage representing an amount mebibytes.1 MiB = 1024 KiB
- Parameters:
amount
- the amount of mebibytes to be represented. This parameter is required.- Returns:
- a new
Size
instance
-
pebibyte
Deprecated.usepebibytes
instead(deprecated) Create a Storage representing an amount pebibytes.1 PiB = 1024 TiB
- Parameters:
amount
- This parameter is required.
-
pebibytes
Create a Storage representing an amount pebibytes.1 PiB = 1024 TiB
- Parameters:
amount
- the amount of pebibytes to be represented. This parameter is required.- Returns:
- a new
Size
instance
-
tebibytes
Create a Storage representing an amount tebibytes.1 TiB = 1024 GiB
- Parameters:
amount
- the amount of tebibytes to be represented. This parameter is required.- Returns:
- a new
Size
instance
-
isUnresolved
Checks if size is a token or a resolvable object. -
toGibibytes
Return this storage as a total number of gibibytes.- Parameters:
opts
- the conversion options.- Returns:
- the quantity of bytes expressed in gibibytes
-
toGibibytes
Return this storage as a total number of gibibytes.- Returns:
- the quantity of bytes expressed in gibibytes
-
toKibibytes
Return this storage as a total number of kibibytes.- Parameters:
opts
- the conversion options.- Returns:
- the quantity of bytes expressed in kibibytes
-
toKibibytes
Return this storage as a total number of kibibytes.- Returns:
- the quantity of bytes expressed in kibibytes
-
toMebibytes
Return this storage as a total number of mebibytes.- Parameters:
opts
- the conversion options.- Returns:
- the quantity of bytes expressed in mebibytes
-
toMebibytes
Return this storage as a total number of mebibytes.- Returns:
- the quantity of bytes expressed in mebibytes
-
toPebibytes
Return this storage as a total number of pebibytes.- Parameters:
opts
- the conversion options.- Returns:
- the quantity of bytes expressed in pebibytes
-
toPebibytes
Return this storage as a total number of pebibytes.- Returns:
- the quantity of bytes expressed in pebibytes
-
toTebibytes
Return this storage as a total number of tebibytes.- Parameters:
opts
- the conversion options.- Returns:
- the quantity of bytes expressed in tebibytes
-
toTebibytes
Return this storage as a total number of tebibytes.- Returns:
- the quantity of bytes expressed in tebibytes
-
pebibytes
instead