Aws cli list

Aws cli list DEFAULT

ls

Examples¶

Example 1: Listing all user owned buckets

The following command lists all of the bucket owned by the user. In this example, the user owns the buckets and . The timestamp is the date the bucket was created, shown in your machine's time zone. This date can change when making changes to your bucket, such as editing its bucket policy. Note if is used for the path argument , it will list all of the buckets as well:

Output:

2013-07-11 17:08:50 mybucket 2013-07-24 14:55:44 mybucket2

Example 2: Listing all prefixes and objects in a bucket

The following command lists objects and common prefixes under a specified bucket and prefix. In this example, the user owns the bucket with the objects and . The and are arbitrary. Note that since the command has no interaction with the local filesystem, the URI scheme is not required to resolve ambiguity and may be omitted:

Output:

PRE somePrefix/ 2013-07-25 17:06:27 88 test.txt

Example 3: Listing all prefixes and objects in a specific bucket and prefix

The following command lists objects and common prefixes under a specified bucket and prefix. However, there are no objects nor common prefixes under the specified bucket and prefix:

aws s3 ls s3://mybucket/noExistPrefix

Output:

Example 4: Recursively listing all prefixes and objects in a bucket

The following command will recursively list objects in a bucket. Rather than showing in the output, all the content in a bucket will be listed in order:

aws s3 ls s3://mybucket --recursive

Output:

2013-09-02 21:37:53 10 a.txt 2013-09-02 21:37:53 2863288 foo.zip 2013-09-02 21:32:57 23 foo/bar/.baz/a 2013-09-02 21:32:58 41 foo/bar/.baz/b 2013-09-02 21:32:57 281 foo/bar/.baz/c 2013-09-02 21:32:57 73 foo/bar/.baz/d 2013-09-02 21:32:57 452 foo/bar/.baz/e 2013-09-02 21:32:57 896 foo/bar/.baz/hooks/bar 2013-09-02 21:32:57 189 foo/bar/.baz/hooks/foo 2013-09-02 21:32:57 398 z.txt

Example 5: Summarizing all prefixes and objects in a bucket

The following command demonstrates the same command using the --human-readable and --summarize options. --human-readable displays file size in Bytes/MiB/KiB/GiB/TiB/PiB/EiB. --summarize displays the total number of objects and total size at the end of the result listing:

aws s3 ls s3://mybucket --recursive --human-readable --summarize

Output:

2013-09-02 21:37:53 10 Bytes a.txt 2013-09-02 21:37:53 2.9 MiB foo.zip 2013-09-02 21:32:57 23 Bytes foo/bar/.baz/a 2013-09-02 21:32:58 41 Bytes foo/bar/.baz/b 2013-09-02 21:32:57 281 Bytes foo/bar/.baz/c 2013-09-02 21:32:57 73 Bytes foo/bar/.baz/d 2013-09-02 21:32:57 452 Bytes foo/bar/.baz/e 2013-09-02 21:32:57 896 Bytes foo/bar/.baz/hooks/bar 2013-09-02 21:32:57 189 Bytes foo/bar/.baz/hooks/foo 2013-09-02 21:32:57 398 Bytes z.txt Total Objects: 10 Total Size: 2.9 MiB

Example 6: Listing from an S3 access point

The following command list objects from access point ():

aws s3 ls s3://arn:aws:s3:us-west-2:123456789012:accesspoint/myaccesspoint/

Output:

PRE somePrefix/ 2013-07-25 17:06:27 88 test.txt
Sours: https://docs.aws.amazon.com/cli/latest/reference/s3/ls.html

list-commands

{ "Commands": [ { "CommandId": "8bee3135-398c-4d31-99b6-e42d2EXAMPLE", "DocumentName": "AWS-UpdateSSMAgent", "DocumentVersion": "", "Comment": "b48291dd-ba76-43e0-b9df-13e11ddaac26:6960febb-2907-4b59-8e1a-d6ce8EXAMPLE", "ExpiresAfter": "2020-02-19T11:28:02.500000-08:00", "Parameters": {}, "InstanceIds": [ "i-028ea792daEXAMPLE", "i-02feef8c46EXAMPLE", "i-038613f3f0EXAMPLE", "i-03a530a2d4EXAMPLE", "i-083b678d37EXAMPLE", "i-0dee81debaEXAMPLE" ], "Targets": [], "RequestedDateTime": "2020-02-19T10:18:02.874000-08:00", "Parameters": { "KbArticleIds": [ "" ], "UpdateLevel": [ "All" ] }, "InstanceIds": [], "Targets": [ { "Key": "InstanceIds", "Values": [ "i-00ec29b21eEXAMPLE", "i-09911ddd90EXAMPLE" ] } ], "RequestedDateTime": "2020-01-24T11:27:31.874000-08:00", "Status": "Success", "StatusDetails": "Success", "OutputS3BucketName": "my-us-east-2-bucket", "OutputS3KeyPrefix": "my-rc-output", "MaxConcurrency": "50", "MaxErrors": "0", "TargetCount": 2, "CompletedCount": 2, "ErrorCount": 0, "DeliveryTimedOutCount": 0, "ServiceRole": "arn:aws:iam::111222333444:role/aws-service-role/ssm.amazonaws.com/AWSServiceRoleForAmazonSSM", "NotificationConfig": { "NotificationArn": "arn:aws:sns:us-east-2:111222333444:my-us-east-2-notification-arn", "NotificationEvents": [ "All" ], "NotificationType": "Invocation" }, "CloudWatchOutputConfig": { "CloudWatchLogGroupName": "", "CloudWatchOutputEnabled": false } } { "CommandId": "d539b6c3-70e8-4853-80e5-0ce4fEXAMPLE", "DocumentName": "AWS-RunPatchBaseline", "DocumentVersion": "1", "Comment": "", "ExpiresAfter": "2020-01-24T12:21:04.350000-08:00", "Parameters": { "InstallOverrideList": [ "" ], "Operation": [ "Install" ], "RebootOption": [ "RebootIfNeeded" ], "SnapshotId": [ "" ] }, "InstanceIds": [], "Targets": [ { "Key": "InstanceIds", "Values": [ "i-00ec29b21eEXAMPLE", "i-09911ddd90EXAMPLE" ] } ], "RequestedDateTime": "2020-01-24T11:11:04.350000-08:00", "Status": "Success", "StatusDetails": "Success", "OutputS3BucketName": "my-us-east-2-bucket", "OutputS3KeyPrefix": "my-rc-output", "MaxConcurrency": "50", "MaxErrors": "0", "TargetCount": 2, "CompletedCount": 2, "ErrorCount": 0, "DeliveryTimedOutCount": 0, "ServiceRole": "arn:aws:iam::111222333444:role/aws-service-role/ssm.amazonaws.com/AWSServiceRoleForAmazonSSM", "NotificationConfig": { "NotificationArn": "arn:aws:sns:us-east-2:111222333444:my-us-east-2-notification-arn", "NotificationEvents": [ "All" ], "NotificationType": "Invocation" }, "CloudWatchOutputConfig": { "CloudWatchLogGroupName": "", "CloudWatchOutputEnabled": false } } ] }
Sours: https://docs.aws.amazon.com/cli/latest/reference/ssm/list-commands.html
  1. Cable for ssd
  2. Filecloud reviews
  3. Bulk organic wheat
  4. Lance camper awnings

list-objects-v2¶

Description¶

Returns some or all (up to 1,000) of the objects in a bucket with each request. You can use the request parameters as selection criteria to return a subset of the objects in a bucket. A response can contain valid or invalid XML. Make sure to design your application to parse the contents of the response and handle it appropriately. Objects are returned sorted in an ascending order of the respective key names in the list. For more information about listing objects, see Listing object keys programmatically

To use this operation, you must have READ access to the bucket.

To use this action in an Identity and Access Management (IAM) policy, you must have permissions to perform the action. The bucket owner has this permission by default and can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources .

Warning

This section describes the latest revision of this action. We recommend that you use this revised API for application development. For backward compatibility, Amazon S3 continues to support the prior version of this API, ListObjects .

To get a list of your buckets, see ListBuckets .

The following operations are related to :

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

is a paginated operation. Multiple API calls may be issued in order to retrieve the entire data set of results. You can disable pagination by providing the argument. When using and the argument on a paginated response, the argument must extract data from the results of the following query expressions: ,

Synopsis¶

list-objects-v2 --bucket <value> [--delimiter <value>] [--encoding-type <value>] [--prefix <value>] [--fetch-owner | --no-fetch-owner] [--start-after <value>] [--request-payer <value>] [--expected-bucket-owner <value>] [--cli-input-json <value>] [--starting-token <value>] [--page-size <value>] [--max-items <value>] [--generate-cli-skeleton <value>]

Options¶

(string)

Bucket name to list.

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName -AccountId .s3-accesspoint.*Region* .amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide .

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName -AccountId .*outpostID* .s3-outposts.*Region* .amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide .

(string)

A delimiter is a character you use to group keys.

(string)

Encoding type used by Amazon S3 to encode object keys in the response.

Possible values:

(string)

Limits the response to keys that begin with the specified prefix.

| (boolean)

The owner field is not present in listV2 by default, if you want to return owner field with each key in the result then set the fetch owner field to true.

(string)

StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this specified key. StartAfter can be any key in the bucket.

(string)

Confirms that the requester knows that she or he will be charged for the list objects request in V2 style. Bucket owners need not specify this parameter in their requests.

Possible values:

(string)

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP error.

(string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by . If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

(string)

A token to specify where to start paginating. This is the from a previously truncated response.

For usage examples, see Pagination in the AWS Command Line Interface User Guide .

(integer)

The size of each page to get in the AWS service call. This does not affect the number of items returned in the command's output. Setting a smaller page size results in more calls to the AWS service, retrieving fewer items in each call. This can help prevent the AWS service calls from timing out.

For usage examples, see Pagination in the AWS Command Line Interface User Guide .

(integer)

The total number of items to return in the command's output. If the total number of items available is more than the value specified, a is provided in the command's output. To resume pagination, provide the value in the argument of a subsequent command. Do not use the response element directly outside of the AWS CLI.

For usage examples, see Pagination in the AWS Command Line Interface User Guide .

(string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value , prints a sample input JSON that can be used as an argument for . If provided with the value , it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Examples¶

To get a list of objects in a bucket

The following example lists the objects in the specified bucket.

aws s3api list-objects-v2 \ --bucket my-bucket

Output:

{"Contents":[{"LastModified":"2019-11-05T23:11:50.000Z","ETag":"\"621503c373607d548b37cff8778d992c\"","StorageClass":"STANDARD","Key":"doc1.rtf","Size":391},{"LastModified":"2019-11-05T23:11:50.000Z","ETag":"\"a2cecc36ab7c7fe3a71a273b9d45b1b5\"","StorageClass":"STANDARD","Key":"doc2.rtf","Size":373},{"LastModified":"2019-11-05T23:11:50.000Z","ETag":"\"08210852f65a2e9cb999972539a64d68\"","StorageClass":"STANDARD","Key":"doc3.rtf","Size":399},{"LastModified":"2019-11-05T23:11:50.000Z","ETag":"\"d1852dd683f404306569471af106988e\"","StorageClass":"STANDARD","Key":"doc4.rtf","Size":6225}]}

Output¶

IsTruncated -> (boolean)

Set to false if all of the results were returned. Set to true if more keys are available to return. If the number of results exceeds that specified by MaxKeys, all of the results might not be returned.

Contents -> (list)

Metadata about each object returned.

(structure)

An object consists of data and its descriptive metadata.

Key -> (string)

The name that you assign to an object. You use the object key to retrieve the object.

LastModified -> (timestamp)

Creation date of the object.

ETag -> (string)

The entity tag is a hash of the object. The ETag reflects changes only to the contents of an object, not its metadata. The ETag may or may not be an MD5 digest of the object data. Whether or not it is depends on how the object was created and how it is encrypted as described below:

  • Objects created by the PUT Object, POST Object, or Copy operation, or through the Amazon Web Services Management Console, and are encrypted by SSE-S3 or plaintext, have ETags that are an MD5 digest of their object data.
  • Objects created by the PUT Object, POST Object, or Copy operation, or through the Amazon Web Services Management Console, and are encrypted by SSE-C or SSE-KMS, have ETags that are not an MD5 digest of their object data.
  • If an object is created by either the Multipart Upload or Part Copy operation, the ETag is not an MD5 digest, regardless of the method of encryption.

Size -> (integer)

Size in bytes of the object

StorageClass -> (string)

The class of storage used to store the object.

Owner -> (structure)

The owner of the object

DisplayName -> (string)

Container for the display name of the owner.

ID -> (string)

Container for the ID of the owner.

Name -> (string)

The bucket name.

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName -AccountId .s3-accesspoint.*Region* .amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide .

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName -AccountId .*outpostID* .s3-outposts.*Region* .amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide .

Prefix -> (string)

Keys that begin with the indicated prefix.

Delimiter -> (string)

Causes keys that contain the same string between the prefix and the first occurrence of the delimiter to be rolled up into a single result element in the CommonPrefixes collection. These rolled-up keys are not returned elsewhere in the response. Each rolled-up result counts as only one return against the value.

MaxKeys -> (integer)

Sets the maximum number of keys returned in the response. By default the action returns up to 1,000 key names. The response might contain fewer keys but will never contain more.

CommonPrefixes -> (list)

All of the keys (up to 1,000) rolled up into a common prefix count as a single return when calculating the number of returns.

A response can contain only if you specify a delimiter.

contains all (if there are any) keys between and the next occurrence of the string specified by a delimiter.

lists keys that act like subdirectories in the directory specified by .

For example, if the prefix is and the delimiter is a slash ( ) as in , the common prefix is . All of the keys that roll up into a common prefix count as a single return when calculating the number of returns.

(structure)

Container for all (if there are any) keys between Prefix and the next occurrence of the string specified by a delimiter. CommonPrefixes lists keys that act like subdirectories in the directory specified by Prefix. For example, if the prefix is notes/ and the delimiter is a slash (/) as in notes/summer/july, the common prefix is notes/summer/.

Prefix -> (string)

Container for the specified common prefix.

EncodingType -> (string)

Encoding type used by Amazon S3 to encode object key names in the XML response.

If you specify the encoding-type request parameter, Amazon S3 includes this element in the response, and returns encoded key name values in the following response elements:

and .

KeyCount -> (integer)

KeyCount is the number of keys returned with this request. KeyCount will always be less than or equals to MaxKeys field. Say you ask for 50 keys, your result will include less than equals 50 keys

ContinuationToken -> (string)

If ContinuationToken was sent with the request, it is included in the response.

NextContinuationToken -> (string)

is sent when is true, which means there are more keys in the bucket that can be listed. The next list requests to Amazon S3 can be continued with this . is obfuscated and is not a real key

StartAfter -> (string)

If StartAfter was sent with the request, it is included in the response.

Sours: https://docs.aws.amazon.com/cli/latest/reference/s3api/list-objects-v2.html
15.AWS - S3 Bucket Часть-6 - Работа через AWS CLI

Using high-level (s3) commands with the AWS CLI

This topic describes how you can manage Amazon S3 buckets and objects using the commands in the AWS CLI.

The high-level commands simplify managing Amazon S3 objects. These commands enable you to manage the contents of Amazon S3 within itself and with local directories.

Note

When you use commands to upload large objects to an Amazon S3 bucket, the AWS CLI automatically performs a multipart upload. You can't resume a failed upload when using these commands.

If the multipart upload fails due to a timeout, or if you manually canceled in the AWS CLI, the AWS CLI stops the upload and cleans up any files that were created. This process can take several minutes.

If the multipart upload or cleanup process is canceled by a kill command or system failure, the created files remain in the Amazon S3 bucket. To clean up the multipart upload, use the s3api abort-multipart-upload command.

For more information, see Multipart upload overview in the Amazon Simple Storage Service User Guide.

Prerequisites

To run the commands, you need to:

  • AWS CLI installed, see Installing, updating, and uninstalling the AWS CLI for more information.

  • AWS CLI configured, see Configuration basics for more information. The profile that you use must have permissions that allow the AWS operations performed by the examples.

  • Understand these Amazon S3 terms:

    • Bucket – A top-level Amazon S3 folder.

    • Prefix – An Amazon S3 folder in a bucket.

    • Object – Any item that's hosted in an Amazon S3 bucket.

Create a bucket

Use the command to make a bucket. Bucket names must be globally unique (unique across all of Amazon S3) and should be DNS compliant.

Bucket names can contain lowercase letters, numbers, hyphens, and periods. Bucket names can start and end only with a letter or number, and cannot contain a period next to a hyphen or another period.

Syntax

List buckets and objects

To list your buckets, folders, or objects, use the command. Using the command without a target or options lists all buckets.

Syntax

For a few common options to use with this command, and examples, see Frequently used options for s3 commands. For a complete list of available options, see in the AWS CLI Command Reference.

Delete buckets

To delete a bucket, use the command.

Syntax

Delete objects

To delete objects in a bucket or your local directory, use the command.

Syntax

For a few common options to use with this command, and examples, see Frequently used options for s3 commands. For a complete list of options, see in the AWS CLI Command Reference.

Move objects

Use the command to move objects from a bucket or a local directory.

Syntax

For a few common options to use with this command, and examples, see Frequently used options for s3 commands. For a complete list of available options, see in the AWS CLI Command Reference.

Copy objects

Use the command to copy objects from a bucket or a local directory.

Syntax

You can use the dash parameter for file streaming to standard input () or standard output ().

Warning

If you're using PowerShell, the shell might alter the encoding of a CRLF or add a CRLF to piped input or output, or redirected output.

The command uses the following syntax to upload a file stream from to a specified bucket.

Syntax

The command uses the following syntax to download an Amazon S3 file stream for .

Syntax

For a few common options to use with this command, and examples, see Frequently used options for s3 commands. For the complete list of options, see in the AWS CLI Command Reference.

Sync objects

The command synchronizes the contents of a bucket and a directory, or the contents of two buckets. Typically, copies missing or outdated files or objects between the source and target. However, you can also supply the option to remove files or objects from the target that are not present in the source.

Syntax

For a few common options to use with this command, and examples, see Frequently used options for s3 commands. For a complete list of options, see in the AWS CLI Command Reference.

Frequently used options for s3 commands

The following options are frequently used for the commands described in this topic. For a complete list of options you can use on a command, see the specific command in the AWS CLI Command Reference.

acl

and can use the option. This enables you to set the access permissions for files copied to Amazon S3. The option accepts , , and values. For more information, see Canned ACL in the Amazon Simple Storage Service User Guide.

exclude

When you use the , , , or command, you can filter the results by using the or option. The option sets rules to only exclude objects from the command, and the options apply in the order specified. This is shown in the following example.

include

When you use the , , , or command, you can filter the results using the or option. The option sets rules to only include objects specified for the command, and the options apply in the order specified. This is shown in the following example.

grant

The , , and commands include a option that you can use to grant permissions on the object to specified users or groups. Set the option to a list of permissions using the following syntax. Replace , , and with your own values.

Syntax

Each value contains the following elements:

  • – Specifies the granted permissions. Can be set to , , , or .

  • – Specifies how to identify the grantee. Can be set to , , or .

  • – Specifies the grantee based on .

    • – The group's URI. For more information, see Who is a grantee?

    • – The account's email address.

    • – The account's canonical ID.

For more information about Amazon S3 access control, see Access control.

The following example copies an object into a bucket. It grants permissions on the object to everyone, and permissions (, , and ) to the account associated with .

You can also specify a nondefault storage class ( or ) for objects that you upload to Amazon S3. To do this, use the option.

recursive

When you use this option, the command is performed on all files or objects under the specified directory or prefix. The following example deletes and all of its contents.

Resources

AWS CLI reference:

Service reference:

Sours: https://docs.aws.amazon.com/cli/latest/userguide/cli-services-s3-commands.html

List aws cli

list-topics

Options¶

(string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by . If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

(string)

A token to specify where to start paginating. This is the from a previously truncated response.

For usage examples, see Pagination in the AWS Command Line Interface User Guide .

(integer)

The total number of items to return in the command's output. If the total number of items available is more than the value specified, a is provided in the command's output. To resume pagination, provide the value in the argument of a subsequent command. Do not use the response element directly outside of the AWS CLI.

For usage examples, see Pagination in the AWS Command Line Interface User Guide .

(string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value , prints a sample input JSON that can be used as an argument for . If provided with the value , it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Examples¶

To list your SNS topics

The following example lists all of SNS topics in your AWS account.

Output:

{"Topics":[{"TopicArn":"arn:aws:sns:us-west-2:123456789012:my-topic"}]}

Output¶

Topics -> (list)

A list of topic ARNs.

(structure)

A wrapper type for the topic's Amazon Resource Name (ARN). To retrieve a topic's attributes, use .

TopicArn -> (string)

The topic's ARN.

NextToken -> (string)

Token to pass along to the next request. This element is returned if there are additional topics to retrieve.

Sours: https://docs.aws.amazon.com/cli/latest/reference/sns/list-topics.html
Create a VPC and Subnets with AWS CLI - AWS Networking

list-buckets

Examples¶

The following command uses the command to display the names of all your Amazon S3 buckets (across all regions):

aws s3api list-buckets --query "Buckets[].Name"

The query option filters the output of down to only the bucket names.

For more information about buckets, see Working with Amazon S3 Buckets in the Amazon S3 Developer Guide.

Output¶

Buckets -> (list)

The list of buckets owned by the requestor.

(structure)

In terms of implementation, a Bucket is a resource. An Amazon S3 bucket name is globally unique, and the namespace is shared by all Amazon Web Services accounts.

Name -> (string)

The name of the bucket.

CreationDate -> (timestamp)

Date the bucket was created. This date can change when making changes to your bucket, such as editing its bucket policy.

Owner -> (structure)

The owner of the buckets listed.

DisplayName -> (string)

Container for the display name of the owner.

ID -> (string)

Container for the ID of the owner.

Sours: https://docs.aws.amazon.com/cli/latest/reference/s3api/list-buckets.html

Similar news:

list-items¶

Description¶

Provides a list of metadata entries about folders and objects in the specified folder.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

is a paginated operation. Multiple API calls may be issued in order to retrieve the entire data set of results. You can disable pagination by providing the argument. When using and the argument on a paginated response, the argument must extract data from the results of the following query expressions:

Synopsis¶

list-items [--path <value>] [--cli-input-json <value>] [--starting-token <value>] [--page-size <value>] [--max-items <value>] [--generate-cli-skeleton <value>]

Options¶

(string)

The path in the container from which to retrieve items. Format: <folder name>/<folder name>/<file name>

(string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by . If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

(string)

A token to specify where to start paginating. This is the from a previously truncated response.

For usage examples, see Pagination in the AWS Command Line Interface User Guide .

(integer)

The size of each page to get in the AWS service call. This does not affect the number of items returned in the command's output. Setting a smaller page size results in more calls to the AWS service, retrieving fewer items in each call. This can help prevent the AWS service calls from timing out.

For usage examples, see Pagination in the AWS Command Line Interface User Guide .

(integer)

The total number of items to return in the command's output. If the total number of items available is more than the value specified, a is provided in the command's output. To resume pagination, provide the value in the argument of a subsequent command. Do not use the response element directly outside of the AWS CLI.

For usage examples, see Pagination in the AWS Command Line Interface User Guide .

(string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value , prints a sample input JSON that can be used as an argument for . If provided with the value , it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Examples¶

Example 1: To view a list of items (objects and folders) stored in a container

The following example displays a list of items (objects and folders) stored in the specified container.

aws mediastore-data list-items \ --endpoint https://aaabbbcccdddee.data.mediastore.us-west-2.amazonaws.com

Output:

{"Items":[{"Type":"OBJECT","ContentLength":3784,"Name":"setup.jpg","ETag":"2aa333bbcc8d8d22d777e999c88d4aa9eeeeee4dd89ff7f555555555555da6d3","ContentType":"image/jpeg","LastModified":1563571859.379},{"Type":"FOLDER","Name":"events"}]}

Example 2: To view a list of items (objects and folders) stored in a folder

The following example displays a list of items (objects and folders) stored in the specified folder.

aws mediastore-data list-items \ --endpoint https://aaabbbcccdddee.data.mediastore.us-west-2.amazonaws.com \ --path events/baseball

Output:

{"Items":[{"ETag":"2aa333bbcc8d8d22d777e999c88d4aa9eeeeee4dd89ff7f555555555555da6d3","ContentType":"image/jpeg","Type":"OBJECT","ContentLength":3860266,"LastModified":1563573031.872,"Name":"setup.jpg"}]}

For more information, see Viewing a List of Objects in the AWS Elemental MediaStore User Guide.

Output¶

Items -> (list)

The metadata entries for the folders and objects at the requested path.

(structure)

A metadata entry for a folder or object.

Name -> (string)

The name of the item.

Type -> (string)

The item type (folder or object).

ETag -> (string)

The ETag that represents a unique instance of the item.

LastModified -> (timestamp)

The date and time that the item was last modified.

ContentType -> (string)

The content type of the item.

ContentLength -> (long)

The length of the item in bytes.

NextToken -> (string)

The token that can be used in a request to view the next set of results. For example, you submit a request that matches 2,000 items with set at 500. The service returns the first batch of results (up to 500) and a value that can be used to fetch the next batch of results.

Sours: https://docs.aws.amazon.com/cli/latest/reference/mediastore-data/list-items.html


1435 1436 1437 1438 1439