Skip to content

start_asset_bundle_import_job

start_asset_bundle_import_job(
    aws_account_id: AwsAccountId,
    asset_bundle_import_job_id: ShortRestrictiveResourceId,
    asset_bundle_import_source: AssetBundleImportSource,
    *,
    config_overrides: Optional[QuickSightClientConfig] = None,
    override_parameters: Optional[AssetBundleImportJobOverrideParameters] = None,
    failure_action: Optional[AssetBundleImportFailureAction] = None,
    override_permissions: Optional[AssetBundleImportJobOverridePermissions] = None,
    override_tags: Optional[AssetBundleImportJobOverrideTags] = None,
    override_validation_strategy: Optional[
        AssetBundleImportJobOverrideValidationStrategy
    ] = None,
) -> StartAssetBundleImportJobResponse

Starts an Asset Bundle import job.

An Asset Bundle import job imports specified Amazon Quick Sight assets into an Amazon Quick Sight account. You can also choose to import a naming prefix and specified configuration overrides. The assets that are contained in the bundle file that you provide are used to create or update a new or existing asset in your Amazon Quick Sight account. Each Amazon Quick Sight account can run up to 5 import jobs concurrently.

The API caller must have the necessary "create", "describe", and "update" permissions in their IAM role to access each resource type that is contained in the bundle file before the resources can be imported.

Parameters:

  • aws_account_id (AwsAccountId) –

    The ID of the Amazon Web Services account to import assets into.

  • asset_bundle_import_job_id (ShortRestrictiveResourceId) –

    The ID of the job. This ID is unique while the job is running. After the job is completed, you can reuse this ID for another job.

  • asset_bundle_import_source (AssetBundleImportSource) –

    The source of the asset bundle zip file that contains the data that you want to import. The file must be in QUICKSIGHT_JSON format.

  • override_parameters (Optional[AssetBundleImportJobOverrideParameters], default: None ) –

    Optional overrides that are applied to the resource configuration before import.

  • failure_action (Optional[AssetBundleImportFailureAction], default: None ) –

    The failure action for the import job.

    If you choose ROLLBACK, failed import jobs will attempt to undo any asset changes caused by the failed job.

    If you choose DO_NOTHING, failed import jobs will not attempt to roll back any asset changes caused by the failed job, possibly keeping the Amazon Quick Sight account in an inconsistent state.

  • override_permissions (Optional[AssetBundleImportJobOverridePermissions], default: None ) –

    Optional permission overrides that are applied to the resource configuration before import.

  • override_tags (Optional[AssetBundleImportJobOverrideTags], default: None ) –

    Optional tag overrides that are applied to the resource configuration before import.

  • override_validation_strategy (Optional[AssetBundleImportJobOverrideValidationStrategy], default: None ) –

    An optional validation strategy override for all analyses and dashboards that is applied to the resource configuration before import.

Raises:

  • AccessDeniedException –

    You don't have access to this item. The provided credentials couldn't be validated. You might not be authorized to carry out the request. Make sure that your account is authorized to use the Amazon Quick Sight service, that your policies have the correct permissions, and that you are using the correct credentials.

  • ConflictException –

    Updating or deleting a resource can cause an inconsistent state.

  • InvalidParameterValueException –

    One or more parameters has a value that isn't valid.

  • LimitExceededException –

    A limit is exceeded.

  • ResourceNotFoundException –

    One or more resources can't be found.

  • ThrottlingException –

    Access is throttled.

  • UnsupportedUserEditionException –

    This error indicates that you are calling an operation on an Amazon Quick Suite subscription where the edition doesn't include support for that operation. Amazon Quick Suite currently has Standard Edition and Enterprise Edition. Not every operation and capability is available in every edition.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_quicksight/_services/quick_sight.py
def start_asset_bundle_import_job(
    self,
    aws_account_id: "capo_quicksight.types.aws_account_id.AwsAccountId",
    asset_bundle_import_job_id: "capo_quicksight.types.short_restrictive_resource_id.ShortRestrictiveResourceId",
    asset_bundle_import_source: "capo_quicksight.types.asset_bundle_import_source.AssetBundleImportSource",
    *,
    config_overrides: Optional[QuickSightClientConfig] = None,
    override_parameters: Optional[
        "capo_quicksight.types.asset_bundle_import_job_override_parameters.AssetBundleImportJobOverrideParameters"
    ] = None,
    failure_action: Optional[
        "capo_quicksight.types.asset_bundle_import_failure_action.AssetBundleImportFailureAction"
    ] = None,
    override_permissions: Optional[
        "capo_quicksight.types.asset_bundle_import_job_override_permissions.AssetBundleImportJobOverridePermissions"
    ] = None,
    override_tags: Optional[
        "capo_quicksight.types.asset_bundle_import_job_override_tags.AssetBundleImportJobOverrideTags"
    ] = None,
    override_validation_strategy: Optional[
        "capo_quicksight.types.asset_bundle_import_job_override_validation_strategy.AssetBundleImportJobOverrideValidationStrategy"
    ] = None,
) -> "capo_quicksight.types.start_asset_bundle_import_job_response.StartAssetBundleImportJobResponse":
    """<p>Starts an Asset Bundle import job.</p> <p>An Asset Bundle import job imports specified Amazon Quick Sight assets into an Amazon Quick Sight account. You can also choose to import a naming prefix and specified configuration overrides. The assets that are contained in the bundle file that you provide are used to create or update a new or existing asset in your Amazon Quick Sight account. Each Amazon Quick Sight account can run up to 5 import jobs concurrently.</p> <p>The API caller must have the necessary <code>"create"</code>, <code>"describe"</code>, and <code>"update"</code> permissions in their IAM role to access each resource type that is contained in the bundle file before the resources can be imported.</p>

    Args:
        aws_account_id: <p>The ID of the Amazon Web Services account to import assets into. </p>
        asset_bundle_import_job_id: <p>The ID of the job. This ID is unique while the job is running. After the job is completed, you can reuse this ID for another job.</p>
        asset_bundle_import_source: <p>The source of the asset bundle zip file that contains the data that you want to import. The file must be in <code>QUICKSIGHT_JSON</code> format. </p>
        override_parameters: <p>Optional overrides that are applied to the resource configuration before import.</p>
        failure_action: <p>The failure action for the import job.</p> <p>If you choose <code>ROLLBACK</code>, failed import jobs will attempt to undo any asset changes caused by the failed job.</p> <p>If you choose <code>DO_NOTHING</code>, failed import jobs will not attempt to roll back any asset changes caused by the failed job, possibly keeping the Amazon Quick Sight account in an inconsistent state.</p>
        override_permissions: <p>Optional permission overrides that are applied to the resource configuration before import.</p>
        override_tags: <p>Optional tag overrides that are applied to the resource configuration before import.</p>
        override_validation_strategy: <p>An optional validation strategy override for all analyses and dashboards that is applied to the resource configuration before import. </p>

    Raises:
        capo_quicksight.errors.access_denied_exception.AccessDeniedException: <p>You don't have access to this item. The provided credentials couldn't be validated. You might not be authorized to carry out the request. Make sure that your account is authorized to use the Amazon Quick Sight service, that your policies have the correct permissions, and that you are using the correct credentials.</p>
        capo_quicksight.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
        capo_quicksight.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One or more parameters has a value that isn't valid.</p>
        capo_quicksight.errors.limit_exceeded_exception.LimitExceededException: <p>A limit is exceeded.</p>
        capo_quicksight.errors.resource_not_found_exception.ResourceNotFoundException: <p>One or more resources can't be found.</p>
        capo_quicksight.errors.throttling_exception.ThrottlingException: <p>Access is throttled.</p>
        capo_quicksight.errors.unsupported_user_edition_exception.UnsupportedUserEditionException: <p>This error indicates that you are calling an operation on an Amazon Quick Suite subscription where the edition doesn't include support for that operation. Amazon Quick Suite currently has Standard Edition and Enterprise Edition. Not every operation and capability is available in every edition.</p>
        capo_quicksight.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_quicksight.types.start_asset_bundle_import_job_request.StartAssetBundleImportJobRequest]",
    ) -> OperationResponse[
        "capo_quicksight.types.start_asset_bundle_import_job_response.StartAssetBundleImportJobResponse"
    ]:
        import capo_quicksight._operations.quick_sight_20180401.start_asset_bundle_import_job

        output, http_response = (
            capo_quicksight._operations.quick_sight_20180401.start_asset_bundle_import_job.start_asset_bundle_import_job(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_quicksight.types.start_asset_bundle_import_job_request.StartAssetBundleImportJobRequest",
    ) -> dict[str, Any]:
        import capo_quicksight.types.start_asset_bundle_import_job_request

        return capo_quicksight.types.start_asset_bundle_import_job_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("StartAssetBundleImportJob", redact_input=_redact_input),
    )
    input_: capo_quicksight.types.start_asset_bundle_import_job_request.StartAssetBundleImportJobRequest = {
        "aws_account_id": aws_account_id,
        "asset_bundle_import_job_id": asset_bundle_import_job_id,
        "asset_bundle_import_source": asset_bundle_import_source,
    }
    if override_parameters is not None:
        input_["override_parameters"] = override_parameters
    if failure_action is not None:
        input_["failure_action"] = failure_action
    if override_permissions is not None:
        input_["override_permissions"] = override_permissions
    if override_tags is not None:
        input_["override_tags"] = override_tags
    if override_validation_strategy is not None:
        input_["override_validation_strategy"] = override_validation_strategy

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