Struct aws_sdk_ec2::model::s3_storage::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for S3Storage
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn aws_access_key_id(self, input: impl Into<String>) -> Self
pub fn aws_access_key_id(self, input: impl Into<String>) -> Self
The access key ID of the owner of the bucket. Before you specify a value for your access key ID, review and follow the guidance in Best Practices for Managing Amazon Web Services Access Keys.
sourcepub fn set_aws_access_key_id(self, input: Option<String>) -> Self
pub fn set_aws_access_key_id(self, input: Option<String>) -> Self
The access key ID of the owner of the bucket. Before you specify a value for your access key ID, review and follow the guidance in Best Practices for Managing Amazon Web Services Access Keys.
Examples found in repository?
56442 56443 56444 56445 56446 56447 56448 56449 56450 56451 56452 56453 56454 56455 56456 56457 56458 56459 56460 56461 56462 56463 56464 56465 56466 56467 56468 56469 56470 56471 56472 56473 56474 56475 56476 56477 56478 56479 56480 56481 56482 56483 56484 56485 56486 56487 56488 56489 56490 56491 56492 56493 56494 56495 56496 56497 56498 56499 56500 56501 56502 56503 56504 56505 56506 56507 56508 56509 56510 56511 56512 56513 56514 56515 56516 56517 56518
pub fn deser_structure_crate_model_s3_storage(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::S3Storage, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::S3Storage::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("AWSAccessKeyId") /* AWSAccessKeyId com.amazonaws.ec2#S3Storage$AWSAccessKeyId */ => {
let var_2742 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_aws_access_key_id(var_2742);
}
,
s if s.matches("bucket") /* Bucket com.amazonaws.ec2#S3Storage$Bucket */ => {
let var_2743 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_bucket(var_2743);
}
,
s if s.matches("prefix") /* Prefix com.amazonaws.ec2#S3Storage$Prefix */ => {
let var_2744 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix(var_2744);
}
,
s if s.matches("uploadPolicy") /* UploadPolicy com.amazonaws.ec2#S3Storage$UploadPolicy */ => {
let var_2745 =
Some(
aws_smithy_types::base64::decode(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|err|aws_smithy_xml::decode::XmlDecodeError::custom(format!("invalid base64: {:?}", err))).map(aws_smithy_types::Blob::new)
?
)
;
builder = builder.set_upload_policy(var_2745);
}
,
s if s.matches("uploadPolicySignature") /* UploadPolicySignature com.amazonaws.ec2#S3Storage$UploadPolicySignature */ => {
let var_2746 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_upload_policy_signature(var_2746);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn bucket(self, input: impl Into<String>) -> Self
pub fn bucket(self, input: impl Into<String>) -> Self
The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.
sourcepub fn set_bucket(self, input: Option<String>) -> Self
pub fn set_bucket(self, input: Option<String>) -> Self
The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.
Examples found in repository?
56442 56443 56444 56445 56446 56447 56448 56449 56450 56451 56452 56453 56454 56455 56456 56457 56458 56459 56460 56461 56462 56463 56464 56465 56466 56467 56468 56469 56470 56471 56472 56473 56474 56475 56476 56477 56478 56479 56480 56481 56482 56483 56484 56485 56486 56487 56488 56489 56490 56491 56492 56493 56494 56495 56496 56497 56498 56499 56500 56501 56502 56503 56504 56505 56506 56507 56508 56509 56510 56511 56512 56513 56514 56515 56516 56517 56518
pub fn deser_structure_crate_model_s3_storage(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::S3Storage, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::S3Storage::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("AWSAccessKeyId") /* AWSAccessKeyId com.amazonaws.ec2#S3Storage$AWSAccessKeyId */ => {
let var_2742 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_aws_access_key_id(var_2742);
}
,
s if s.matches("bucket") /* Bucket com.amazonaws.ec2#S3Storage$Bucket */ => {
let var_2743 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_bucket(var_2743);
}
,
s if s.matches("prefix") /* Prefix com.amazonaws.ec2#S3Storage$Prefix */ => {
let var_2744 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix(var_2744);
}
,
s if s.matches("uploadPolicy") /* UploadPolicy com.amazonaws.ec2#S3Storage$UploadPolicy */ => {
let var_2745 =
Some(
aws_smithy_types::base64::decode(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|err|aws_smithy_xml::decode::XmlDecodeError::custom(format!("invalid base64: {:?}", err))).map(aws_smithy_types::Blob::new)
?
)
;
builder = builder.set_upload_policy(var_2745);
}
,
s if s.matches("uploadPolicySignature") /* UploadPolicySignature com.amazonaws.ec2#S3Storage$UploadPolicySignature */ => {
let var_2746 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_upload_policy_signature(var_2746);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn prefix(self, input: impl Into<String>) -> Self
pub fn prefix(self, input: impl Into<String>) -> Self
The beginning of the file name of the AMI.
sourcepub fn set_prefix(self, input: Option<String>) -> Self
pub fn set_prefix(self, input: Option<String>) -> Self
The beginning of the file name of the AMI.
Examples found in repository?
56442 56443 56444 56445 56446 56447 56448 56449 56450 56451 56452 56453 56454 56455 56456 56457 56458 56459 56460 56461 56462 56463 56464 56465 56466 56467 56468 56469 56470 56471 56472 56473 56474 56475 56476 56477 56478 56479 56480 56481 56482 56483 56484 56485 56486 56487 56488 56489 56490 56491 56492 56493 56494 56495 56496 56497 56498 56499 56500 56501 56502 56503 56504 56505 56506 56507 56508 56509 56510 56511 56512 56513 56514 56515 56516 56517 56518
pub fn deser_structure_crate_model_s3_storage(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::S3Storage, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::S3Storage::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("AWSAccessKeyId") /* AWSAccessKeyId com.amazonaws.ec2#S3Storage$AWSAccessKeyId */ => {
let var_2742 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_aws_access_key_id(var_2742);
}
,
s if s.matches("bucket") /* Bucket com.amazonaws.ec2#S3Storage$Bucket */ => {
let var_2743 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_bucket(var_2743);
}
,
s if s.matches("prefix") /* Prefix com.amazonaws.ec2#S3Storage$Prefix */ => {
let var_2744 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix(var_2744);
}
,
s if s.matches("uploadPolicy") /* UploadPolicy com.amazonaws.ec2#S3Storage$UploadPolicy */ => {
let var_2745 =
Some(
aws_smithy_types::base64::decode(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|err|aws_smithy_xml::decode::XmlDecodeError::custom(format!("invalid base64: {:?}", err))).map(aws_smithy_types::Blob::new)
?
)
;
builder = builder.set_upload_policy(var_2745);
}
,
s if s.matches("uploadPolicySignature") /* UploadPolicySignature com.amazonaws.ec2#S3Storage$UploadPolicySignature */ => {
let var_2746 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_upload_policy_signature(var_2746);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn upload_policy(self, input: Blob) -> Self
pub fn upload_policy(self, input: Blob) -> Self
An Amazon S3 upload policy that gives Amazon EC2 permission to upload items into Amazon S3 on your behalf.
sourcepub fn set_upload_policy(self, input: Option<Blob>) -> Self
pub fn set_upload_policy(self, input: Option<Blob>) -> Self
An Amazon S3 upload policy that gives Amazon EC2 permission to upload items into Amazon S3 on your behalf.
Examples found in repository?
56442 56443 56444 56445 56446 56447 56448 56449 56450 56451 56452 56453 56454 56455 56456 56457 56458 56459 56460 56461 56462 56463 56464 56465 56466 56467 56468 56469 56470 56471 56472 56473 56474 56475 56476 56477 56478 56479 56480 56481 56482 56483 56484 56485 56486 56487 56488 56489 56490 56491 56492 56493 56494 56495 56496 56497 56498 56499 56500 56501 56502 56503 56504 56505 56506 56507 56508 56509 56510 56511 56512 56513 56514 56515 56516 56517 56518
pub fn deser_structure_crate_model_s3_storage(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::S3Storage, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::S3Storage::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("AWSAccessKeyId") /* AWSAccessKeyId com.amazonaws.ec2#S3Storage$AWSAccessKeyId */ => {
let var_2742 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_aws_access_key_id(var_2742);
}
,
s if s.matches("bucket") /* Bucket com.amazonaws.ec2#S3Storage$Bucket */ => {
let var_2743 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_bucket(var_2743);
}
,
s if s.matches("prefix") /* Prefix com.amazonaws.ec2#S3Storage$Prefix */ => {
let var_2744 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix(var_2744);
}
,
s if s.matches("uploadPolicy") /* UploadPolicy com.amazonaws.ec2#S3Storage$UploadPolicy */ => {
let var_2745 =
Some(
aws_smithy_types::base64::decode(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|err|aws_smithy_xml::decode::XmlDecodeError::custom(format!("invalid base64: {:?}", err))).map(aws_smithy_types::Blob::new)
?
)
;
builder = builder.set_upload_policy(var_2745);
}
,
s if s.matches("uploadPolicySignature") /* UploadPolicySignature com.amazonaws.ec2#S3Storage$UploadPolicySignature */ => {
let var_2746 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_upload_policy_signature(var_2746);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn upload_policy_signature(self, input: impl Into<String>) -> Self
pub fn upload_policy_signature(self, input: impl Into<String>) -> Self
The signature of the JSON document.
sourcepub fn set_upload_policy_signature(self, input: Option<String>) -> Self
pub fn set_upload_policy_signature(self, input: Option<String>) -> Self
The signature of the JSON document.
Examples found in repository?
56442 56443 56444 56445 56446 56447 56448 56449 56450 56451 56452 56453 56454 56455 56456 56457 56458 56459 56460 56461 56462 56463 56464 56465 56466 56467 56468 56469 56470 56471 56472 56473 56474 56475 56476 56477 56478 56479 56480 56481 56482 56483 56484 56485 56486 56487 56488 56489 56490 56491 56492 56493 56494 56495 56496 56497 56498 56499 56500 56501 56502 56503 56504 56505 56506 56507 56508 56509 56510 56511 56512 56513 56514 56515 56516 56517 56518
pub fn deser_structure_crate_model_s3_storage(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::S3Storage, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::S3Storage::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("AWSAccessKeyId") /* AWSAccessKeyId com.amazonaws.ec2#S3Storage$AWSAccessKeyId */ => {
let var_2742 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_aws_access_key_id(var_2742);
}
,
s if s.matches("bucket") /* Bucket com.amazonaws.ec2#S3Storage$Bucket */ => {
let var_2743 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_bucket(var_2743);
}
,
s if s.matches("prefix") /* Prefix com.amazonaws.ec2#S3Storage$Prefix */ => {
let var_2744 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix(var_2744);
}
,
s if s.matches("uploadPolicy") /* UploadPolicy com.amazonaws.ec2#S3Storage$UploadPolicy */ => {
let var_2745 =
Some(
aws_smithy_types::base64::decode(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|err|aws_smithy_xml::decode::XmlDecodeError::custom(format!("invalid base64: {:?}", err))).map(aws_smithy_types::Blob::new)
?
)
;
builder = builder.set_upload_policy(var_2745);
}
,
s if s.matches("uploadPolicySignature") /* UploadPolicySignature com.amazonaws.ec2#S3Storage$UploadPolicySignature */ => {
let var_2746 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_upload_policy_signature(var_2746);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> S3Storage
pub fn build(self) -> S3Storage
Consumes the builder and constructs a S3Storage
.
Examples found in repository?
56442 56443 56444 56445 56446 56447 56448 56449 56450 56451 56452 56453 56454 56455 56456 56457 56458 56459 56460 56461 56462 56463 56464 56465 56466 56467 56468 56469 56470 56471 56472 56473 56474 56475 56476 56477 56478 56479 56480 56481 56482 56483 56484 56485 56486 56487 56488 56489 56490 56491 56492 56493 56494 56495 56496 56497 56498 56499 56500 56501 56502 56503 56504 56505 56506 56507 56508 56509 56510 56511 56512 56513 56514 56515 56516 56517 56518
pub fn deser_structure_crate_model_s3_storage(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::S3Storage, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::S3Storage::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("AWSAccessKeyId") /* AWSAccessKeyId com.amazonaws.ec2#S3Storage$AWSAccessKeyId */ => {
let var_2742 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_aws_access_key_id(var_2742);
}
,
s if s.matches("bucket") /* Bucket com.amazonaws.ec2#S3Storage$Bucket */ => {
let var_2743 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_bucket(var_2743);
}
,
s if s.matches("prefix") /* Prefix com.amazonaws.ec2#S3Storage$Prefix */ => {
let var_2744 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix(var_2744);
}
,
s if s.matches("uploadPolicy") /* UploadPolicy com.amazonaws.ec2#S3Storage$UploadPolicy */ => {
let var_2745 =
Some(
aws_smithy_types::base64::decode(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|err|aws_smithy_xml::decode::XmlDecodeError::custom(format!("invalid base64: {:?}", err))).map(aws_smithy_types::Blob::new)
?
)
;
builder = builder.set_upload_policy(var_2745);
}
,
s if s.matches("uploadPolicySignature") /* UploadPolicySignature com.amazonaws.ec2#S3Storage$UploadPolicySignature */ => {
let var_2746 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_upload_policy_signature(var_2746);
}
,
_ => {}
}
}
Ok(builder.build())
}