Skip to content

create_edge_packaging_job async

create_edge_packaging_job(
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    edge_packaging_job_name: Optional[EntityName] = None,
    compilation_job_name: Optional[EntityName] = None,
    model_name: Optional[EntityName] = None,
    model_version: Optional[EdgeVersion] = None,
    role_arn: Optional[RoleArn] = None,
    output_config: Optional[EdgeOutputConfig] = None,
    resource_key: Optional[KmsKeyId] = None,
    tags: Optional[TagList] = None,
) -> None

Starts a SageMaker Edge Manager model packaging job. Edge Manager will use the model artifacts from the Amazon Simple Storage Service bucket that you specify. After the model has been packaged, Amazon SageMaker saves the resulting artifacts to an S3 bucket that you specify.

Parameters:

  • edge_packaging_job_name (Optional[EntityName], default: None ) –

    The name of the edge packaging job.

  • compilation_job_name (Optional[EntityName], default: None ) –

    The name of the SageMaker Neo compilation job that will be used to locate model artifacts for packaging.

  • model_name (Optional[EntityName], default: None ) –

    The name of the model.

  • model_version (Optional[EdgeVersion], default: None ) –

    The version of the model.

  • role_arn (Optional[RoleArn], default: None ) –

    The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to download and upload the model, and to contact SageMaker Neo.

  • output_config (Optional[EdgeOutputConfig], default: None ) –

    Provides information about the output location for the packaged model.

  • resource_key (Optional[KmsKeyId], default: None ) –

    The Amazon Web Services KMS key to use when encrypting the EBS volume the edge packaging job runs on.

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

    Creates tags for the packaging job.

Raises:

  • ResourceLimitExceeded –

    You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created.

  • UnknownServiceError –

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

Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
async def create_edge_packaging_job(
    self,
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    edge_packaging_job_name: Optional[
        "capo_sagemaker.types.entity_name.EntityName"
    ] = None,
    compilation_job_name: Optional[
        "capo_sagemaker.types.entity_name.EntityName"
    ] = None,
    model_name: Optional["capo_sagemaker.types.entity_name.EntityName"] = None,
    model_version: Optional["capo_sagemaker.types.edge_version.EdgeVersion"] = None,
    role_arn: Optional["capo_sagemaker.types.role_arn.RoleArn"] = None,
    output_config: Optional[
        "capo_sagemaker.types.edge_output_config.EdgeOutputConfig"
    ] = None,
    resource_key: Optional["capo_sagemaker.types.kms_key_id.KmsKeyId"] = None,
    tags: Optional["capo_sagemaker.types.tag_list.TagList"] = None,
) -> None:
    """<p>Starts a SageMaker Edge Manager model packaging job. Edge Manager will use the model artifacts from the Amazon Simple Storage Service bucket that you specify. After the model has been packaged, Amazon SageMaker saves the resulting artifacts to an S3 bucket that you specify.</p>

    Args:
        edge_packaging_job_name: <p>The name of the edge packaging job.</p>
        compilation_job_name: <p>The name of the SageMaker Neo compilation job that will be used to locate model artifacts for packaging.</p>
        model_name: <p>The name of the model.</p>
        model_version: <p>The version of the model.</p>
        role_arn: <p>The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to download and upload the model, and to contact SageMaker Neo.</p>
        output_config: <p>Provides information about the output location for the packaged model.</p>
        resource_key: <p>The Amazon Web Services KMS key to use when encrypting the EBS volume the edge packaging job runs on.</p>
        tags: <p>Creates tags for the packaging job.</p>

    Raises:
        capo_sagemaker.errors.resource_limit_exceeded.ResourceLimitExceeded: <p> You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. </p>
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sagemaker.types.create_edge_packaging_job_request.CreateEdgePackagingJobRequest]",
    ) -> AsyncOperationResponse[None]:
        import capo_sagemaker._operations.sage_maker.create_edge_packaging_job

        (
            output,
            http_response,
        ) = await capo_sagemaker._operations.sage_maker.create_edge_packaging_job.async_create_edge_packaging_job(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateEdgePackagingJob")
    )
    input_: capo_sagemaker.types.create_edge_packaging_job_request.CreateEdgePackagingJobRequest = {}
    if edge_packaging_job_name is not None:
        input_["edge_packaging_job_name"] = edge_packaging_job_name
    if compilation_job_name is not None:
        input_["compilation_job_name"] = compilation_job_name
    if model_name is not None:
        input_["model_name"] = model_name
    if model_version is not None:
        input_["model_version"] = model_version
    if role_arn is not None:
        input_["role_arn"] = role_arn
    if output_config is not None:
        input_["output_config"] = output_config
    if resource_key is not None:
        input_["resource_key"] = resource_key
    if tags is not None:
        input_["tags"] = tags

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output