All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.media.MediaGraph Maven / Gradle / Ivy

There is a newer version: 2.78.0
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azurenative.media;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.media.MediaGraphArgs;
import com.pulumi.azurenative.media.outputs.MediaGraphAssetSinkResponse;
import com.pulumi.azurenative.media.outputs.MediaGraphRtspSourceResponse;
import com.pulumi.core.Alias;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * The Media Graph.
 * Azure REST API version: 2020-02-01-preview. Prior API version in Azure Native 1.x: 2020-02-01-preview.
 * 
 * ## Example Usage
 * ### Create or update a Media Graph with a clear RTSP Source
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.media.MediaGraph;
 * import com.pulumi.azurenative.media.MediaGraphArgs;
 * import com.pulumi.azurenative.media.inputs.MediaGraphAssetSinkArgs;
 * import com.pulumi.azurenative.media.inputs.MediaGraphRtspSourceArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var mediaGraph = new MediaGraph("mediaGraph", MediaGraphArgs.builder()
 *             .accountName("contosomedia")
 *             .description("updated description")
 *             .mediaGraphName("SampleMediaGraph")
 *             .resourceGroupName("contoso")
 *             .sinks(MediaGraphAssetSinkArgs.builder()
 *                 .assetName("SampleAsset")
 *                 .inputs("rtspSource")
 *                 .name("AssetSink")
 *                 .odataType("#Microsoft.Media.MediaGraphAssetSink")
 *                 .build())
 *             .sources(MediaGraphRtspSourceArgs.builder()
 *                 .endpoint(MediaGraphClearEndpointArgs.builder()
 *                     .credentials(MediaGraphUsernamePasswordCredentialsArgs.builder()
 *                         .odataType("#Microsoft.Media.MediaGraphUsernamePasswordCredentials")
 *                         .password("examplepassword")
 *                         .username("exampleusername")
 *                         .build())
 *                     .odataType("#Microsoft.Media.MediaGraphClearEndpoint")
 *                     .url("rtsp://contoso.com:554/stream1")
 *                     .build())
 *                 .name("rtspSource")
 *                 .odataType("#Microsoft.Media.MediaGraphRtspSource")
 *                 .transport("Http")
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Create or update a Media Graph with an encrypted RTSP Source * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.media.MediaGraph;
 * import com.pulumi.azurenative.media.MediaGraphArgs;
 * import com.pulumi.azurenative.media.inputs.MediaGraphAssetSinkArgs;
 * import com.pulumi.azurenative.media.inputs.MediaGraphRtspSourceArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var mediaGraph = new MediaGraph("mediaGraph", MediaGraphArgs.builder()
 *             .accountName("contosomedia")
 *             .description("updated description")
 *             .mediaGraphName("SampleMediaGraph")
 *             .resourceGroupName("contoso")
 *             .sinks(MediaGraphAssetSinkArgs.builder()
 *                 .assetName("SampleAsset")
 *                 .inputs("rtspSource")
 *                 .name("AssetSink")
 *                 .odataType("#Microsoft.Media.MediaGraphAssetSink")
 *                 .build())
 *             .sources(MediaGraphRtspSourceArgs.builder()
 *                 .endpoint(MediaGraphClearEndpointArgs.builder()
 *                     .credentials(MediaGraphUsernamePasswordCredentialsArgs.builder()
 *                         .odataType("#Microsoft.Media.MediaGraphUsernamePasswordCredentials")
 *                         .password("examplepassword")
 *                         .username("exampleusername")
 *                         .build())
 *                     .odataType("#Microsoft.Media.MediaGraphTlsEndpoint")
 *                     .trustedCertificates(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
 *                     .url("rtsps://contoso.com:443/stream1")
 *                     .validationOptions(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
 *                     .build())
 *                 .name("rtspSource")
 *                 .odataType("#Microsoft.Media.MediaGraphRtspSource")
 *                 .transport("Http")
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:media:MediaGraph SampleMediaGraph /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/mediaGraphs/{mediaGraphName} * ``` * */ @ResourceType(type="azure-native:media:MediaGraph") public class MediaGraph extends com.pulumi.resources.CustomResource { /** * Date the Media Graph was created. * */ @Export(name="created", refs={String.class}, tree="[0]") private Output created; /** * @return Date the Media Graph was created. * */ public Output created() { return this.created; } /** * Media Graph description. * */ @Export(name="description", refs={String.class}, tree="[0]") private Output description; /** * @return Media Graph description. * */ public Output> description() { return Codegen.optional(this.description); } /** * Date the Media Graph was last modified. * */ @Export(name="lastModified", refs={String.class}, tree="[0]") private Output lastModified; /** * @return Date the Media Graph was last modified. * */ public Output lastModified() { return this.lastModified; } /** * The name of the resource. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name of the resource. * */ public Output name() { return this.name; } /** * Media Graph sinks. * */ @Export(name="sinks", refs={List.class,MediaGraphAssetSinkResponse.class}, tree="[0,1]") private Output> sinks; /** * @return Media Graph sinks. * */ public Output> sinks() { return this.sinks; } /** * Media Graph sources. * */ @Export(name="sources", refs={List.class,MediaGraphRtspSourceResponse.class}, tree="[0,1]") private Output> sources; /** * @return Media Graph sources. * */ public Output> sources() { return this.sources; } /** * Media Graph state which indicates the resource allocation status for running the media graph pipeline. * */ @Export(name="state", refs={String.class}, tree="[0]") private Output state; /** * @return Media Graph state which indicates the resource allocation status for running the media graph pipeline. * */ public Output state() { return this.state; } /** * The type of the resource. * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return The type of the resource. * */ public Output type() { return this.type; } /** * * @param name The _unique_ name of the resulting resource. */ public MediaGraph(java.lang.String name) { this(name, MediaGraphArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public MediaGraph(java.lang.String name, MediaGraphArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public MediaGraph(java.lang.String name, MediaGraphArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:media:MediaGraph", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private MediaGraph(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:media:MediaGraph", name, null, makeResourceOptions(options, id), false); } private static MediaGraphArgs makeArgs(MediaGraphArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? MediaGraphArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .aliases(List.of( Output.of(Alias.builder().type("azure-native:media/v20190901preview:MediaGraph").build()), Output.of(Alias.builder().type("azure-native:media/v20200201preview:MediaGraph").build()) )) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param options Optional settings to control the behavior of the CustomResource. */ public static MediaGraph get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new MediaGraph(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy