All Products
Search
Document Center

Object Storage Service:get-style

Last Updated:Aug 30, 2024

Queries a specific image style of a bucket.

Usage notes

By default, an Alibaba Cloud account has the permissions to query a specific image style of a bucket. To query a specific image style of a bucket by using a RAM user or Security Token Service (STS), you must have the oss:GetStyle permission. For more information, see Attach a custom policy to a RAM user.

Command syntax

ossutil api get-style --bucket value --style-name value [flags]

Parameter

Type

Description

--bucket

string

The name of the bucket.

--style-name

string

The name of the image style.

Note
  • The get-style command corresponds to the GetStyle operation. For more information about the parameters in the GetStyle operation, see GetStyle.

  • For more information about supported global command-line options, see Global command-line options.

Examples

  • Run the following command to query an image style named imageStyle of the examplebucket bucket:

    ossutil api get-style --bucket examplebucket --style-name imageStyle
  • Run the following command to query an image style named imageStyle of the examplebucket bucket and display the image style in the JSON format:

    ossutil api get-style --bucket examplebucket --style-name imageStyle --output-format json
  • Run the following command to query an image style named imageStyle of the examplebucket bucket and display the image style in the YAML format:

    ossutil api get-style --bucket examplebucket --style-name imageStyle --output-format yaml