Skip to content

update_partner_app

update_partner_app(
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    arn: Optional[PartnerAppArn] = None,
    maintenance_config: Optional[PartnerAppMaintenanceConfig] = None,
    tier: Optional[NonEmptyString64] = None,
    application_config: Optional[PartnerAppConfig] = None,
    idc_config: Optional[IdcConfigInput] = None,
    auth_type: Optional[PartnerAppAuthType] = None,
    enable_iam_session_based_identity: Optional[Boolean] = None,
    enable_auto_minor_version_upgrade: Optional[Boolean] = None,
    app_version: Optional[MajorMinorVersion] = None,
    client_token: Optional[ClientToken] = None,
    tags: Optional[TagList] = None,
) -> UpdatePartnerAppResponse

Updates all of the SageMaker Partner AI Apps in an account.

Parameters:

  • arn (Optional[PartnerAppArn], default: None ) –

    The ARN of the SageMaker Partner AI App to update.

  • maintenance_config (Optional[PartnerAppMaintenanceConfig], default: None ) –

    Maintenance configuration settings for the SageMaker Partner AI App.

  • tier (Optional[NonEmptyString64], default: None ) –

    Indicates the instance type and size of the cluster attached to the SageMaker Partner AI App.

  • application_config (Optional[PartnerAppConfig], default: None ) –

    Configuration settings for the SageMaker Partner AI App.

  • idc_config (Optional[IdcConfigInput], default: None ) –

    Specifies the Amazon Web Services IAM Identity Center configuration for the SageMaker Partner AI App. Specify this parameter when AuthType is IDC. Apps that use IAM authorization don't use this parameter.

  • auth_type (Optional[PartnerAppAuthType], default: None ) –

    The authorization type that users use to access the SageMaker Partner AI App. Use this parameter to migrate an existing SageMaker Partner AI App from IAM authorization to IDC authorization. Valid values:

    • IAM: Users access the SageMaker Partner AI App with their Amazon Web Services IAM identity.

    • IDC: Users access the SageMaker Partner AI App with their Amazon Web Services IAM Identity Center identity. Specify the Identity Center instance to use in IdcConfig.

  • enable_iam_session_based_identity (Optional[Boolean], default: None ) –

    When set to TRUE, the SageMaker Partner AI App sets the Amazon Web Services IAM session name or the authenticated IAM user as the identity of the SageMaker Partner AI App user.

  • enable_auto_minor_version_upgrade (Optional[Boolean], default: None ) –

    When set to TRUE, the SageMaker Partner AI App is automatically upgraded to the latest minor version during the next scheduled maintenance window, if one is available.

  • app_version (Optional[MajorMinorVersion], default: None ) –

    The semantic version to upgrade the SageMaker Partner AI App to. Must be the same semantic version returned in the AvailableUpgrade field from DescribePartnerApp. Version skipping and downgrades are not supported.

  • client_token (Optional[ClientToken], default: None ) –

    A unique token that guarantees that the call to this API is idempotent.

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

    Each tag consists of a key and an optional value. Tag keys must be unique per resource.

Raises:

  • ConflictException –

    There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact.

  • ResourceNotFound –

    Resource being access is not found.

  • UnknownServiceError –

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

Source code in docs_src/capo_sagemaker/_services/sage_maker.py
def update_partner_app(
    self,
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    arn: Optional["capo_sagemaker.types.partner_app_arn.PartnerAppArn"] = None,
    maintenance_config: Optional[
        "capo_sagemaker.types.partner_app_maintenance_config.PartnerAppMaintenanceConfig"
    ] = None,
    tier: Optional[
        "capo_sagemaker.types.non_empty_string64.NonEmptyString64"
    ] = None,
    application_config: Optional[
        "capo_sagemaker.types.partner_app_config.PartnerAppConfig"
    ] = None,
    idc_config: Optional[
        "capo_sagemaker.types.idc_config_input.IdcConfigInput"
    ] = None,
    auth_type: Optional[
        "capo_sagemaker.types.partner_app_auth_type.PartnerAppAuthType"
    ] = None,
    enable_iam_session_based_identity: Optional[
        "capo_sagemaker.types.boolean.Boolean"
    ] = None,
    enable_auto_minor_version_upgrade: Optional[
        "capo_sagemaker.types.boolean.Boolean"
    ] = None,
    app_version: Optional[
        "capo_sagemaker.types.major_minor_version.MajorMinorVersion"
    ] = None,
    client_token: Optional["capo_sagemaker.types.client_token.ClientToken"] = None,
    tags: Optional["capo_sagemaker.types.tag_list.TagList"] = None,
) -> "capo_sagemaker.types.update_partner_app_response.UpdatePartnerAppResponse":
    """<p>Updates all of the SageMaker Partner AI Apps in an account.</p>

    Args:
        arn: <p>The ARN of the SageMaker Partner AI App to update.</p>
        maintenance_config: <p>Maintenance configuration settings for the SageMaker Partner AI App.</p>
        tier: <p>Indicates the instance type and size of the cluster attached to the SageMaker Partner AI App.</p>
        application_config: <p>Configuration settings for the SageMaker Partner AI App.</p>
        idc_config: <p>Specifies the Amazon Web Services IAM Identity Center configuration for the SageMaker Partner AI App. Specify this parameter when <code>AuthType</code> is <code>IDC</code>. Apps that use <code>IAM</code> authorization don't use this parameter.</p>
        auth_type: <p>The authorization type that users use to access the SageMaker Partner AI App. Use this parameter to migrate an existing SageMaker Partner AI App from <code>IAM</code> authorization to <code>IDC</code> authorization. Valid values:</p> <ul> <li> <p> <code>IAM</code>: Users access the SageMaker Partner AI App with their Amazon Web Services IAM identity.</p> </li> <li> <p> <code>IDC</code>: Users access the SageMaker Partner AI App with their Amazon Web Services IAM Identity Center identity. Specify the Identity Center instance to use in <code>IdcConfig</code>.</p> </li> </ul>
        enable_iam_session_based_identity: <p>When set to <code>TRUE</code>, the SageMaker Partner AI App sets the Amazon Web Services IAM session name or the authenticated IAM user as the identity of the SageMaker Partner AI App user.</p>
        enable_auto_minor_version_upgrade: <p>When set to <code>TRUE</code>, the SageMaker Partner AI App is automatically upgraded to the latest minor version during the next scheduled maintenance window, if one is available.</p>
        app_version: <p>The semantic version to upgrade the SageMaker Partner AI App to. Must be the same semantic version returned in the <code>AvailableUpgrade</code> field from <code>DescribePartnerApp</code>. Version skipping and downgrades are not supported.</p>
        client_token: <p>A unique token that guarantees that the call to this API is idempotent.</p>
        tags: <p>Each tag consists of a key and an optional value. Tag keys must be unique per resource.</p>

    Raises:
        capo_sagemaker.errors.conflict_exception.ConflictException: <p>There was a conflict when you attempted to modify a SageMaker entity such as an <code>Experiment</code> or <code>Artifact</code>.</p>
        capo_sagemaker.errors.resource_not_found.ResourceNotFound: <p>Resource being access is not found.</p>
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_sagemaker.types.update_partner_app_request.UpdatePartnerAppRequest]",
    ) -> OperationResponse[
        "capo_sagemaker.types.update_partner_app_response.UpdatePartnerAppResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.update_partner_app

        output, http_response = (
            capo_sagemaker._operations.sage_maker.update_partner_app.update_partner_app(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdatePartnerApp")
    )
    input_: capo_sagemaker.types.update_partner_app_request.UpdatePartnerAppRequest = {}
    if arn is not None:
        input_["arn"] = arn
    if maintenance_config is not None:
        input_["maintenance_config"] = maintenance_config
    if tier is not None:
        input_["tier"] = tier
    if application_config is not None:
        input_["application_config"] = application_config
    if idc_config is not None:
        input_["idc_config"] = idc_config
    if auth_type is not None:
        input_["auth_type"] = auth_type
    if enable_iam_session_based_identity is not None:
        input_["enable_iam_session_based_identity"] = (
            enable_iam_session_based_identity
        )
    if enable_auto_minor_version_upgrade is not None:
        input_["enable_auto_minor_version_upgrade"] = (
            enable_auto_minor_version_upgrade
        )
    if app_version is not None:
        input_["app_version"] = app_version
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    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