- AWS Code Sample demonstrates how to list your AWS Elemental MediaStore containers.

/* Copyright 2010-2019, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package aws.example.mediastore; import; import; import; import; import; import java.util.List; /** * List your AWS Elemental MediaStore containers. * * This code expects that you have AWS credentials set up per: * */ public class ListContainers { public static void main(String[] args) { final AWSMediaStore mediastore = AWSMediaStoreClientBuilder.defaultClient(); final ListContainersResult result = mediastore.listContainers(new ListContainersRequest()); final List<Container> containers = result.getContainers(); System.out.println("Your AWS Elemental MediaStore containers are:"); for (Container b : containers) { System.out.println("* " + b.getName()); } } }

Sample Details

Service: mediastore

Last tested: 2018-11-06

Author: rhcarvalho

Type: full-example