RestoreObject #
Overview #
Restores an archived copy of an object back into Amazon S3.
AWS API Reference: https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html
Method #
RESTOREOBJECT
Import Parameters #
The request uses the following import parameters.
-
i_bucket_name (bucket in AWS) (Required)
Name of the bucket.
-
i_region (Required)
AWS Region of the Amazon S3 Bucket.
-
i_key(key in AWS) (Required)
Object key for which the operation was initiated.
-
i_versionid(versionId in AWS)
VersionId used to reference a specific version of the object.
-
i_days(Days ind AWS)
Lifetime of the active copy in days. Do not use with restores that specify OutputLocation.
-
i_t_glacier_job_parameters(GlacierJobParameters in AWS)
S3 Glacier related parameters pertaining to this job. Do not use with restores that specify OutputLocation.
-
i_type(Type in AWS)
Type of restore request.
-
i_tier(Tier in AWS)
S3 Glacier retrieval tier at which the restore will be processed.
-
i_description(Description in AWS)
The optional description for the job.
-
i_outputlocation(OutputLocation in AWS)
Describes the location where the restore job’s output is stored.
-
i_selectparameters(SelectParameters in AWS)
Describes the parameters for Select job types.
-
i_x_amz_request_payer(x-amz-request-payer in AWS)
Confirms that the requester knows that they will be charged for the request.
-
i_x_amz_expected_b_owner(x-amz-expected-bucket-owner in AWS)
The account id of the expected bucket owner.
Export Parameters #
This method use the following export parameters:
-
e_http_status
HTTP Status code.
-
e_response_headers
Returns information about the request in format Name/Value pair values.
-
e_response_content
Response content in string format.
Example #
DATA: lo_s3 TYPE REF TO /lnkc/cl_sdk_aws_s3,
lv_http_status TYPE i,
lt_response_headers TYPE tihttpnvp,
lv_response_content TYPE string,
lv_outputlocation TYPE /lnkc/aws_s3_s_s3location,
lv_selectparameters TYPE /lnkc/aws_s3_s_selectparameter,
lt_glacier_job_parameters TYPE /lnkc/aws_s3_t_strings.
TRY.
CREATE OBJECT lo_s3
EXPORTING
i_user_name = 'user_awsconnector'
i_access_key = 'acces_key_value'
i_secret_access_key = 'secret_acceskey_value'.
ENDTRY.
TRY.
CALL METHOD lo_s3->restoreobject
EXPORTING
i_bucket_name = 'i_bucket_name'
i_region = 'i_region'
i_key = 'i_key'
i_days = 'i_days'
i_t_glacier_job_parameters = lt_glacier_job_parameters
i_outputlocation = lv_outputlocation
i_selectparameters = lv_selectparameters
IMPORTING
e_http_status = lv_http_status
e_response_headers = lt_response_headers
e_response_content = lv_response_content.
CATCH /lnkc/cx_sdk_aws .
" Error Message
ENDTRY.