Struct aws_sdk_batch::model::container_properties::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for ContainerProperties
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn image(self, input: impl Into<String>) -> Self
pub fn image(self, input: impl Into<String>) -> Self
The image used to start a container. This string is passed directly to the Docker daemon. Images in the Docker Hub registry are available by default. Other repositories are specified with repository-url/image:tag
. Up to 255 letters (uppercase and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. This parameter maps to Image
in the Create a container section of the Docker Remote API and the IMAGE
parameter of docker run.
Docker image architecture must match the processor architecture of the compute resources that they're scheduled on. For example, ARM-based Docker images can only run on ARM-based compute resources.
-
Images in Amazon ECR Public repositories use the full
registry/repository[:tag]
orregistry/repository[@digest]
naming conventions. For example,public.ecr.aws/registry_alias/my-web-app:latest
. -
Images in Amazon ECR repositories use the full registry and repository URI (for example,
012345678910.dkr.ecr.
)..amazonaws.com/ -
Images in official repositories on Docker Hub use a single name (for example,
ubuntu
ormongo
). -
Images in other repositories on Docker Hub are qualified with an organization name (for example,
amazon/amazon-ecs-agent
). -
Images in other online repositories are qualified further by a domain name (for example,
quay.io/assemblyline/ubuntu
).
sourcepub fn set_image(self, input: Option<String>) -> Self
pub fn set_image(self, input: Option<String>) -> Self
The image used to start a container. This string is passed directly to the Docker daemon. Images in the Docker Hub registry are available by default. Other repositories are specified with repository-url/image:tag
. Up to 255 letters (uppercase and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. This parameter maps to Image
in the Create a container section of the Docker Remote API and the IMAGE
parameter of docker run.
Docker image architecture must match the processor architecture of the compute resources that they're scheduled on. For example, ARM-based Docker images can only run on ARM-based compute resources.
-
Images in Amazon ECR Public repositories use the full
registry/repository[:tag]
orregistry/repository[@digest]
naming conventions. For example,public.ecr.aws/registry_alias/my-web-app:latest
. -
Images in Amazon ECR repositories use the full registry and repository URI (for example,
012345678910.dkr.ecr.
)..amazonaws.com/ -
Images in official repositories on Docker Hub use a single name (for example,
ubuntu
ormongo
). -
Images in other repositories on Docker Hub are qualified with an organization name (for example,
amazon/amazon-ecs-agent
). -
Images in other online repositories are qualified further by a domain name (for example,
quay.io/assemblyline/ubuntu
).
Examples found in repository?
2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797
pub(crate) fn deser_structure_crate_model_container_properties<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ContainerProperties>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::container_properties::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"image" => {
builder = builder.set_image(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"vcpus" => {
builder = builder.set_vcpus(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"memory" => {
builder = builder.set_memory(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"command" => {
builder = builder.set_command(
crate::json_deser::deser_list_com_amazonaws_batch_string_list(
tokens,
)?,
);
}
"jobRoleArn" => {
builder = builder.set_job_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"executionRoleArn" => {
builder = builder.set_execution_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"volumes" => {
builder = builder.set_volumes(
crate::json_deser::deser_list_com_amazonaws_batch_volumes(
tokens,
)?,
);
}
"environment" => {
builder = builder.set_environment(
crate::json_deser::deser_list_com_amazonaws_batch_environment_variables(tokens)?
);
}
"mountPoints" => {
builder = builder.set_mount_points(
crate::json_deser::deser_list_com_amazonaws_batch_mount_points(
tokens,
)?,
);
}
"readonlyRootFilesystem" => {
builder = builder.set_readonly_root_filesystem(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"privileged" => {
builder = builder.set_privileged(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ulimits" => {
builder = builder.set_ulimits(
crate::json_deser::deser_list_com_amazonaws_batch_ulimits(
tokens,
)?,
);
}
"user" => {
builder = builder.set_user(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"instanceType" => {
builder = builder.set_instance_type(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"resourceRequirements" => {
builder = builder.set_resource_requirements(
crate::json_deser::deser_list_com_amazonaws_batch_resource_requirements(tokens)?
);
}
"linuxParameters" => {
builder = builder.set_linux_parameters(
crate::json_deser::deser_structure_crate_model_linux_parameters(tokens)?
);
}
"logConfiguration" => {
builder = builder.set_log_configuration(
crate::json_deser::deser_structure_crate_model_log_configuration(tokens)?
);
}
"secrets" => {
builder = builder.set_secrets(
crate::json_deser::deser_list_com_amazonaws_batch_secret_list(
tokens,
)?,
);
}
"networkConfiguration" => {
builder = builder.set_network_configuration(
crate::json_deser::deser_structure_crate_model_network_configuration(tokens)?
);
}
"fargatePlatformConfiguration" => {
builder = builder.set_fargate_platform_configuration(
crate::json_deser::deser_structure_crate_model_fargate_platform_configuration(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn vcpus(self, input: i32) -> Self
👎Deprecated: This field is deprecated, use resourceRequirements instead.
pub fn vcpus(self, input: i32) -> Self
This parameter is deprecated, use resourceRequirements
to specify the vCPU requirements for the job definition. It's not supported for jobs running on Fargate resources. For jobs running on EC2 resources, it specifies the number of vCPUs reserved for the job.
Each vCPU is equivalent to 1,024 CPU shares. This parameter maps to CpuShares
in the Create a container section of the Docker Remote API and the --cpu-shares
option to docker run. The number of vCPUs must be specified but can be specified in several places. You must specify it at least once for each node.
sourcepub fn set_vcpus(self, input: Option<i32>) -> Self
👎Deprecated: This field is deprecated, use resourceRequirements instead.
pub fn set_vcpus(self, input: Option<i32>) -> Self
This parameter is deprecated, use resourceRequirements
to specify the vCPU requirements for the job definition. It's not supported for jobs running on Fargate resources. For jobs running on EC2 resources, it specifies the number of vCPUs reserved for the job.
Each vCPU is equivalent to 1,024 CPU shares. This parameter maps to CpuShares
in the Create a container section of the Docker Remote API and the --cpu-shares
option to docker run. The number of vCPUs must be specified but can be specified in several places. You must specify it at least once for each node.
Examples found in repository?
2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797
pub(crate) fn deser_structure_crate_model_container_properties<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ContainerProperties>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::container_properties::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"image" => {
builder = builder.set_image(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"vcpus" => {
builder = builder.set_vcpus(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"memory" => {
builder = builder.set_memory(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"command" => {
builder = builder.set_command(
crate::json_deser::deser_list_com_amazonaws_batch_string_list(
tokens,
)?,
);
}
"jobRoleArn" => {
builder = builder.set_job_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"executionRoleArn" => {
builder = builder.set_execution_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"volumes" => {
builder = builder.set_volumes(
crate::json_deser::deser_list_com_amazonaws_batch_volumes(
tokens,
)?,
);
}
"environment" => {
builder = builder.set_environment(
crate::json_deser::deser_list_com_amazonaws_batch_environment_variables(tokens)?
);
}
"mountPoints" => {
builder = builder.set_mount_points(
crate::json_deser::deser_list_com_amazonaws_batch_mount_points(
tokens,
)?,
);
}
"readonlyRootFilesystem" => {
builder = builder.set_readonly_root_filesystem(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"privileged" => {
builder = builder.set_privileged(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ulimits" => {
builder = builder.set_ulimits(
crate::json_deser::deser_list_com_amazonaws_batch_ulimits(
tokens,
)?,
);
}
"user" => {
builder = builder.set_user(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"instanceType" => {
builder = builder.set_instance_type(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"resourceRequirements" => {
builder = builder.set_resource_requirements(
crate::json_deser::deser_list_com_amazonaws_batch_resource_requirements(tokens)?
);
}
"linuxParameters" => {
builder = builder.set_linux_parameters(
crate::json_deser::deser_structure_crate_model_linux_parameters(tokens)?
);
}
"logConfiguration" => {
builder = builder.set_log_configuration(
crate::json_deser::deser_structure_crate_model_log_configuration(tokens)?
);
}
"secrets" => {
builder = builder.set_secrets(
crate::json_deser::deser_list_com_amazonaws_batch_secret_list(
tokens,
)?,
);
}
"networkConfiguration" => {
builder = builder.set_network_configuration(
crate::json_deser::deser_structure_crate_model_network_configuration(tokens)?
);
}
"fargatePlatformConfiguration" => {
builder = builder.set_fargate_platform_configuration(
crate::json_deser::deser_structure_crate_model_fargate_platform_configuration(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn memory(self, input: i32) -> Self
👎Deprecated: This field is deprecated, use resourceRequirements instead.
pub fn memory(self, input: i32) -> Self
This parameter is deprecated, use resourceRequirements
to specify the memory requirements for the job definition. It's not supported for jobs running on Fargate resources. For jobs running on EC2 resources, it specifies the memory hard limit (in MiB) for a container. If your container attempts to exceed the specified number, it's terminated. You must specify at least 4 MiB of memory for a job using this parameter. The memory hard limit can be specified in several places. It must be specified for each node at least once.
sourcepub fn set_memory(self, input: Option<i32>) -> Self
👎Deprecated: This field is deprecated, use resourceRequirements instead.
pub fn set_memory(self, input: Option<i32>) -> Self
This parameter is deprecated, use resourceRequirements
to specify the memory requirements for the job definition. It's not supported for jobs running on Fargate resources. For jobs running on EC2 resources, it specifies the memory hard limit (in MiB) for a container. If your container attempts to exceed the specified number, it's terminated. You must specify at least 4 MiB of memory for a job using this parameter. The memory hard limit can be specified in several places. It must be specified for each node at least once.
Examples found in repository?
2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797
pub(crate) fn deser_structure_crate_model_container_properties<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ContainerProperties>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::container_properties::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"image" => {
builder = builder.set_image(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"vcpus" => {
builder = builder.set_vcpus(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"memory" => {
builder = builder.set_memory(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"command" => {
builder = builder.set_command(
crate::json_deser::deser_list_com_amazonaws_batch_string_list(
tokens,
)?,
);
}
"jobRoleArn" => {
builder = builder.set_job_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"executionRoleArn" => {
builder = builder.set_execution_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"volumes" => {
builder = builder.set_volumes(
crate::json_deser::deser_list_com_amazonaws_batch_volumes(
tokens,
)?,
);
}
"environment" => {
builder = builder.set_environment(
crate::json_deser::deser_list_com_amazonaws_batch_environment_variables(tokens)?
);
}
"mountPoints" => {
builder = builder.set_mount_points(
crate::json_deser::deser_list_com_amazonaws_batch_mount_points(
tokens,
)?,
);
}
"readonlyRootFilesystem" => {
builder = builder.set_readonly_root_filesystem(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"privileged" => {
builder = builder.set_privileged(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ulimits" => {
builder = builder.set_ulimits(
crate::json_deser::deser_list_com_amazonaws_batch_ulimits(
tokens,
)?,
);
}
"user" => {
builder = builder.set_user(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"instanceType" => {
builder = builder.set_instance_type(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"resourceRequirements" => {
builder = builder.set_resource_requirements(
crate::json_deser::deser_list_com_amazonaws_batch_resource_requirements(tokens)?
);
}
"linuxParameters" => {
builder = builder.set_linux_parameters(
crate::json_deser::deser_structure_crate_model_linux_parameters(tokens)?
);
}
"logConfiguration" => {
builder = builder.set_log_configuration(
crate::json_deser::deser_structure_crate_model_log_configuration(tokens)?
);
}
"secrets" => {
builder = builder.set_secrets(
crate::json_deser::deser_list_com_amazonaws_batch_secret_list(
tokens,
)?,
);
}
"networkConfiguration" => {
builder = builder.set_network_configuration(
crate::json_deser::deser_structure_crate_model_network_configuration(tokens)?
);
}
"fargatePlatformConfiguration" => {
builder = builder.set_fargate_platform_configuration(
crate::json_deser::deser_structure_crate_model_fargate_platform_configuration(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn command(self, input: impl Into<String>) -> Self
pub fn command(self, input: impl Into<String>) -> Self
Appends an item to command
.
To override the contents of this collection use set_command
.
The command that's passed to the container. This parameter maps to Cmd
in the Create a container section of the Docker Remote API and the COMMAND
parameter to docker run. For more information, see https://docs.docker.com/engine/reference/builder/#cmd.
sourcepub fn set_command(self, input: Option<Vec<String>>) -> Self
pub fn set_command(self, input: Option<Vec<String>>) -> Self
The command that's passed to the container. This parameter maps to Cmd
in the Create a container section of the Docker Remote API and the COMMAND
parameter to docker run. For more information, see https://docs.docker.com/engine/reference/builder/#cmd.
Examples found in repository?
2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797
pub(crate) fn deser_structure_crate_model_container_properties<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ContainerProperties>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::container_properties::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"image" => {
builder = builder.set_image(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"vcpus" => {
builder = builder.set_vcpus(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"memory" => {
builder = builder.set_memory(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"command" => {
builder = builder.set_command(
crate::json_deser::deser_list_com_amazonaws_batch_string_list(
tokens,
)?,
);
}
"jobRoleArn" => {
builder = builder.set_job_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"executionRoleArn" => {
builder = builder.set_execution_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"volumes" => {
builder = builder.set_volumes(
crate::json_deser::deser_list_com_amazonaws_batch_volumes(
tokens,
)?,
);
}
"environment" => {
builder = builder.set_environment(
crate::json_deser::deser_list_com_amazonaws_batch_environment_variables(tokens)?
);
}
"mountPoints" => {
builder = builder.set_mount_points(
crate::json_deser::deser_list_com_amazonaws_batch_mount_points(
tokens,
)?,
);
}
"readonlyRootFilesystem" => {
builder = builder.set_readonly_root_filesystem(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"privileged" => {
builder = builder.set_privileged(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ulimits" => {
builder = builder.set_ulimits(
crate::json_deser::deser_list_com_amazonaws_batch_ulimits(
tokens,
)?,
);
}
"user" => {
builder = builder.set_user(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"instanceType" => {
builder = builder.set_instance_type(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"resourceRequirements" => {
builder = builder.set_resource_requirements(
crate::json_deser::deser_list_com_amazonaws_batch_resource_requirements(tokens)?
);
}
"linuxParameters" => {
builder = builder.set_linux_parameters(
crate::json_deser::deser_structure_crate_model_linux_parameters(tokens)?
);
}
"logConfiguration" => {
builder = builder.set_log_configuration(
crate::json_deser::deser_structure_crate_model_log_configuration(tokens)?
);
}
"secrets" => {
builder = builder.set_secrets(
crate::json_deser::deser_list_com_amazonaws_batch_secret_list(
tokens,
)?,
);
}
"networkConfiguration" => {
builder = builder.set_network_configuration(
crate::json_deser::deser_structure_crate_model_network_configuration(tokens)?
);
}
"fargatePlatformConfiguration" => {
builder = builder.set_fargate_platform_configuration(
crate::json_deser::deser_structure_crate_model_fargate_platform_configuration(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn job_role_arn(self, input: impl Into<String>) -> Self
pub fn job_role_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the IAM role that the container can assume for Amazon Web Services permissions. For more information, see IAM roles for tasks in the Amazon Elastic Container Service Developer Guide.
sourcepub fn set_job_role_arn(self, input: Option<String>) -> Self
pub fn set_job_role_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the IAM role that the container can assume for Amazon Web Services permissions. For more information, see IAM roles for tasks in the Amazon Elastic Container Service Developer Guide.
Examples found in repository?
2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797
pub(crate) fn deser_structure_crate_model_container_properties<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ContainerProperties>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::container_properties::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"image" => {
builder = builder.set_image(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"vcpus" => {
builder = builder.set_vcpus(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"memory" => {
builder = builder.set_memory(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"command" => {
builder = builder.set_command(
crate::json_deser::deser_list_com_amazonaws_batch_string_list(
tokens,
)?,
);
}
"jobRoleArn" => {
builder = builder.set_job_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"executionRoleArn" => {
builder = builder.set_execution_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"volumes" => {
builder = builder.set_volumes(
crate::json_deser::deser_list_com_amazonaws_batch_volumes(
tokens,
)?,
);
}
"environment" => {
builder = builder.set_environment(
crate::json_deser::deser_list_com_amazonaws_batch_environment_variables(tokens)?
);
}
"mountPoints" => {
builder = builder.set_mount_points(
crate::json_deser::deser_list_com_amazonaws_batch_mount_points(
tokens,
)?,
);
}
"readonlyRootFilesystem" => {
builder = builder.set_readonly_root_filesystem(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"privileged" => {
builder = builder.set_privileged(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ulimits" => {
builder = builder.set_ulimits(
crate::json_deser::deser_list_com_amazonaws_batch_ulimits(
tokens,
)?,
);
}
"user" => {
builder = builder.set_user(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"instanceType" => {
builder = builder.set_instance_type(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"resourceRequirements" => {
builder = builder.set_resource_requirements(
crate::json_deser::deser_list_com_amazonaws_batch_resource_requirements(tokens)?
);
}
"linuxParameters" => {
builder = builder.set_linux_parameters(
crate::json_deser::deser_structure_crate_model_linux_parameters(tokens)?
);
}
"logConfiguration" => {
builder = builder.set_log_configuration(
crate::json_deser::deser_structure_crate_model_log_configuration(tokens)?
);
}
"secrets" => {
builder = builder.set_secrets(
crate::json_deser::deser_list_com_amazonaws_batch_secret_list(
tokens,
)?,
);
}
"networkConfiguration" => {
builder = builder.set_network_configuration(
crate::json_deser::deser_structure_crate_model_network_configuration(tokens)?
);
}
"fargatePlatformConfiguration" => {
builder = builder.set_fargate_platform_configuration(
crate::json_deser::deser_structure_crate_model_fargate_platform_configuration(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn execution_role_arn(self, input: impl Into<String>) -> Self
pub fn execution_role_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the execution role that Batch can assume. For jobs that run on Fargate resources, you must provide an execution role. For more information, see Batch execution IAM role in the Batch User Guide.
sourcepub fn set_execution_role_arn(self, input: Option<String>) -> Self
pub fn set_execution_role_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the execution role that Batch can assume. For jobs that run on Fargate resources, you must provide an execution role. For more information, see Batch execution IAM role in the Batch User Guide.
Examples found in repository?
2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797
pub(crate) fn deser_structure_crate_model_container_properties<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ContainerProperties>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::container_properties::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"image" => {
builder = builder.set_image(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"vcpus" => {
builder = builder.set_vcpus(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"memory" => {
builder = builder.set_memory(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"command" => {
builder = builder.set_command(
crate::json_deser::deser_list_com_amazonaws_batch_string_list(
tokens,
)?,
);
}
"jobRoleArn" => {
builder = builder.set_job_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"executionRoleArn" => {
builder = builder.set_execution_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"volumes" => {
builder = builder.set_volumes(
crate::json_deser::deser_list_com_amazonaws_batch_volumes(
tokens,
)?,
);
}
"environment" => {
builder = builder.set_environment(
crate::json_deser::deser_list_com_amazonaws_batch_environment_variables(tokens)?
);
}
"mountPoints" => {
builder = builder.set_mount_points(
crate::json_deser::deser_list_com_amazonaws_batch_mount_points(
tokens,
)?,
);
}
"readonlyRootFilesystem" => {
builder = builder.set_readonly_root_filesystem(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"privileged" => {
builder = builder.set_privileged(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ulimits" => {
builder = builder.set_ulimits(
crate::json_deser::deser_list_com_amazonaws_batch_ulimits(
tokens,
)?,
);
}
"user" => {
builder = builder.set_user(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"instanceType" => {
builder = builder.set_instance_type(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"resourceRequirements" => {
builder = builder.set_resource_requirements(
crate::json_deser::deser_list_com_amazonaws_batch_resource_requirements(tokens)?
);
}
"linuxParameters" => {
builder = builder.set_linux_parameters(
crate::json_deser::deser_structure_crate_model_linux_parameters(tokens)?
);
}
"logConfiguration" => {
builder = builder.set_log_configuration(
crate::json_deser::deser_structure_crate_model_log_configuration(tokens)?
);
}
"secrets" => {
builder = builder.set_secrets(
crate::json_deser::deser_list_com_amazonaws_batch_secret_list(
tokens,
)?,
);
}
"networkConfiguration" => {
builder = builder.set_network_configuration(
crate::json_deser::deser_structure_crate_model_network_configuration(tokens)?
);
}
"fargatePlatformConfiguration" => {
builder = builder.set_fargate_platform_configuration(
crate::json_deser::deser_structure_crate_model_fargate_platform_configuration(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn volumes(self, input: Volume) -> Self
pub fn volumes(self, input: Volume) -> Self
Appends an item to volumes
.
To override the contents of this collection use set_volumes
.
A list of data volumes used in a job.
sourcepub fn set_volumes(self, input: Option<Vec<Volume>>) -> Self
pub fn set_volumes(self, input: Option<Vec<Volume>>) -> Self
A list of data volumes used in a job.
Examples found in repository?
2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797
pub(crate) fn deser_structure_crate_model_container_properties<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ContainerProperties>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::container_properties::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"image" => {
builder = builder.set_image(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"vcpus" => {
builder = builder.set_vcpus(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"memory" => {
builder = builder.set_memory(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"command" => {
builder = builder.set_command(
crate::json_deser::deser_list_com_amazonaws_batch_string_list(
tokens,
)?,
);
}
"jobRoleArn" => {
builder = builder.set_job_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"executionRoleArn" => {
builder = builder.set_execution_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"volumes" => {
builder = builder.set_volumes(
crate::json_deser::deser_list_com_amazonaws_batch_volumes(
tokens,
)?,
);
}
"environment" => {
builder = builder.set_environment(
crate::json_deser::deser_list_com_amazonaws_batch_environment_variables(tokens)?
);
}
"mountPoints" => {
builder = builder.set_mount_points(
crate::json_deser::deser_list_com_amazonaws_batch_mount_points(
tokens,
)?,
);
}
"readonlyRootFilesystem" => {
builder = builder.set_readonly_root_filesystem(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"privileged" => {
builder = builder.set_privileged(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ulimits" => {
builder = builder.set_ulimits(
crate::json_deser::deser_list_com_amazonaws_batch_ulimits(
tokens,
)?,
);
}
"user" => {
builder = builder.set_user(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"instanceType" => {
builder = builder.set_instance_type(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"resourceRequirements" => {
builder = builder.set_resource_requirements(
crate::json_deser::deser_list_com_amazonaws_batch_resource_requirements(tokens)?
);
}
"linuxParameters" => {
builder = builder.set_linux_parameters(
crate::json_deser::deser_structure_crate_model_linux_parameters(tokens)?
);
}
"logConfiguration" => {
builder = builder.set_log_configuration(
crate::json_deser::deser_structure_crate_model_log_configuration(tokens)?
);
}
"secrets" => {
builder = builder.set_secrets(
crate::json_deser::deser_list_com_amazonaws_batch_secret_list(
tokens,
)?,
);
}
"networkConfiguration" => {
builder = builder.set_network_configuration(
crate::json_deser::deser_structure_crate_model_network_configuration(tokens)?
);
}
"fargatePlatformConfiguration" => {
builder = builder.set_fargate_platform_configuration(
crate::json_deser::deser_structure_crate_model_fargate_platform_configuration(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn environment(self, input: KeyValuePair) -> Self
pub fn environment(self, input: KeyValuePair) -> Self
Appends an item to environment
.
To override the contents of this collection use set_environment
.
The environment variables to pass to a container. This parameter maps to Env
in the Create a container section of the Docker Remote API and the --env
option to docker run.
We don't recommend using plaintext environment variables for sensitive information, such as credential data.
Environment variables must not start with AWS_BATCH
; this naming convention is reserved for variables that are set by the Batch service.
sourcepub fn set_environment(self, input: Option<Vec<KeyValuePair>>) -> Self
pub fn set_environment(self, input: Option<Vec<KeyValuePair>>) -> Self
The environment variables to pass to a container. This parameter maps to Env
in the Create a container section of the Docker Remote API and the --env
option to docker run.
We don't recommend using plaintext environment variables for sensitive information, such as credential data.
Environment variables must not start with AWS_BATCH
; this naming convention is reserved for variables that are set by the Batch service.
Examples found in repository?
2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797
pub(crate) fn deser_structure_crate_model_container_properties<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ContainerProperties>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::container_properties::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"image" => {
builder = builder.set_image(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"vcpus" => {
builder = builder.set_vcpus(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"memory" => {
builder = builder.set_memory(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"command" => {
builder = builder.set_command(
crate::json_deser::deser_list_com_amazonaws_batch_string_list(
tokens,
)?,
);
}
"jobRoleArn" => {
builder = builder.set_job_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"executionRoleArn" => {
builder = builder.set_execution_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"volumes" => {
builder = builder.set_volumes(
crate::json_deser::deser_list_com_amazonaws_batch_volumes(
tokens,
)?,
);
}
"environment" => {
builder = builder.set_environment(
crate::json_deser::deser_list_com_amazonaws_batch_environment_variables(tokens)?
);
}
"mountPoints" => {
builder = builder.set_mount_points(
crate::json_deser::deser_list_com_amazonaws_batch_mount_points(
tokens,
)?,
);
}
"readonlyRootFilesystem" => {
builder = builder.set_readonly_root_filesystem(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"privileged" => {
builder = builder.set_privileged(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ulimits" => {
builder = builder.set_ulimits(
crate::json_deser::deser_list_com_amazonaws_batch_ulimits(
tokens,
)?,
);
}
"user" => {
builder = builder.set_user(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"instanceType" => {
builder = builder.set_instance_type(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"resourceRequirements" => {
builder = builder.set_resource_requirements(
crate::json_deser::deser_list_com_amazonaws_batch_resource_requirements(tokens)?
);
}
"linuxParameters" => {
builder = builder.set_linux_parameters(
crate::json_deser::deser_structure_crate_model_linux_parameters(tokens)?
);
}
"logConfiguration" => {
builder = builder.set_log_configuration(
crate::json_deser::deser_structure_crate_model_log_configuration(tokens)?
);
}
"secrets" => {
builder = builder.set_secrets(
crate::json_deser::deser_list_com_amazonaws_batch_secret_list(
tokens,
)?,
);
}
"networkConfiguration" => {
builder = builder.set_network_configuration(
crate::json_deser::deser_structure_crate_model_network_configuration(tokens)?
);
}
"fargatePlatformConfiguration" => {
builder = builder.set_fargate_platform_configuration(
crate::json_deser::deser_structure_crate_model_fargate_platform_configuration(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn mount_points(self, input: MountPoint) -> Self
pub fn mount_points(self, input: MountPoint) -> Self
Appends an item to mount_points
.
To override the contents of this collection use set_mount_points
.
The mount points for data volumes in your container. This parameter maps to Volumes
in the Create a container section of the Docker Remote API and the --volume
option to docker run.
sourcepub fn set_mount_points(self, input: Option<Vec<MountPoint>>) -> Self
pub fn set_mount_points(self, input: Option<Vec<MountPoint>>) -> Self
The mount points for data volumes in your container. This parameter maps to Volumes
in the Create a container section of the Docker Remote API and the --volume
option to docker run.
Examples found in repository?
2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797
pub(crate) fn deser_structure_crate_model_container_properties<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ContainerProperties>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::container_properties::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"image" => {
builder = builder.set_image(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"vcpus" => {
builder = builder.set_vcpus(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"memory" => {
builder = builder.set_memory(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"command" => {
builder = builder.set_command(
crate::json_deser::deser_list_com_amazonaws_batch_string_list(
tokens,
)?,
);
}
"jobRoleArn" => {
builder = builder.set_job_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"executionRoleArn" => {
builder = builder.set_execution_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"volumes" => {
builder = builder.set_volumes(
crate::json_deser::deser_list_com_amazonaws_batch_volumes(
tokens,
)?,
);
}
"environment" => {
builder = builder.set_environment(
crate::json_deser::deser_list_com_amazonaws_batch_environment_variables(tokens)?
);
}
"mountPoints" => {
builder = builder.set_mount_points(
crate::json_deser::deser_list_com_amazonaws_batch_mount_points(
tokens,
)?,
);
}
"readonlyRootFilesystem" => {
builder = builder.set_readonly_root_filesystem(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"privileged" => {
builder = builder.set_privileged(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ulimits" => {
builder = builder.set_ulimits(
crate::json_deser::deser_list_com_amazonaws_batch_ulimits(
tokens,
)?,
);
}
"user" => {
builder = builder.set_user(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"instanceType" => {
builder = builder.set_instance_type(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"resourceRequirements" => {
builder = builder.set_resource_requirements(
crate::json_deser::deser_list_com_amazonaws_batch_resource_requirements(tokens)?
);
}
"linuxParameters" => {
builder = builder.set_linux_parameters(
crate::json_deser::deser_structure_crate_model_linux_parameters(tokens)?
);
}
"logConfiguration" => {
builder = builder.set_log_configuration(
crate::json_deser::deser_structure_crate_model_log_configuration(tokens)?
);
}
"secrets" => {
builder = builder.set_secrets(
crate::json_deser::deser_list_com_amazonaws_batch_secret_list(
tokens,
)?,
);
}
"networkConfiguration" => {
builder = builder.set_network_configuration(
crate::json_deser::deser_structure_crate_model_network_configuration(tokens)?
);
}
"fargatePlatformConfiguration" => {
builder = builder.set_fargate_platform_configuration(
crate::json_deser::deser_structure_crate_model_fargate_platform_configuration(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn readonly_root_filesystem(self, input: bool) -> Self
pub fn readonly_root_filesystem(self, input: bool) -> Self
When this parameter is true, the container is given read-only access to its root file system. This parameter maps to ReadonlyRootfs
in the Create a container section of the Docker Remote API and the --read-only
option to docker run
.
sourcepub fn set_readonly_root_filesystem(self, input: Option<bool>) -> Self
pub fn set_readonly_root_filesystem(self, input: Option<bool>) -> Self
When this parameter is true, the container is given read-only access to its root file system. This parameter maps to ReadonlyRootfs
in the Create a container section of the Docker Remote API and the --read-only
option to docker run
.
Examples found in repository?
2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797
pub(crate) fn deser_structure_crate_model_container_properties<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ContainerProperties>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::container_properties::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"image" => {
builder = builder.set_image(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"vcpus" => {
builder = builder.set_vcpus(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"memory" => {
builder = builder.set_memory(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"command" => {
builder = builder.set_command(
crate::json_deser::deser_list_com_amazonaws_batch_string_list(
tokens,
)?,
);
}
"jobRoleArn" => {
builder = builder.set_job_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"executionRoleArn" => {
builder = builder.set_execution_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"volumes" => {
builder = builder.set_volumes(
crate::json_deser::deser_list_com_amazonaws_batch_volumes(
tokens,
)?,
);
}
"environment" => {
builder = builder.set_environment(
crate::json_deser::deser_list_com_amazonaws_batch_environment_variables(tokens)?
);
}
"mountPoints" => {
builder = builder.set_mount_points(
crate::json_deser::deser_list_com_amazonaws_batch_mount_points(
tokens,
)?,
);
}
"readonlyRootFilesystem" => {
builder = builder.set_readonly_root_filesystem(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"privileged" => {
builder = builder.set_privileged(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ulimits" => {
builder = builder.set_ulimits(
crate::json_deser::deser_list_com_amazonaws_batch_ulimits(
tokens,
)?,
);
}
"user" => {
builder = builder.set_user(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"instanceType" => {
builder = builder.set_instance_type(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"resourceRequirements" => {
builder = builder.set_resource_requirements(
crate::json_deser::deser_list_com_amazonaws_batch_resource_requirements(tokens)?
);
}
"linuxParameters" => {
builder = builder.set_linux_parameters(
crate::json_deser::deser_structure_crate_model_linux_parameters(tokens)?
);
}
"logConfiguration" => {
builder = builder.set_log_configuration(
crate::json_deser::deser_structure_crate_model_log_configuration(tokens)?
);
}
"secrets" => {
builder = builder.set_secrets(
crate::json_deser::deser_list_com_amazonaws_batch_secret_list(
tokens,
)?,
);
}
"networkConfiguration" => {
builder = builder.set_network_configuration(
crate::json_deser::deser_structure_crate_model_network_configuration(tokens)?
);
}
"fargatePlatformConfiguration" => {
builder = builder.set_fargate_platform_configuration(
crate::json_deser::deser_structure_crate_model_fargate_platform_configuration(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn privileged(self, input: bool) -> Self
pub fn privileged(self, input: bool) -> Self
When this parameter is true, the container is given elevated permissions on the host container instance (similar to the root
user). This parameter maps to Privileged
in the Create a container section of the Docker Remote API and the --privileged
option to docker run. The default value is false.
This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided, or specified as false.
sourcepub fn set_privileged(self, input: Option<bool>) -> Self
pub fn set_privileged(self, input: Option<bool>) -> Self
When this parameter is true, the container is given elevated permissions on the host container instance (similar to the root
user). This parameter maps to Privileged
in the Create a container section of the Docker Remote API and the --privileged
option to docker run. The default value is false.
This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided, or specified as false.
Examples found in repository?
2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797
pub(crate) fn deser_structure_crate_model_container_properties<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ContainerProperties>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::container_properties::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"image" => {
builder = builder.set_image(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"vcpus" => {
builder = builder.set_vcpus(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"memory" => {
builder = builder.set_memory(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"command" => {
builder = builder.set_command(
crate::json_deser::deser_list_com_amazonaws_batch_string_list(
tokens,
)?,
);
}
"jobRoleArn" => {
builder = builder.set_job_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"executionRoleArn" => {
builder = builder.set_execution_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"volumes" => {
builder = builder.set_volumes(
crate::json_deser::deser_list_com_amazonaws_batch_volumes(
tokens,
)?,
);
}
"environment" => {
builder = builder.set_environment(
crate::json_deser::deser_list_com_amazonaws_batch_environment_variables(tokens)?
);
}
"mountPoints" => {
builder = builder.set_mount_points(
crate::json_deser::deser_list_com_amazonaws_batch_mount_points(
tokens,
)?,
);
}
"readonlyRootFilesystem" => {
builder = builder.set_readonly_root_filesystem(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"privileged" => {
builder = builder.set_privileged(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ulimits" => {
builder = builder.set_ulimits(
crate::json_deser::deser_list_com_amazonaws_batch_ulimits(
tokens,
)?,
);
}
"user" => {
builder = builder.set_user(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"instanceType" => {
builder = builder.set_instance_type(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"resourceRequirements" => {
builder = builder.set_resource_requirements(
crate::json_deser::deser_list_com_amazonaws_batch_resource_requirements(tokens)?
);
}
"linuxParameters" => {
builder = builder.set_linux_parameters(
crate::json_deser::deser_structure_crate_model_linux_parameters(tokens)?
);
}
"logConfiguration" => {
builder = builder.set_log_configuration(
crate::json_deser::deser_structure_crate_model_log_configuration(tokens)?
);
}
"secrets" => {
builder = builder.set_secrets(
crate::json_deser::deser_list_com_amazonaws_batch_secret_list(
tokens,
)?,
);
}
"networkConfiguration" => {
builder = builder.set_network_configuration(
crate::json_deser::deser_structure_crate_model_network_configuration(tokens)?
);
}
"fargatePlatformConfiguration" => {
builder = builder.set_fargate_platform_configuration(
crate::json_deser::deser_structure_crate_model_fargate_platform_configuration(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn ulimits(self, input: Ulimit) -> Self
pub fn ulimits(self, input: Ulimit) -> Self
Appends an item to ulimits
.
To override the contents of this collection use set_ulimits
.
A list of ulimits
to set in the container. This parameter maps to Ulimits
in the Create a container section of the Docker Remote API and the --ulimit
option to docker run.
This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided.
sourcepub fn set_ulimits(self, input: Option<Vec<Ulimit>>) -> Self
pub fn set_ulimits(self, input: Option<Vec<Ulimit>>) -> Self
A list of ulimits
to set in the container. This parameter maps to Ulimits
in the Create a container section of the Docker Remote API and the --ulimit
option to docker run.
This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided.
Examples found in repository?
2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797
pub(crate) fn deser_structure_crate_model_container_properties<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ContainerProperties>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::container_properties::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"image" => {
builder = builder.set_image(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"vcpus" => {
builder = builder.set_vcpus(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"memory" => {
builder = builder.set_memory(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"command" => {
builder = builder.set_command(
crate::json_deser::deser_list_com_amazonaws_batch_string_list(
tokens,
)?,
);
}
"jobRoleArn" => {
builder = builder.set_job_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"executionRoleArn" => {
builder = builder.set_execution_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"volumes" => {
builder = builder.set_volumes(
crate::json_deser::deser_list_com_amazonaws_batch_volumes(
tokens,
)?,
);
}
"environment" => {
builder = builder.set_environment(
crate::json_deser::deser_list_com_amazonaws_batch_environment_variables(tokens)?
);
}
"mountPoints" => {
builder = builder.set_mount_points(
crate::json_deser::deser_list_com_amazonaws_batch_mount_points(
tokens,
)?,
);
}
"readonlyRootFilesystem" => {
builder = builder.set_readonly_root_filesystem(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"privileged" => {
builder = builder.set_privileged(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ulimits" => {
builder = builder.set_ulimits(
crate::json_deser::deser_list_com_amazonaws_batch_ulimits(
tokens,
)?,
);
}
"user" => {
builder = builder.set_user(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"instanceType" => {
builder = builder.set_instance_type(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"resourceRequirements" => {
builder = builder.set_resource_requirements(
crate::json_deser::deser_list_com_amazonaws_batch_resource_requirements(tokens)?
);
}
"linuxParameters" => {
builder = builder.set_linux_parameters(
crate::json_deser::deser_structure_crate_model_linux_parameters(tokens)?
);
}
"logConfiguration" => {
builder = builder.set_log_configuration(
crate::json_deser::deser_structure_crate_model_log_configuration(tokens)?
);
}
"secrets" => {
builder = builder.set_secrets(
crate::json_deser::deser_list_com_amazonaws_batch_secret_list(
tokens,
)?,
);
}
"networkConfiguration" => {
builder = builder.set_network_configuration(
crate::json_deser::deser_structure_crate_model_network_configuration(tokens)?
);
}
"fargatePlatformConfiguration" => {
builder = builder.set_fargate_platform_configuration(
crate::json_deser::deser_structure_crate_model_fargate_platform_configuration(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn user(self, input: impl Into<String>) -> Self
pub fn user(self, input: impl Into<String>) -> Self
The user name to use inside the container. This parameter maps to User
in the Create a container section of the Docker Remote API and the --user
option to docker run.
sourcepub fn set_user(self, input: Option<String>) -> Self
pub fn set_user(self, input: Option<String>) -> Self
The user name to use inside the container. This parameter maps to User
in the Create a container section of the Docker Remote API and the --user
option to docker run.
Examples found in repository?
2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797
pub(crate) fn deser_structure_crate_model_container_properties<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ContainerProperties>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::container_properties::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"image" => {
builder = builder.set_image(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"vcpus" => {
builder = builder.set_vcpus(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"memory" => {
builder = builder.set_memory(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"command" => {
builder = builder.set_command(
crate::json_deser::deser_list_com_amazonaws_batch_string_list(
tokens,
)?,
);
}
"jobRoleArn" => {
builder = builder.set_job_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"executionRoleArn" => {
builder = builder.set_execution_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"volumes" => {
builder = builder.set_volumes(
crate::json_deser::deser_list_com_amazonaws_batch_volumes(
tokens,
)?,
);
}
"environment" => {
builder = builder.set_environment(
crate::json_deser::deser_list_com_amazonaws_batch_environment_variables(tokens)?
);
}
"mountPoints" => {
builder = builder.set_mount_points(
crate::json_deser::deser_list_com_amazonaws_batch_mount_points(
tokens,
)?,
);
}
"readonlyRootFilesystem" => {
builder = builder.set_readonly_root_filesystem(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"privileged" => {
builder = builder.set_privileged(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ulimits" => {
builder = builder.set_ulimits(
crate::json_deser::deser_list_com_amazonaws_batch_ulimits(
tokens,
)?,
);
}
"user" => {
builder = builder.set_user(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"instanceType" => {
builder = builder.set_instance_type(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"resourceRequirements" => {
builder = builder.set_resource_requirements(
crate::json_deser::deser_list_com_amazonaws_batch_resource_requirements(tokens)?
);
}
"linuxParameters" => {
builder = builder.set_linux_parameters(
crate::json_deser::deser_structure_crate_model_linux_parameters(tokens)?
);
}
"logConfiguration" => {
builder = builder.set_log_configuration(
crate::json_deser::deser_structure_crate_model_log_configuration(tokens)?
);
}
"secrets" => {
builder = builder.set_secrets(
crate::json_deser::deser_list_com_amazonaws_batch_secret_list(
tokens,
)?,
);
}
"networkConfiguration" => {
builder = builder.set_network_configuration(
crate::json_deser::deser_structure_crate_model_network_configuration(tokens)?
);
}
"fargatePlatformConfiguration" => {
builder = builder.set_fargate_platform_configuration(
crate::json_deser::deser_structure_crate_model_fargate_platform_configuration(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn instance_type(self, input: impl Into<String>) -> Self
pub fn instance_type(self, input: impl Into<String>) -> Self
The instance type to use for a multi-node parallel job. All node groups in a multi-node parallel job must use the same instance type.
This parameter isn't applicable to single-node container jobs or jobs that run on Fargate resources, and shouldn't be provided.
sourcepub fn set_instance_type(self, input: Option<String>) -> Self
pub fn set_instance_type(self, input: Option<String>) -> Self
The instance type to use for a multi-node parallel job. All node groups in a multi-node parallel job must use the same instance type.
This parameter isn't applicable to single-node container jobs or jobs that run on Fargate resources, and shouldn't be provided.
Examples found in repository?
2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797
pub(crate) fn deser_structure_crate_model_container_properties<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ContainerProperties>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::container_properties::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"image" => {
builder = builder.set_image(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"vcpus" => {
builder = builder.set_vcpus(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"memory" => {
builder = builder.set_memory(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"command" => {
builder = builder.set_command(
crate::json_deser::deser_list_com_amazonaws_batch_string_list(
tokens,
)?,
);
}
"jobRoleArn" => {
builder = builder.set_job_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"executionRoleArn" => {
builder = builder.set_execution_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"volumes" => {
builder = builder.set_volumes(
crate::json_deser::deser_list_com_amazonaws_batch_volumes(
tokens,
)?,
);
}
"environment" => {
builder = builder.set_environment(
crate::json_deser::deser_list_com_amazonaws_batch_environment_variables(tokens)?
);
}
"mountPoints" => {
builder = builder.set_mount_points(
crate::json_deser::deser_list_com_amazonaws_batch_mount_points(
tokens,
)?,
);
}
"readonlyRootFilesystem" => {
builder = builder.set_readonly_root_filesystem(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"privileged" => {
builder = builder.set_privileged(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ulimits" => {
builder = builder.set_ulimits(
crate::json_deser::deser_list_com_amazonaws_batch_ulimits(
tokens,
)?,
);
}
"user" => {
builder = builder.set_user(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"instanceType" => {
builder = builder.set_instance_type(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"resourceRequirements" => {
builder = builder.set_resource_requirements(
crate::json_deser::deser_list_com_amazonaws_batch_resource_requirements(tokens)?
);
}
"linuxParameters" => {
builder = builder.set_linux_parameters(
crate::json_deser::deser_structure_crate_model_linux_parameters(tokens)?
);
}
"logConfiguration" => {
builder = builder.set_log_configuration(
crate::json_deser::deser_structure_crate_model_log_configuration(tokens)?
);
}
"secrets" => {
builder = builder.set_secrets(
crate::json_deser::deser_list_com_amazonaws_batch_secret_list(
tokens,
)?,
);
}
"networkConfiguration" => {
builder = builder.set_network_configuration(
crate::json_deser::deser_structure_crate_model_network_configuration(tokens)?
);
}
"fargatePlatformConfiguration" => {
builder = builder.set_fargate_platform_configuration(
crate::json_deser::deser_structure_crate_model_fargate_platform_configuration(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn resource_requirements(self, input: ResourceRequirement) -> Self
pub fn resource_requirements(self, input: ResourceRequirement) -> Self
Appends an item to resource_requirements
.
To override the contents of this collection use set_resource_requirements
.
The type and amount of resources to assign to a container. The supported resources include GPU
, MEMORY
, and VCPU
.
sourcepub fn set_resource_requirements(
self,
input: Option<Vec<ResourceRequirement>>
) -> Self
pub fn set_resource_requirements(
self,
input: Option<Vec<ResourceRequirement>>
) -> Self
The type and amount of resources to assign to a container. The supported resources include GPU
, MEMORY
, and VCPU
.
Examples found in repository?
2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797
pub(crate) fn deser_structure_crate_model_container_properties<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ContainerProperties>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::container_properties::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"image" => {
builder = builder.set_image(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"vcpus" => {
builder = builder.set_vcpus(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"memory" => {
builder = builder.set_memory(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"command" => {
builder = builder.set_command(
crate::json_deser::deser_list_com_amazonaws_batch_string_list(
tokens,
)?,
);
}
"jobRoleArn" => {
builder = builder.set_job_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"executionRoleArn" => {
builder = builder.set_execution_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"volumes" => {
builder = builder.set_volumes(
crate::json_deser::deser_list_com_amazonaws_batch_volumes(
tokens,
)?,
);
}
"environment" => {
builder = builder.set_environment(
crate::json_deser::deser_list_com_amazonaws_batch_environment_variables(tokens)?
);
}
"mountPoints" => {
builder = builder.set_mount_points(
crate::json_deser::deser_list_com_amazonaws_batch_mount_points(
tokens,
)?,
);
}
"readonlyRootFilesystem" => {
builder = builder.set_readonly_root_filesystem(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"privileged" => {
builder = builder.set_privileged(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ulimits" => {
builder = builder.set_ulimits(
crate::json_deser::deser_list_com_amazonaws_batch_ulimits(
tokens,
)?,
);
}
"user" => {
builder = builder.set_user(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"instanceType" => {
builder = builder.set_instance_type(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"resourceRequirements" => {
builder = builder.set_resource_requirements(
crate::json_deser::deser_list_com_amazonaws_batch_resource_requirements(tokens)?
);
}
"linuxParameters" => {
builder = builder.set_linux_parameters(
crate::json_deser::deser_structure_crate_model_linux_parameters(tokens)?
);
}
"logConfiguration" => {
builder = builder.set_log_configuration(
crate::json_deser::deser_structure_crate_model_log_configuration(tokens)?
);
}
"secrets" => {
builder = builder.set_secrets(
crate::json_deser::deser_list_com_amazonaws_batch_secret_list(
tokens,
)?,
);
}
"networkConfiguration" => {
builder = builder.set_network_configuration(
crate::json_deser::deser_structure_crate_model_network_configuration(tokens)?
);
}
"fargatePlatformConfiguration" => {
builder = builder.set_fargate_platform_configuration(
crate::json_deser::deser_structure_crate_model_fargate_platform_configuration(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn linux_parameters(self, input: LinuxParameters) -> Self
pub fn linux_parameters(self, input: LinuxParameters) -> Self
Linux-specific modifications that are applied to the container, such as details for device mappings.
sourcepub fn set_linux_parameters(self, input: Option<LinuxParameters>) -> Self
pub fn set_linux_parameters(self, input: Option<LinuxParameters>) -> Self
Linux-specific modifications that are applied to the container, such as details for device mappings.
Examples found in repository?
2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797
pub(crate) fn deser_structure_crate_model_container_properties<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ContainerProperties>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::container_properties::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"image" => {
builder = builder.set_image(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"vcpus" => {
builder = builder.set_vcpus(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"memory" => {
builder = builder.set_memory(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"command" => {
builder = builder.set_command(
crate::json_deser::deser_list_com_amazonaws_batch_string_list(
tokens,
)?,
);
}
"jobRoleArn" => {
builder = builder.set_job_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"executionRoleArn" => {
builder = builder.set_execution_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"volumes" => {
builder = builder.set_volumes(
crate::json_deser::deser_list_com_amazonaws_batch_volumes(
tokens,
)?,
);
}
"environment" => {
builder = builder.set_environment(
crate::json_deser::deser_list_com_amazonaws_batch_environment_variables(tokens)?
);
}
"mountPoints" => {
builder = builder.set_mount_points(
crate::json_deser::deser_list_com_amazonaws_batch_mount_points(
tokens,
)?,
);
}
"readonlyRootFilesystem" => {
builder = builder.set_readonly_root_filesystem(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"privileged" => {
builder = builder.set_privileged(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ulimits" => {
builder = builder.set_ulimits(
crate::json_deser::deser_list_com_amazonaws_batch_ulimits(
tokens,
)?,
);
}
"user" => {
builder = builder.set_user(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"instanceType" => {
builder = builder.set_instance_type(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"resourceRequirements" => {
builder = builder.set_resource_requirements(
crate::json_deser::deser_list_com_amazonaws_batch_resource_requirements(tokens)?
);
}
"linuxParameters" => {
builder = builder.set_linux_parameters(
crate::json_deser::deser_structure_crate_model_linux_parameters(tokens)?
);
}
"logConfiguration" => {
builder = builder.set_log_configuration(
crate::json_deser::deser_structure_crate_model_log_configuration(tokens)?
);
}
"secrets" => {
builder = builder.set_secrets(
crate::json_deser::deser_list_com_amazonaws_batch_secret_list(
tokens,
)?,
);
}
"networkConfiguration" => {
builder = builder.set_network_configuration(
crate::json_deser::deser_structure_crate_model_network_configuration(tokens)?
);
}
"fargatePlatformConfiguration" => {
builder = builder.set_fargate_platform_configuration(
crate::json_deser::deser_structure_crate_model_fargate_platform_configuration(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn log_configuration(self, input: LogConfiguration) -> Self
pub fn log_configuration(self, input: LogConfiguration) -> Self
The log configuration specification for the container.
This parameter maps to LogConfig
in the Create a container section of the Docker Remote API and the --log-driver
option to docker run. By default, containers use the same logging driver that the Docker daemon uses. However the container might use a different logging driver than the Docker daemon by specifying a log driver with this parameter in the container definition. To use a different logging driver for a container, the log system must be configured properly on the container instance (or on a different log server for remote logging options). For more information on the options for different supported log drivers, see Configure logging drivers in the Docker documentation.
Batch currently supports a subset of the logging drivers available to the Docker daemon (shown in the LogConfiguration
data type).
This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log into your container instance and run the following command: sudo docker version | grep "Server API version"
The Amazon ECS container agent running on a container instance must register the logging drivers available on that instance with the ECS_AVAILABLE_LOGGING_DRIVERS
environment variable before containers placed on that instance can use these log configuration options. For more information, see Amazon ECS container agent configuration in the Amazon Elastic Container Service Developer Guide.
sourcepub fn set_log_configuration(self, input: Option<LogConfiguration>) -> Self
pub fn set_log_configuration(self, input: Option<LogConfiguration>) -> Self
The log configuration specification for the container.
This parameter maps to LogConfig
in the Create a container section of the Docker Remote API and the --log-driver
option to docker run. By default, containers use the same logging driver that the Docker daemon uses. However the container might use a different logging driver than the Docker daemon by specifying a log driver with this parameter in the container definition. To use a different logging driver for a container, the log system must be configured properly on the container instance (or on a different log server for remote logging options). For more information on the options for different supported log drivers, see Configure logging drivers in the Docker documentation.
Batch currently supports a subset of the logging drivers available to the Docker daemon (shown in the LogConfiguration
data type).
This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log into your container instance and run the following command: sudo docker version | grep "Server API version"
The Amazon ECS container agent running on a container instance must register the logging drivers available on that instance with the ECS_AVAILABLE_LOGGING_DRIVERS
environment variable before containers placed on that instance can use these log configuration options. For more information, see Amazon ECS container agent configuration in the Amazon Elastic Container Service Developer Guide.
Examples found in repository?
2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797
pub(crate) fn deser_structure_crate_model_container_properties<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ContainerProperties>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::container_properties::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"image" => {
builder = builder.set_image(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"vcpus" => {
builder = builder.set_vcpus(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"memory" => {
builder = builder.set_memory(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"command" => {
builder = builder.set_command(
crate::json_deser::deser_list_com_amazonaws_batch_string_list(
tokens,
)?,
);
}
"jobRoleArn" => {
builder = builder.set_job_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"executionRoleArn" => {
builder = builder.set_execution_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"volumes" => {
builder = builder.set_volumes(
crate::json_deser::deser_list_com_amazonaws_batch_volumes(
tokens,
)?,
);
}
"environment" => {
builder = builder.set_environment(
crate::json_deser::deser_list_com_amazonaws_batch_environment_variables(tokens)?
);
}
"mountPoints" => {
builder = builder.set_mount_points(
crate::json_deser::deser_list_com_amazonaws_batch_mount_points(
tokens,
)?,
);
}
"readonlyRootFilesystem" => {
builder = builder.set_readonly_root_filesystem(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"privileged" => {
builder = builder.set_privileged(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ulimits" => {
builder = builder.set_ulimits(
crate::json_deser::deser_list_com_amazonaws_batch_ulimits(
tokens,
)?,
);
}
"user" => {
builder = builder.set_user(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"instanceType" => {
builder = builder.set_instance_type(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"resourceRequirements" => {
builder = builder.set_resource_requirements(
crate::json_deser::deser_list_com_amazonaws_batch_resource_requirements(tokens)?
);
}
"linuxParameters" => {
builder = builder.set_linux_parameters(
crate::json_deser::deser_structure_crate_model_linux_parameters(tokens)?
);
}
"logConfiguration" => {
builder = builder.set_log_configuration(
crate::json_deser::deser_structure_crate_model_log_configuration(tokens)?
);
}
"secrets" => {
builder = builder.set_secrets(
crate::json_deser::deser_list_com_amazonaws_batch_secret_list(
tokens,
)?,
);
}
"networkConfiguration" => {
builder = builder.set_network_configuration(
crate::json_deser::deser_structure_crate_model_network_configuration(tokens)?
);
}
"fargatePlatformConfiguration" => {
builder = builder.set_fargate_platform_configuration(
crate::json_deser::deser_structure_crate_model_fargate_platform_configuration(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn secrets(self, input: Secret) -> Self
pub fn secrets(self, input: Secret) -> Self
Appends an item to secrets
.
To override the contents of this collection use set_secrets
.
The secrets for the container. For more information, see Specifying sensitive data in the Batch User Guide.
sourcepub fn set_secrets(self, input: Option<Vec<Secret>>) -> Self
pub fn set_secrets(self, input: Option<Vec<Secret>>) -> Self
The secrets for the container. For more information, see Specifying sensitive data in the Batch User Guide.
Examples found in repository?
2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797
pub(crate) fn deser_structure_crate_model_container_properties<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ContainerProperties>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::container_properties::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"image" => {
builder = builder.set_image(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"vcpus" => {
builder = builder.set_vcpus(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"memory" => {
builder = builder.set_memory(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"command" => {
builder = builder.set_command(
crate::json_deser::deser_list_com_amazonaws_batch_string_list(
tokens,
)?,
);
}
"jobRoleArn" => {
builder = builder.set_job_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"executionRoleArn" => {
builder = builder.set_execution_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"volumes" => {
builder = builder.set_volumes(
crate::json_deser::deser_list_com_amazonaws_batch_volumes(
tokens,
)?,
);
}
"environment" => {
builder = builder.set_environment(
crate::json_deser::deser_list_com_amazonaws_batch_environment_variables(tokens)?
);
}
"mountPoints" => {
builder = builder.set_mount_points(
crate::json_deser::deser_list_com_amazonaws_batch_mount_points(
tokens,
)?,
);
}
"readonlyRootFilesystem" => {
builder = builder.set_readonly_root_filesystem(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"privileged" => {
builder = builder.set_privileged(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ulimits" => {
builder = builder.set_ulimits(
crate::json_deser::deser_list_com_amazonaws_batch_ulimits(
tokens,
)?,
);
}
"user" => {
builder = builder.set_user(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"instanceType" => {
builder = builder.set_instance_type(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"resourceRequirements" => {
builder = builder.set_resource_requirements(
crate::json_deser::deser_list_com_amazonaws_batch_resource_requirements(tokens)?
);
}
"linuxParameters" => {
builder = builder.set_linux_parameters(
crate::json_deser::deser_structure_crate_model_linux_parameters(tokens)?
);
}
"logConfiguration" => {
builder = builder.set_log_configuration(
crate::json_deser::deser_structure_crate_model_log_configuration(tokens)?
);
}
"secrets" => {
builder = builder.set_secrets(
crate::json_deser::deser_list_com_amazonaws_batch_secret_list(
tokens,
)?,
);
}
"networkConfiguration" => {
builder = builder.set_network_configuration(
crate::json_deser::deser_structure_crate_model_network_configuration(tokens)?
);
}
"fargatePlatformConfiguration" => {
builder = builder.set_fargate_platform_configuration(
crate::json_deser::deser_structure_crate_model_fargate_platform_configuration(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn network_configuration(self, input: NetworkConfiguration) -> Self
pub fn network_configuration(self, input: NetworkConfiguration) -> Self
The network configuration for jobs that are running on Fargate resources. Jobs that are running on EC2 resources must not specify this parameter.
sourcepub fn set_network_configuration(
self,
input: Option<NetworkConfiguration>
) -> Self
pub fn set_network_configuration(
self,
input: Option<NetworkConfiguration>
) -> Self
The network configuration for jobs that are running on Fargate resources. Jobs that are running on EC2 resources must not specify this parameter.
Examples found in repository?
2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797
pub(crate) fn deser_structure_crate_model_container_properties<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ContainerProperties>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::container_properties::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"image" => {
builder = builder.set_image(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"vcpus" => {
builder = builder.set_vcpus(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"memory" => {
builder = builder.set_memory(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"command" => {
builder = builder.set_command(
crate::json_deser::deser_list_com_amazonaws_batch_string_list(
tokens,
)?,
);
}
"jobRoleArn" => {
builder = builder.set_job_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"executionRoleArn" => {
builder = builder.set_execution_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"volumes" => {
builder = builder.set_volumes(
crate::json_deser::deser_list_com_amazonaws_batch_volumes(
tokens,
)?,
);
}
"environment" => {
builder = builder.set_environment(
crate::json_deser::deser_list_com_amazonaws_batch_environment_variables(tokens)?
);
}
"mountPoints" => {
builder = builder.set_mount_points(
crate::json_deser::deser_list_com_amazonaws_batch_mount_points(
tokens,
)?,
);
}
"readonlyRootFilesystem" => {
builder = builder.set_readonly_root_filesystem(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"privileged" => {
builder = builder.set_privileged(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ulimits" => {
builder = builder.set_ulimits(
crate::json_deser::deser_list_com_amazonaws_batch_ulimits(
tokens,
)?,
);
}
"user" => {
builder = builder.set_user(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"instanceType" => {
builder = builder.set_instance_type(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"resourceRequirements" => {
builder = builder.set_resource_requirements(
crate::json_deser::deser_list_com_amazonaws_batch_resource_requirements(tokens)?
);
}
"linuxParameters" => {
builder = builder.set_linux_parameters(
crate::json_deser::deser_structure_crate_model_linux_parameters(tokens)?
);
}
"logConfiguration" => {
builder = builder.set_log_configuration(
crate::json_deser::deser_structure_crate_model_log_configuration(tokens)?
);
}
"secrets" => {
builder = builder.set_secrets(
crate::json_deser::deser_list_com_amazonaws_batch_secret_list(
tokens,
)?,
);
}
"networkConfiguration" => {
builder = builder.set_network_configuration(
crate::json_deser::deser_structure_crate_model_network_configuration(tokens)?
);
}
"fargatePlatformConfiguration" => {
builder = builder.set_fargate_platform_configuration(
crate::json_deser::deser_structure_crate_model_fargate_platform_configuration(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn fargate_platform_configuration(
self,
input: FargatePlatformConfiguration
) -> Self
pub fn fargate_platform_configuration(
self,
input: FargatePlatformConfiguration
) -> Self
The platform configuration for jobs that are running on Fargate resources. Jobs that are running on EC2 resources must not specify this parameter.
sourcepub fn set_fargate_platform_configuration(
self,
input: Option<FargatePlatformConfiguration>
) -> Self
pub fn set_fargate_platform_configuration(
self,
input: Option<FargatePlatformConfiguration>
) -> Self
The platform configuration for jobs that are running on Fargate resources. Jobs that are running on EC2 resources must not specify this parameter.
Examples found in repository?
2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797
pub(crate) fn deser_structure_crate_model_container_properties<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ContainerProperties>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::container_properties::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"image" => {
builder = builder.set_image(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"vcpus" => {
builder = builder.set_vcpus(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"memory" => {
builder = builder.set_memory(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"command" => {
builder = builder.set_command(
crate::json_deser::deser_list_com_amazonaws_batch_string_list(
tokens,
)?,
);
}
"jobRoleArn" => {
builder = builder.set_job_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"executionRoleArn" => {
builder = builder.set_execution_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"volumes" => {
builder = builder.set_volumes(
crate::json_deser::deser_list_com_amazonaws_batch_volumes(
tokens,
)?,
);
}
"environment" => {
builder = builder.set_environment(
crate::json_deser::deser_list_com_amazonaws_batch_environment_variables(tokens)?
);
}
"mountPoints" => {
builder = builder.set_mount_points(
crate::json_deser::deser_list_com_amazonaws_batch_mount_points(
tokens,
)?,
);
}
"readonlyRootFilesystem" => {
builder = builder.set_readonly_root_filesystem(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"privileged" => {
builder = builder.set_privileged(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ulimits" => {
builder = builder.set_ulimits(
crate::json_deser::deser_list_com_amazonaws_batch_ulimits(
tokens,
)?,
);
}
"user" => {
builder = builder.set_user(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"instanceType" => {
builder = builder.set_instance_type(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"resourceRequirements" => {
builder = builder.set_resource_requirements(
crate::json_deser::deser_list_com_amazonaws_batch_resource_requirements(tokens)?
);
}
"linuxParameters" => {
builder = builder.set_linux_parameters(
crate::json_deser::deser_structure_crate_model_linux_parameters(tokens)?
);
}
"logConfiguration" => {
builder = builder.set_log_configuration(
crate::json_deser::deser_structure_crate_model_log_configuration(tokens)?
);
}
"secrets" => {
builder = builder.set_secrets(
crate::json_deser::deser_list_com_amazonaws_batch_secret_list(
tokens,
)?,
);
}
"networkConfiguration" => {
builder = builder.set_network_configuration(
crate::json_deser::deser_structure_crate_model_network_configuration(tokens)?
);
}
"fargatePlatformConfiguration" => {
builder = builder.set_fargate_platform_configuration(
crate::json_deser::deser_structure_crate_model_fargate_platform_configuration(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn build(self) -> ContainerProperties
pub fn build(self) -> ContainerProperties
Consumes the builder and constructs a ContainerProperties
.
Examples found in repository?
2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797
pub(crate) fn deser_structure_crate_model_container_properties<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ContainerProperties>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::container_properties::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"image" => {
builder = builder.set_image(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"vcpus" => {
builder = builder.set_vcpus(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"memory" => {
builder = builder.set_memory(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"command" => {
builder = builder.set_command(
crate::json_deser::deser_list_com_amazonaws_batch_string_list(
tokens,
)?,
);
}
"jobRoleArn" => {
builder = builder.set_job_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"executionRoleArn" => {
builder = builder.set_execution_role_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"volumes" => {
builder = builder.set_volumes(
crate::json_deser::deser_list_com_amazonaws_batch_volumes(
tokens,
)?,
);
}
"environment" => {
builder = builder.set_environment(
crate::json_deser::deser_list_com_amazonaws_batch_environment_variables(tokens)?
);
}
"mountPoints" => {
builder = builder.set_mount_points(
crate::json_deser::deser_list_com_amazonaws_batch_mount_points(
tokens,
)?,
);
}
"readonlyRootFilesystem" => {
builder = builder.set_readonly_root_filesystem(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"privileged" => {
builder = builder.set_privileged(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ulimits" => {
builder = builder.set_ulimits(
crate::json_deser::deser_list_com_amazonaws_batch_ulimits(
tokens,
)?,
);
}
"user" => {
builder = builder.set_user(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"instanceType" => {
builder = builder.set_instance_type(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"resourceRequirements" => {
builder = builder.set_resource_requirements(
crate::json_deser::deser_list_com_amazonaws_batch_resource_requirements(tokens)?
);
}
"linuxParameters" => {
builder = builder.set_linux_parameters(
crate::json_deser::deser_structure_crate_model_linux_parameters(tokens)?
);
}
"logConfiguration" => {
builder = builder.set_log_configuration(
crate::json_deser::deser_structure_crate_model_log_configuration(tokens)?
);
}
"secrets" => {
builder = builder.set_secrets(
crate::json_deser::deser_list_com_amazonaws_batch_secret_list(
tokens,
)?,
);
}
"networkConfiguration" => {
builder = builder.set_network_configuration(
crate::json_deser::deser_structure_crate_model_network_configuration(tokens)?
);
}
"fargatePlatformConfiguration" => {
builder = builder.set_fargate_platform_configuration(
crate::json_deser::deser_structure_crate_model_fargate_platform_configuration(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}