Share via


你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

ApiResource 类

定义

表示 Api 的类,以及可对其进行执行的实例操作。 如果有 ,ResourceIdentifier则可以使用 GetApiResource 方法从 的ArmClient实例构造 ApiResource 。 否则,可以使用 GetApi 方法从其父资源 ApiManagementServiceResource 获取一个。

public class ApiResource : Azure.ResourceManager.ArmResource
type ApiResource = class
    inherit ArmResource
Public Class ApiResource
Inherits ArmResource
继承
ApiResource

构造函数

ApiResource()

初始化 类的新实例 ApiResource 进行模拟。

字段

ResourceType

获取操作的资源类型。

属性

Client

获取 ArmClient 创建此资源客户端的源。

(继承自 ArmResource)
Data

获取表示此功能的数据。

Diagnostics

获取此资源客户端的诊断选项。

(继承自 ArmResource)
Endpoint

获取此资源客户端的基 URI。

(继承自 ArmResource)
HasData

获取当前实例是否具有数据。

Id

获取资源标识符。

(继承自 ArmResource)
Pipeline

获取此资源客户端的管道。

(继承自 ArmResource)

方法

CanUseTagResource(CancellationToken)

检查是否在当前环境中部署了 TagResource API。

(继承自 ArmResource)
CanUseTagResourceAsync(CancellationToken)

检查是否在当前环境中部署了 TagResource API。

(继承自 ArmResource)
CreateResourceIdentifier(String, String, String, String)

生成实例的资源标识符 ApiResource

Delete(WaitUntil, ETag, Nullable<Boolean>, CancellationToken)

删除 API 管理服务实例的指定 API。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}
  • 操作IdApi_Delete
DeleteAsync(WaitUntil, ETag, Nullable<Boolean>, CancellationToken)

删除 API 管理服务实例的指定 API。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}
  • 操作IdApi_Delete
Get(CancellationToken)

获取由其标识符指定的 API 的详细信息。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}
  • 操作IdApi_Get
GetApiDiagnostic(String, CancellationToken)

获取由其标识符指定的 API 的诊断的详细信息。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/诊断/{diagnosticId}
  • 操作IdApiDiagnostic_Get
GetApiDiagnosticAsync(String, CancellationToken)

获取由其标识符指定的 API 的诊断的详细信息。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/诊断/{diagnosticId}
  • 操作IdApiDiagnostic_Get
GetApiDiagnostics()

获取 Api 中的 ApiDiagnosticResources 集合。

GetApiIssue(String, Nullable<Boolean>, CancellationToken)

获取由其标识符指定的 API 的问题的详细信息。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}
  • 操作IdApiIssue_Get
GetApiIssueAsync(String, Nullable<Boolean>, CancellationToken)

获取由其标识符指定的 API 的问题的详细信息。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}
  • 操作IdApiIssue_Get
GetApiIssues()

获取 Api 中的 ApiIssueResources 集合。

GetApiOperation(String, CancellationToken)

获取由其标识符指定的 API 操作的详细信息。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}
  • 操作IdApiOperation_Get
GetApiOperationAsync(String, CancellationToken)

获取由其标识符指定的 API 操作的详细信息。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}
  • 操作IdApiOperation_Get
GetApiOperations()

获取 Api 中的 ApiOperationResources 集合。

GetApiPolicies()

获取 Api 中 ApiPolicyResources 的集合。

GetApiPolicy(PolicyName, Nullable<PolicyExportFormat>, CancellationToken)

获取 API 级别的策略配置。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}
  • 操作IdApiPolicy_Get
GetApiPolicyAsync(PolicyName, Nullable<PolicyExportFormat>, CancellationToken)

获取 API 级别的策略配置。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}
  • 操作IdApiPolicy_Get
GetApiProducts(String, Nullable<Int32>, Nullable<Int32>, CancellationToken)

列出 API 所属的全部产品。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/products
  • 操作IdApiProduct_ListByApis
GetApiProductsAsync(String, Nullable<Int32>, Nullable<Int32>, CancellationToken)

列出 API 所属的全部产品。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/products
  • 操作IdApiProduct_ListByApis
GetApiRelease(String, CancellationToken)

返回 API 版本的详细信息。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}
  • 操作IdApiRelease_Get
GetApiReleaseAsync(String, CancellationToken)

返回 API 版本的详细信息。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}
  • 操作IdApiRelease_Get
GetApiReleases()

获取 Api 中的 ApiReleaseResources 集合。

GetApiRevisionsByService(String, Nullable<Int32>, Nullable<Int32>, CancellationToken)

列出 API 的所有修订版。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/revisions
  • 操作IdApiRevision_ListByService
GetApiRevisionsByServiceAsync(String, Nullable<Int32>, Nullable<Int32>, CancellationToken)

列出 API 的所有修订版。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/revisions
  • 操作IdApiRevision_ListByService
GetApiSchema(String, CancellationToken)

获取 API 级别的架构配置。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}
  • 操作IdApiSchema_Get
GetApiSchemaAsync(String, CancellationToken)

获取 API 级别的架构配置。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}
  • 操作IdApiSchema_Get
GetApiSchemas()

获取 Api 中的 ApiSchemaResources 集合。

GetApiTag(String, CancellationToken)

获取与 API 关联的标记。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}
  • 操作IdTag_GetByApi
GetApiTagAsync(String, CancellationToken)

获取与 API 关联的标记。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}
  • 操作IdTag_GetByApi
GetApiTagDescription(String, CancellationToken)

获取 API 范围内的标记说明

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}
  • 操作IdApiTagDescription_Get
GetApiTagDescriptionAsync(String, CancellationToken)

获取 API 范围内的标记说明

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}
  • 操作IdApiTagDescription_Get
GetApiTagDescriptions()

获取 Api 中的 ApiTagDescriptionResources 集合。

GetApiTags()

获取 Api 中的 ApiTagResources 集合。

GetAsync(CancellationToken)

获取由其标识符指定的 API 的详细信息。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}
  • 操作IdApi_Get
GetAvailableLocations(CancellationToken)

列出所有可用的地理位置。

(继承自 ArmResource)
GetAvailableLocationsAsync(CancellationToken)

列出所有可用的地理位置。

(继承自 ArmResource)
GetEntityTag(CancellationToken)

获取实体状态 (Etag) 由其标识符指定的 API 版本。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}
  • 操作IdApi_GetEntityTag
GetEntityTagAsync(CancellationToken)

获取实体状态 (Etag) 由其标识符指定的 API 版本。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}
  • 操作IdApi_GetEntityTag
GetManagementLock(String, CancellationToken)

按范围获取管理锁。

  • 请求路径/{scope}/providers/Microsoft.Authorization/locks/{lockName}
  • 操作IdManagementLocks_GetByScope
(继承自 ArmResource)
GetManagementLockAsync(String, CancellationToken)

按范围获取管理锁。

  • 请求路径/{scope}/providers/Microsoft.Authorization/locks/{lockName}
  • 操作IdManagementLocks_GetByScope
(继承自 ArmResource)
GetManagementLocks()

获取 ArmResource 中 ManagementLockResources 的集合。

(继承自 ArmResource)
GetOperationsByTags(String, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, CancellationToken)

列出与标记关联的操作集合。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operationsByTags
  • 操作IdOperation_ListByTags
GetOperationsByTagsAsync(String, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, CancellationToken)

列出与标记关联的操作集合。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operationsByTags
  • 操作IdOperation_ListByTags
GetPolicyAssignment(String, CancellationToken)

此操作检索单个策略分配,给定其名称和创建范围。

  • 请求路径/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}
  • 操作IdPolicyAssignments_Get
(继承自 ArmResource)
GetPolicyAssignmentAsync(String, CancellationToken)

此操作检索单个策略分配,给定其名称和创建范围。

  • 请求路径/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}
  • 操作IdPolicyAssignments_Get
(继承自 ArmResource)
GetPolicyAssignments()

获取 ArmResource 中 PolicyAssignmentResources 的集合。

(继承自 ArmResource)
GetTagResource()

获取一个 对象,该对象表示 TagResource 以及可在 ArmResource 中对其进行执行的实例操作。

(继承自 ArmResource)
TryGetApiVersion(ResourceType, String)

获取 API 版本替代(如果已为当前客户端选项设置)。

(继承自 ArmResource)
Update(ETag, ApiPatch, CancellationToken)

汇报API 管理服务实例的指定 API。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}
  • 操作IdApi_Update
UpdateAsync(ETag, ApiPatch, CancellationToken)

汇报API 管理服务实例的指定 API。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}
  • 操作IdApi_Update

扩展方法

GetAuthorizationRoleDefinition(ArmResource, ResourceIdentifier, CancellationToken)

按名称 (GUID) 获取角色定义。

  • 请求路径/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}
  • 操作IdRoleDefinitions_Get
GetAuthorizationRoleDefinitionAsync(ArmResource, ResourceIdentifier, CancellationToken)

按名称 (GUID) 获取角色定义。

  • 请求路径/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}
  • 操作IdRoleDefinitions_Get
GetAuthorizationRoleDefinitions(ArmResource)

获取 ArmResource 中 AuthorizationRoleDefinitionResources 的集合。

GetDenyAssignment(ArmResource, String, CancellationToken)

获取指定的拒绝分配。

  • 请求路径/{scope}/providers/Microsoft.Authorization/denyAssignments/{denyAssignmentId}
  • 操作IdDenyAssignments_Get
GetDenyAssignmentAsync(ArmResource, String, CancellationToken)

获取指定的拒绝分配。

  • 请求路径/{scope}/providers/Microsoft.Authorization/denyAssignments/{denyAssignmentId}
  • 操作IdDenyAssignments_Get
GetDenyAssignments(ArmResource)

获取 ArmResource 中 DenyAssignmentResources 的集合。

GetRoleAssignment(ArmResource, String, String, CancellationToken)

按范围和名称获取角色分配。

  • 请求路径/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}
  • 操作IdRoleAssignments_Get
GetRoleAssignmentAsync(ArmResource, String, String, CancellationToken)

按范围和名称获取角色分配。

  • 请求路径/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}
  • 操作IdRoleAssignments_Get
GetRoleAssignments(ArmResource)

获取 ArmResource 中 RoleAssignmentResources 的集合。

GetRoleAssignmentSchedule(ArmResource, String, CancellationToken)

获取资源范围的指定角色分配计划

  • 请求路径/{scope}/providers/Microsoft.Authorization/roleAssignmentSchedules/{roleAssignmentScheduleName}
  • 操作IdRoleAssignmentSchedules_Get
GetRoleAssignmentScheduleAsync(ArmResource, String, CancellationToken)

获取资源范围的指定角色分配计划

  • 请求路径/{scope}/providers/Microsoft.Authorization/roleAssignmentSchedules/{roleAssignmentScheduleName}
  • 操作IdRoleAssignmentSchedules_Get
GetRoleAssignmentScheduleInstance(ArmResource, String, CancellationToken)

获取指定的角色分配计划实例。

  • 请求路径/{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleInstances/{roleAssignmentScheduleInstanceName}
  • 操作IdRoleAssignmentScheduleInstances_Get
GetRoleAssignmentScheduleInstanceAsync(ArmResource, String, CancellationToken)

获取指定的角色分配计划实例。

  • 请求路径/{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleInstances/{roleAssignmentScheduleInstanceName}
  • 操作IdRoleAssignmentScheduleInstances_Get
GetRoleAssignmentScheduleInstances(ArmResource)

获取 ArmResource 中 RoleAssignmentScheduleInstanceResources 的集合。

GetRoleAssignmentScheduleRequest(ArmResource, String, CancellationToken)

获取指定的角色分配计划请求。

  • 请求路径/{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleRequests/{roleAssignmentScheduleRequestName}
  • 操作IdRoleAssignmentScheduleRequests_Get
GetRoleAssignmentScheduleRequestAsync(ArmResource, String, CancellationToken)

获取指定的角色分配计划请求。

  • 请求路径/{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleRequests/{roleAssignmentScheduleRequestName}
  • 操作IdRoleAssignmentScheduleRequests_Get
GetRoleAssignmentScheduleRequests(ArmResource)

获取 ArmResource 中 RoleAssignmentScheduleRequestResources 的集合。

GetRoleAssignmentSchedules(ArmResource)

获取 ArmResource 中 RoleAssignmentScheduleResources 的集合。

GetRoleEligibilitySchedule(ArmResource, String, CancellationToken)

获取资源范围的指定角色资格计划

  • 请求路径/{scope}/providers/Microsoft.Authorization/roleEligibilitySchedules/{roleEligibilityScheduleName}
  • 操作IdRoleEligibilitySchedules_Get
GetRoleEligibilityScheduleAsync(ArmResource, String, CancellationToken)

获取资源范围的指定角色资格计划

  • 请求路径/{scope}/providers/Microsoft.Authorization/roleEligibilitySchedules/{roleEligibilityScheduleName}
  • 操作IdRoleEligibilitySchedules_Get
GetRoleEligibilityScheduleInstance(ArmResource, String, CancellationToken)

获取指定的角色资格计划实例。

  • 请求路径/{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleInstances/{roleEligibilityScheduleInstanceName}
  • 操作IdRoleEligibilityScheduleInstances_Get
GetRoleEligibilityScheduleInstanceAsync(ArmResource, String, CancellationToken)

获取指定的角色资格计划实例。

  • 请求路径/{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleInstances/{roleEligibilityScheduleInstanceName}
  • 操作IdRoleEligibilityScheduleInstances_Get
GetRoleEligibilityScheduleInstances(ArmResource)

获取 ArmResource 中 RoleEligibilityScheduleInstanceResources 的集合。

GetRoleEligibilityScheduleRequest(ArmResource, String, CancellationToken)

获取指定的角色资格计划请求。

  • 请求路径/{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleRequests/{roleEligibilityScheduleRequestName}
  • 操作IdRoleEligibilityScheduleRequests_Get
GetRoleEligibilityScheduleRequestAsync(ArmResource, String, CancellationToken)

获取指定的角色资格计划请求。

  • 请求路径/{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleRequests/{roleEligibilityScheduleRequestName}
  • 操作IdRoleEligibilityScheduleRequests_Get
GetRoleEligibilityScheduleRequests(ArmResource)

获取 ArmResource 中 RoleEligibilityScheduleRequestResources 的集合。

GetRoleEligibilitySchedules(ArmResource)

获取 ArmResource 中 RoleEligibilityScheduleResources 的集合。

GetRoleManagementPolicies(ArmResource)

获取 ArmResource 中 RoleManagementPolicyResources 的集合。

GetRoleManagementPolicy(ArmResource, String, CancellationToken)

获取资源范围的指定角色管理策略

  • 请求路径/{scope}/providers/Microsoft.Authorization/roleManagementPolicies/{roleManagementPolicyName}
  • 操作IdRoleManagementPolicies_Get
GetRoleManagementPolicyAssignment(ArmResource, String, CancellationToken)

获取资源范围的指定角色管理策略分配

  • 请求路径/{scope}/providers/Microsoft.Authorization/roleManagementPolicyAssignments/{roleManagementPolicyAssignmentName}
  • 操作IdRoleManagementPolicyAssignments_Get
GetRoleManagementPolicyAssignmentAsync(ArmResource, String, CancellationToken)

获取资源范围的指定角色管理策略分配

  • 请求路径/{scope}/providers/Microsoft.Authorization/roleManagementPolicyAssignments/{roleManagementPolicyAssignmentName}
  • 操作IdRoleManagementPolicyAssignments_Get
GetRoleManagementPolicyAssignments(ArmResource)

获取 ArmResource 中 RoleManagementPolicyAssignmentResources 的集合。

GetRoleManagementPolicyAsync(ArmResource, String, CancellationToken)

获取资源范围的指定角色管理策略

  • 请求路径/{scope}/providers/Microsoft.Authorization/roleManagementPolicies/{roleManagementPolicyName}
  • 操作IdRoleManagementPolicies_Get
GetSystemAssignedIdentity(ArmResource)

获取表示 SystemAssignedIdentityResource 的对象,以及可在 ArmResource 中对其进行执行的实例操作。

GetLinkerResource(ArmResource, String, CancellationToken)

返回给定名称的链接器资源。

  • 请求路径/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}
  • 操作IdLinker_Get
GetLinkerResourceAsync(ArmResource, String, CancellationToken)

返回给定名称的链接器资源。

  • 请求路径/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}
  • 操作IdLinker_Get
GetLinkerResources(ArmResource)

获取 ArmResource 中的 LinkerResources 集合。

适用于