Skip to content

create_storage_configuration

create_storage_configuration(
    s3: S3StorageConfiguration,
    *,
    config_overrides: Optional[IVSRealTimeClientConfig] = None,
    name: Optional[StorageConfigurationName] = None,
    tags: Optional[Tags] = None,
) -> CreateStorageConfigurationResponse

Creates a new storage configuration, used to enable recording to Amazon S3. When a StorageConfiguration is created, IVS will modify the S3 bucketPolicy of the provided bucket. This will ensure that IVS has sufficient permissions to write content to the provided bucket.

Parameters:

  • name (Optional[StorageConfigurationName], default: None ) –

    Storage configuration name. The value does not need to be unique.

  • s3 (S3StorageConfiguration) –

    A complex type that contains a storage configuration for where recorded video will be stored.

  • tags (Optional[Tags], default: None ) –

    Tags attached to the resource. Array of maps, each of the form string:string (key:value). See Best practices and strategies in Tagging AWS Resources and Tag Editor for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS has no constraints on tags beyond what is documented there.

Raises:

Source code in docs_src/capo_ivs_realtime/_services/ivs_real_time.py
def create_storage_configuration(
    self,
    s3: "capo_ivs_realtime.types.s3_storage_configuration.S3StorageConfiguration",
    *,
    config_overrides: Optional[IVSRealTimeClientConfig] = None,
    name: Optional[
        "capo_ivs_realtime.types.storage_configuration_name.StorageConfigurationName"
    ] = None,
    tags: Optional["capo_ivs_realtime.types.tags.Tags"] = None,
) -> "capo_ivs_realtime.types.create_storage_configuration_response.CreateStorageConfigurationResponse":
    """<p>Creates a new storage configuration, used to enable recording to Amazon S3. When a StorageConfiguration is created, IVS will modify the S3 bucketPolicy of the provided bucket. This will ensure that IVS has sufficient permissions to write content to the provided bucket.</p>

    Args:
        name: <p>Storage configuration name. The value does not need to be unique.</p>
        s3: <p>A complex type that contains a storage configuration for where recorded video will be stored.</p>
        tags: <p>Tags attached to the resource. Array of maps, each of the form <code>string:string (key:value)</code>. See <a href="https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html">Best practices and strategies</a> in <i>Tagging AWS Resources and Tag Editor</i> for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS has no constraints on tags beyond what is documented there.</p>

    Raises:
        capo_ivs_realtime.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
        capo_ivs_realtime.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
        capo_ivs_realtime.errors.internal_server_exception.InternalServerException: <p>Unexpected error during processing of request.</p>
        capo_ivs_realtime.errors.pending_verification.PendingVerification: <p>Your account is pending verification.</p>
        capo_ivs_realtime.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource which does not exist.</p>
        capo_ivs_realtime.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>Request would cause a service quota to be exceeded.</p>
        capo_ivs_realtime.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_ivs_realtime.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ivs_realtime.types.create_storage_configuration_request.CreateStorageConfigurationRequest]",
    ) -> OperationResponse[
        "capo_ivs_realtime.types.create_storage_configuration_response.CreateStorageConfigurationResponse"
    ]:
        import capo_ivs_realtime._operations.amazon_interactive_video_service_real_time.create_storage_configuration

        output, http_response = (
            capo_ivs_realtime._operations.amazon_interactive_video_service_real_time.create_storage_configuration.create_storage_configuration(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateStorageConfiguration")
    )
    input_: capo_ivs_realtime.types.create_storage_configuration_request.CreateStorageConfigurationRequest = {
        "s3": s3
    }
    if name is not None:
        input_["name"] = name
    if tags is not None:
        input_["tags"] = tags

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output