Experimental
@aws-cdk/aws-medialive-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
InputNetworkLocation Class
The network location of a MediaLive input — the AWS cloud, or an on-premises network for MediaLive Anywhere.
Example
ts
declare const stack: Stack;
const network = new medialive.Network(stack, 'Network', {
networkName: 'on-prem-network',
ipPools: ['192.168.1.0/24'],
});
new medialive.Input(stack, 'OnPremInput', {
inputName: 'on-prem-rtp',
inputNetworkLocation: medialive.InputNetworkLocation.ON_PREMISES,
input: medialive.InputConfiguration.rtpPush({
destinations: [{
network,
networkRoutes: [{ cidr: '10.0.0.0/24', gateway: '10.0.0.1' }],
staticIpAddress: '192.168.1.50',
}],
}),
});
python
# stack: Stack
network = medialive.Network(stack, "Network",
network_name="on-prem-network",
ip_pools=["192.168.1.0/24"]
)
medialive.Input(stack, "OnPremInput",
input_name="on-prem-rtp",
input_network_location=medialive.InputNetworkLocation.ON_PREMISES,
input=medialive.InputConfiguration.rtp_push(
destinations=[medialive.PushInputDestination(
network=network,
network_routes=[medialive.NetworkRoute(cidr="10.0.0.0/24", gateway="10.0.0.1")],
static_ip_address="192.168.1.50"
)]
)
)
java
Stack stack;
Network network = Network.Builder.create(stack, "Network")
.networkName("on-prem-network")
.ipPools(List.of("192.168.1.0/24"))
.build();
Input.Builder.create(stack, "OnPremInput")
.inputName("on-prem-rtp")
.inputNetworkLocation(InputNetworkLocation.ON_PREMISES)
.input(InputConfiguration.rtpPush(PushInputProps.builder()
.destinations(List.of(PushInputDestination.builder()
.network(network)
.networkRoutes(List.of(NetworkRoute.builder().cidr("10.0.0.0/24").gateway("10.0.0.1").build()))
.staticIpAddress("192.168.1.50")
.build()))
.build()))
.build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.MediaLive.Alpha
Stack stack;
var network = new Network(stack, "Network", new NetworkProps {
NetworkName = "on-prem-network",
IpPools = new [] { "192.168.1.0/24" }
});
new Input(stack, "OnPremInput", new InputProps {
InputName = "on-prem-rtp",
InputNetworkLocation = InputNetworkLocation.ON_PREMISES,
Input = InputConfiguration.RtpPush(new PushInputProps {
Destinations = new [] { new PushInputDestination {
Network = network,
NetworkRoutes = new [] { new NetworkRoute { Cidr = "10.0.0.0/24", Gateway = "10.0.0.1" } },
StaticIpAddress = "192.168.1.50"
} }
})
});
go
// Install: go get github.com/aws/aws-cdk-go/awsmedialivealpha/v2
var stack Stack
network := medialive.NewNetwork(stack, jsii.String("Network"), &NetworkProps{
NetworkName: jsii.String("on-prem-network"),
IpPools: []*string{
jsii.String("192.168.1.0/24"),
},
})
medialive.NewInput(stack, jsii.String("OnPremInput"), &InputProps{
InputName: jsii.String("on-prem-rtp"),
InputNetworkLocation: medialive.InputNetworkLocation_ON_PREMISES(),
Input: medialive.InputConfiguration_RtpPush(&PushInputProps{
Destinations: []PushInputDestination{
&PushInputDestination{
Network: *Network,
NetworkRoutes: []NetworkRoute{
&NetworkRoute{
Cidr: jsii.String("10.0.0.0/24"),
Gateway: jsii.String("10.0.0.1"),
},
},
StaticIpAddress: jsii.String("192.168.1.50"),
},
},
}),
})
Properties
AWSInputNetworkLocationawsInputNetworkLocationAWSInputNetworkLocationAWSInputNetworkLocationAWSInputNetworkLocationstatic#The input exists in the AWS cloud (the default).
ON_PREMISESInputNetworkLocationon_premisesInputNetworkLocationON_PREMISESInputNetworkLocationON_PREMISESInputNetworkLocationON_PREMISESInputNetworkLocationstatic#The input exists in an on-premises network (MediaLive Anywhere).
The underlying string value passed to CloudFormation.
Methods
of(value: string): InputNetworkLocation // chainable@staticmethod def of(value: str) -> InputNetworkLocationpublic static InputNetworkLocation of(String value)public static InputNetworkLocation Of(string value)func Of(Value *string) InputNetworkLocationstatic#A value not yet modelled by AWS CDK.