create_stream_url
async
¶
create_stream_url(
identifier: Identifier,
application_identifier: Identifier,
protocol: Protocol,
url_expires_after_minutes: UrlExpiresAfterMinutes,
locations: LocationList,
*,
config_overrides: Optional[AsyncGameLiftStreamsClientConfig] = None,
usage_limit: Optional[UsageLimit] = None,
description: Optional[Description] = None,
session_length_seconds: Optional[SessionLengthSeconds] = None,
additional_launch_args: Optional[GameLaunchArgList] = None,
additional_environment_variables: Optional[EnvironmentVariables] = None,
role_arn: Optional[IamRoleArn] = None,
display_configuration: Optional[DisplayConfiguration] = None,
client_token: Optional[ClientToken] = None,
) -> CreateStreamUrlOutput
Creates a stream URL that grants temporary access to a stream session in a web browser without requiring an Amazon Web Services account or client integration.
You can use the stream URL to start a stream session up to the number of times set by UsageLimit, until it expires after UrlExpiresAfterMinutes. Each successful use starts a new stream session.
To make the request idempotent, provide a ClientToken.
Parameters:
-
identifier(Identifier) –An Amazon Resource Name (ARN) or ID that uniquely identifies the stream group resource. Example ARN:
arn:aws:gameliftstreams:us-west-2:111122223333:streamgroup/sg-1AB2C3De4. Example ID:sg-1AB2C3De4.The stream session runs in this stream group.
-
application_identifier(Identifier) –An Amazon Resource Name (ARN) or ID that uniquely identifies the application resource. Example ARN:
arn:aws:gameliftstreams:us-west-2:111122223333:application/a-9ZY8X7Wv6. Example ID:a-9ZY8X7Wv6.This application must be associated with the stream group.
-
protocol(Protocol) –The data transport protocol for the stream session. Amazon GameLift Streams supports
WebRTC. -
url_expires_after_minutes(UrlExpiresAfterMinutes) –The number of minutes after creation that the stream URL remains valid. After this period, the status of the stream URL changes to
EXPIREDand it can no longer start stream sessions. The minimum is 1 minute. For the maximum, see Regions, quotas, and limitations in the Amazon GameLift Streams Developer Guide. -
usage_limit(Optional[UsageLimit], default:None) –The maximum number of times the stream URL can start a stream session. Each successful use reduces the remaining uses by one. The minimum is 1, and the default is 1. For the maximum, see Regions, quotas, and limitations in the Amazon GameLift Streams Developer Guide.
-
description(Optional[Description], default:None) –A descriptive label for the stream URL.
-
locations(LocationList) –A list of locations, in order of preference, where Amazon GameLift Streams can place the stream session. Specify each location by its Amazon Web Services Region code, for example
us-east-1. For a complete list of locations that Amazon GameLift Streams supports, refer to Regions, quotas, and limitations in the Amazon GameLift Streams Developer Guide. -
session_length_seconds(Optional[SessionLengthSeconds], default:None) –The maximum length of time, in seconds, that a stream session started from this stream URL can run. Valid values are 1-86400 seconds (1 second to 24 hours). The default is 43200 seconds (12 hours).
-
additional_launch_args(Optional[GameLaunchArgList], default:None) –A list of CLI arguments that are sent to the streaming server when a stream session launches. You can use this to configure the application or stream session details. You can also provide custom arguments that Amazon GameLift Streams passes to your game client.
AdditionalEnvironmentVariablesandAdditionalLaunchArgshave similar purposes.AdditionalEnvironmentVariablespasses data using environment variables; whileAdditionalLaunchArgspasses data using command-line arguments. -
additional_environment_variables(Optional[EnvironmentVariables], default:None) –A set of options that you can use to control the stream session runtime environment, expressed as a set of key-value pairs. You can use this to configure the application or stream session details. You can also provide custom environment variables that Amazon GameLift Streams passes to your game client.
If you want to debug your application with environment variables, we recommend that you do so in a local environment outside of Amazon GameLift Streams. For more information, refer to the Compatibility Guidance in the troubleshooting section of the Developer Guide.
AdditionalEnvironmentVariablesandAdditionalLaunchArgshave similar purposes.AdditionalEnvironmentVariablespasses data using environment variables; whileAdditionalLaunchArgspasses data using command-line arguments. -
role_arn(Optional[IamRoleArn], default:None) –The Amazon Resource Name (ARN) of the IAM role that Amazon GameLift Streams assumes during stream sessions started from this stream URL. For more information, see Provide AWS credentials to your streaming application in the Amazon GameLift Streams Developer Guide.
-
display_configuration(Optional[DisplayConfiguration], default:None) –The display settings, such as resolution, for stream sessions started from this stream URL.
-
client_token(Optional[ClientToken], default:None) –A unique, case-sensitive identifier that you provide to ensure this request is idempotent. If you retry a request with the same
ClientToken, Amazon GameLift Streams returns the original response without performing the operation again.
Raises:
-
AccessDeniedException–You don't have the required permissions to access this Amazon GameLift Streams resource. Correct the permissions before you try again.
-
ConflictException–The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.
-
InternalServerException–The service encountered an internal error and is unable to complete the request.
-
ResourceNotFoundException–The resource specified in the request was not found. Correct the request before you try again.
-
ServiceQuotaExceededException–The request would cause the resource to exceed an allowed service quota. Resolve the issue before you try again.
-
ThrottlingException–The request was denied due to request throttling. Retry the request after the suggested wait time.
-
ValidationException–One or more parameter values in the request fail to satisfy the specified constraints. Correct the invalid parameter values before retrying the request.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_gameliftstreams/_services/async_game_lift_streams.py
511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 | |