S3 Storage Lens 대시보드에서 AWS 리소스 태그 삭제
다음 예제에서는 기존 Storage Lens 대시보드에서 AWS 리소스 태그를 삭제하는 방법을 보여줍니다. Amazon S3 콘솔, AWS Command Line Interface(AWS CLI) 및 AWS SDK for Java를 사용하여 태그를 삭제할 수 있습니다.
기존 Storage Lens 대시보드에서 AWS 리소스 태그를 삭제하려면
AWS Management Console에 로그인한 후 https://console.aws.amazon.com/s3/
에서 S3 콘솔을 엽니다. -
왼쪽 탐색 창에서 Storage Lens로 이동합니다.
-
대시보드를 선택합니다.
-
보려는 Storage Lens 대시보드 구성의 라디오 버튼을 선택합니다. 그런 다음 대시보드 구성 보기를 선택합니다.
-
태그에서 대시보드와 연결된 태그를 검토합니다.
-
제거할 태그 옆에 있는 제거를 선택합니다.
-
변경 사항 저장을 선택합니다.
다음 AWS CLI 명령은 기존 Storage Lens 대시보드에서 AWS 리소스 태그를 삭제합니다. 이 예 명령을 사용하려면
를 실제 정보로 대체하세요.user input placeholders
aws s3control delete-storage-lens-configuration-tagging --account-id=
222222222222
--config-id=your-configuration-id
--region=us-east-1
다음 AWS SDK for Java 예제에서는
계정에 지정한 Amazon 리소스 이름(ARN)을 사용하여 Storage Lens 대시보드에서 AWS 리소스 태그를 삭제합니다. 이 예제를 사용하려면 111122223333
를 사용자의 정보로 대체합니다.user input
placeholders
예 - S3 Storage Lens 대시보드 구성에 대한 태그 삭제
package aws.example.s3control; import com.amazonaws.AmazonServiceException; import com.amazonaws.SdkClientException; import com.amazonaws.auth.profile.ProfileCredentialsProvider; import com.amazonaws.services.s3control.AWSS3Control; import com.amazonaws.services.s3control.AWSS3ControlClient; import com.amazonaws.services.s3control.model.DeleteStorageLensConfigurationTaggingRequest; import static com.amazonaws.regions.Regions.
US_WEST_2
; public class DeleteDashboardTagging { public static void main(String[] args) { String configurationId = "ConfigurationId
"; String sourceAccountId = "111122223333
"; try { AWSS3Control s3ControlClient = AWSS3ControlClient.builder() .withCredentials(new ProfileCredentialsProvider()) .withRegion(US_WEST_2
) .build(); s3ControlClient.deleteStorageLensConfigurationTagging(new DeleteStorageLensConfigurationTaggingRequest() .withAccountId(sourceAccountId) .withConfigId(configurationId) ); } catch (AmazonServiceException e) { // The call was transmitted successfully, but Amazon S3 couldn't process // it and returned an error response. e.printStackTrace(); } catch (SdkClientException e) { // Amazon S3 couldn't be contacted for a response, or the client // couldn't parse the response from Amazon S3. e.printStackTrace(); } } }