Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Moved MediaPackage code examples into mediapackage directory #483

Merged
merged 3 commits into from
Jun 22, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions aws/sdk/examples/mediapackage-listendpoints/Cargo.toml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
[package]
name = "mediapackage-helloworld"
name = "mediapackage-code-examples"
version = "0.1.0"
authors = ["Alistair McLean <mclean@amazon.com>"]
authors = ["Alistair McLean <mclean@amazon.com>", "Doug Schwartz <dougsch@amazon.com>"]
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
mediapackage = { package = "aws-sdk-mediapackage", path = "../../build/aws-sdk/mediapackage" }
### To use native TLS:
# mediapackage = { package = "aws-sdk-mediapackage", path = "../../build/aws-sdk/mediapackage", default-features = false, features = ["native-tls"] }
tokio = { version = "1", features = ["full"] }
# used only to enable basic logging:
env_logger = "0.8.2"
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
* SPDX-License-Identifier: Apache-2.0.
*/

/// Lists your AWS Elemental MediaPackage channel ARNs and descriptions.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs a rename to mediapackage-helloworld.rs

#[tokio::main]
async fn main() -> Result<(), mediapackage::Error> {
let client = mediapackage::Client::from_env();
let list_channels = client.list_channels().send().await?;

// List out all the mediapackage channels and display their ARN and description.
for c in list_channels.channels.unwrap_or_default() {
let description = c.description.as_deref().unwrap_or_default();
let arn = c.arn.as_deref().unwrap_or_default();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* SPDX-License-Identifier: Apache-2.0.
*/

/// Lists your AWS Elemental MediaPackage endpoint URLs.
#[tokio::main]
async fn main() -> Result<(), mediapackage::Error> {
let client = mediapackage::Client::from_env();
Expand Down