put_origin_endpoint_policy
¶
put_origin_endpoint_policy(
channel_group_name: ResourceName,
channel_name: ResourceName,
origin_endpoint_name: ResourceName,
policy: PolicyText,
*,
config_overrides: Optional[MediaPackageV2ClientConfig] = None,
cdn_auth_configuration: Optional[CdnAuthConfiguration] = None,
) -> PutOriginEndpointPolicyResponse
Attaches an IAM policy to the specified origin endpoint. You can attach only one policy with each request.
Parameters:
-
channel_group_name(ResourceName) –The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.
-
channel_name(ResourceName) –The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group.
-
origin_endpoint_name(ResourceName) –The name that describes the origin endpoint. The name is the primary identifier for the origin endpoint, and and must be unique for your account in the AWS Region and channel.
-
policy(PolicyText) –The policy to attach to the specified origin endpoint.
-
cdn_auth_configuration(Optional[CdnAuthConfiguration], default:None) –The settings for using authorization headers between the MediaPackage endpoint and your CDN.
For information about CDN authorization, see CDN authorization in Elemental MediaPackage in the MediaPackage user guide.
Raises:
-
AccessDeniedException–Access is denied because either you don't have permissions to perform the requested operation or MediaPackage is getting throttling errors with CDN authorization. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see Access Management in the IAM User Guide. Or, if you're using CDN authorization, you will receive this exception if MediaPackage receives a throttling error from Secrets Manager.
-
ConflictException–Updating or deleting this resource can cause an inconsistent state.
-
InternalServerException–Indicates that an error from the service occurred while trying to process a request.
-
ResourceNotFoundException–The specified resource doesn't exist.
-
ThrottlingException–The request throughput limit was exceeded.
-
ValidationException–The input failed to meet the constraints specified by the AWS service.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Creating an Origin Endpoint Policy
>>> client.put_origin_endpoint_policy(channel_group_name='exampleChannelGroup', channel_name='exampleChannel', origin_endpoint_name='exampleOriginEndpoint', policy='{...}')
Source code in docs_src/capo_mediapackagev2/_services/media_package_v2.py
1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 | |