View a markdown version of this page

SageMaker 带有 mlFlow 的亚马逊的操作、资源和条件密钥 - 服务授权参考

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

SageMaker 带有 mlFlow 的亚马逊的操作、资源和条件密钥

SageMaker 带有 mlFlow(服务前缀:sagemaker-mlflow)的 Amazon 提供以下特定于服务的资源、操作和条件上下文密钥,供在 IAM 权限策略中使用。

参考:

亚马逊通过 mlFlow 定义 SageMaker 的操作

您可以在 IAM 策略语句的 Action 元素中指定以下操作。可以使用策略授予在 AWS中执行操作的权限。您在策略中使用一项操作时,通常使用相同的名称允许或拒绝对 API 操作或 CLI 命令的访问。但在某些情况下,单一动作可控制对多项操作的访问。还有某些操作需要多种不同的动作。

操作表的访问级别列描述如何对操作进行分类(列出、读取、权限管理或标记)。此分类可以帮助您了解当您在策略中使用操作时,相应操作授予的访问级别。有关访问级别的更多信息,请参阅策略摘要中的访问级别

操作表的资源类型列指示每项操作是否支持资源级权限。如果该列没有任何值,您必须在策略语句的 Resource 元素中指定策略应用的所有资源(“*”)。通过在 IAM policy 中使用条件来筛选访问权限,以控制是否可以在资源或请求中使用特定标签键。如果操作具有一个或多个必需资源,则调用方必须具有使用这些资源来使用该操作的权限。必需资源在表中以星号 (*) 表示。如果您在 IAM policy 中使用 Resource 元素限制资源访问权限,则必须为每种必需的资源类型添加 ARN 或模式。某些操作支持多种资源类型。如果资源类型是可选的(未指示为必需),则可以选择使用一种可选资源类型。

操作表的条件键列包括可以在策略语句的 Condition 元素中指定的键。有关与服务资源关联的条件键的更多信息,请参阅资源类型表的条件键列。

操作表的依赖操作列显示成功调用操作可能需要的其他权限。除了操作本身的权限以外,可能还需要这些权限。若某个操作指定依赖操作,则这些依赖关系可能适用于为该操作定义的其他资源,而不仅仅是表中列出的第一个资源。

注意

资源条件键在资源类型表中列出。您可以在操作表的资源类型(* 为必需)列中找到应用于某项操作的资源类型的链接。资源类型表中的资源类型包括条件密钥列,这是应用于操作表中操作的资源条件键。

有关下表中各列的详细信息,请参阅操作表

操作 描述 访问级别 资源类型(* 为必需) 条件键 相关操作
AccessUI 授予权限以访问 MLflow 用户界面 读取
CreateExperiment 授予权限以创建 MLflow 实验 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

CreateModelVersion 授予权限以创建新模型版本 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

CreateRegisteredModel 授予权限以创建注册模型 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

CreateRun 授予权限以在实验中创建新的运行 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

DeleteExperiment 授予权限以将 MLflow 实验标记为删除 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

DeleteLoggedModel 授予权限以在 MLflow 中删除记录的模型 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

DeleteLoggedModelTag 授予权限以在 MLflow 中删除记录的模型的标签 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

DeleteModelVersion 授予删除模型版本的权限 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

DeleteModelVersionTag 授予权限以删除模型版本标签 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

DeleteRegisteredModel 授予权限以删除注册模型 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

DeleteRegisteredModelAlias 授予权限以删除注册模型别名 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

DeleteRegisteredModelTag 授予权限以删除模型标签 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

DeleteRun 授予权限以将运行标记为删除 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

DeleteTag 授予权限以删除运行标签 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

DeleteTraceTag 授予权限以在 MLflow 中删除跟踪标签 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

DeleteTraces 授予权限以在 MLflow 中删除跟踪 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

EndTrace 授予权限以在 MLflow 中结束跟踪 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

FinalizeLoggedModel 授予权限以在 MLflow 中设置记录的模型的状态 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

GetDownloadURIForModelVersionArtifacts 授予权限以获取 URI 以下载特定模型版本的模型构件 读取

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

GetExperiment 授予权限以获取 MLflow 实验的元数据 读取

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

GetExperimentByName 授予权限以按名称获取 MLflow 实验元数据 读取

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

GetLatestModelVersions 授予权限以获取最新模型版本 列表

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

GetLoggedModel 授予权限以在 MLflow 中获取记录的模型 读取

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

GetMetricHistory 授予权限以获取给定运行中指定指标的所有值 读取

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

GetModelVersion 授予权限以按模型名称和版本获取模型版本 读取

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

GetModelVersionByAlias 授予权限以在 MLflow 中按别名获取模型版本 读取

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

GetRegisteredModel 授予权限以获取注册模型 读取

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

GetRun 授予权限以获取运行的元数据、指标、参数和标签 读取

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

GetTraceInfo 授予权限以在 MLflow 中获取有关跟踪的信息 读取

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

ListArtifacts 授予权限以列出运行的构件 列表

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

ListLoggedModelArtifacts 授予权限以在 MLflow 中列出记录的模型的构件 列表

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

LogBatch 授予记录一批运行的指标、参数和标签的权限 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

LogInputs 授予权限以记录运行的输入 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

LogLoggedModelParams 授予权限以在 MLflow 中记录记录的模型的参数 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

LogMetric 授予权限以记录运行指标 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

LogModel 授予权限以记录与运行关联的模型 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

LogOutputs 授予权限以在 MLflow 中记录运行的输出(例如模型) 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

LogParam 授予权限以记录运行期间跟踪的参数 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

RenameRegisteredModel 授予权限以重命名注册模型 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

RestoreExperiment 授予权限以恢复标记为删除的实验 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

RestoreRun 授予权限以恢复已删除的运行 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

SearchExperiments 授予权限以搜索 MLFlow 实验 读取

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

SearchLoggedModels 授予权限以在 MLflow 中搜索记录的模型 读取

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

SearchModelVersions 授予权限以搜索模型版本 读取

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

SearchRegisteredModels 授予权限以在 MLflow 中搜索注册模型 读取

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

SearchRuns 授予权限以搜索满足表达式的运行 读取

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

SearchTraces 授予权限以在 MLflow 中搜索跟踪 读取

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

SetExperimentTag 授予权限以设置实验标签 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

SetLoggedModelTags 授予权限以在 MLflow 中设置记录的模型的标签 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

SetModelVersionTag 授予权限以为模型版本设置标签 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

SetRegisteredModelAlias 授予权限以设置注册模型别名 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

SetRegisteredModelTag 授予权限以设置注册模型标签 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

SetTag 授予权限以设置运行标签 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

SetTraceTag 授予权限以在 MLflow 中设置跟踪标签 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

StartTrace 授予权限以在 MLflow 中启动跟踪 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

TransitionModelVersionStage 授予权限以将模型版本过渡到特定阶段 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

UpdateExperiment 授予权限以更新 MLFlow 实验的元数据 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

UpdateModelVersion 授予权限以更新模型版本 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

UpdateRegisteredModel 授予权限以更新注册模型 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

UpdateRun 授予权限以更新运行元数据 写入

mlflow-tracking-server*

aws:ResourceTag/${TagKey}

亚马逊通过 mlFlow 定义 SageMaker 的资源类型

以下资源类型是由该服务定义的,可以在 IAM 权限策略语句的 Resource 元素中使用这些资源类型。操作表中的每个操作指定了可以使用该操作指定的资源类型。您也可以在策略中包含条件键,从而定义资源类型。这些键显示在资源类型表的最后一列。有关下表中各列的详细信息,请参阅资源类型表

资源类型 ARN 条件键
mlflow-tracking-server arn:${Partition}:sagemaker:${Region}:${Account}:mlflow-tracking-server/${MlflowTrackingServerName}

带有 mlFlow 的亚马逊 SageMaker 的条件密钥

SageMaker 带有 mlFlow 的 Amazon 定义了以下条件键,这些条件键可用于 IAM 策略的Condition元素。您可以使用这些键进一步细化应用策略语句的条件。有关下表中各列的详细信息,请参阅条件键表

要查看适用于所有服务的全局条件键,请参阅 AWS 全局条件上下文键

条件键 描述 Type
aws:ResourceTag/${TagKey} 按标签键值对筛选访问 字符串