swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  description: This API describe ACE Provisioning ManagementPartner
  title: ACE Provisioning ManagementPartner
  version: 2018-02-01
  x-apisguru-categories:
    - cloud
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png
  x-origin:
    - format: swagger
      url: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/managementpartner/resource-manager/Microsoft.ManagementPartner/preview/2018-02-01/ManagementPartner.json
      version: "2.0"
  x-providerName: azure.com
  x-serviceName: managementpartner-ManagementPartner
  x-tags:
    - Azure
    - Microsoft
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  azure_auth:
    authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
    description: Azure Active Directory OAuth2 Flow
    flow: implicit
    scopes:
      user_impersonation: impersonate your user account
    type: oauth2
parameters:
  ApiVersionParameter:
    description: Supported version.
    in: query
    name: api-version
    required: true
    type: string
  PartnerIdParameter:
    description: Id of the Partner
    in: path
    name: partnerId
    required: true
    type: string
    x-ms-parameter-location: method
paths:
  /providers/Microsoft.ManagementPartner/operations:
    get:
      description: List all the operations.
      operationId: Operation_List
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: List all the operations.
          schema:
            $ref: "#/definitions/OperationList"
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Get operations.
      tags:
        - Operation
      x-ms-examples:
        GetOperations:
          parameters:
            api-version: 2018-02-01
          responses:
            "200":
              body:
                value:
                  - display:
                      description: Read All ManagementPartner
                      operation: Get ManagementPartner
                      provider: Microsoft ManagementPartner
                      resource: ManagementPartner
                    name: Microsoft.ManagementPartner/partners/read
                  - display:
                      description: Create any ManagementPartner
                      operation: Create ManagementPartner
                      provider: Microsoft ManagementPartner
                      resource: ManagementPartner
                    name: Microsoft.ManagementPartner/partners/write
                  - display:
                      description: Update any ManagementPartner
                      operation: Update ManagementPartner
                      provider: Microsoft ManagementPartner
                      resource: ManagementPartner
                    name: Microsoft.ManagementPartner/partners/action
                  - display:
                      description: Delete any ManagementPartner
                      operation: Delete ManagementPartner
                      provider: Microsoft ManagementPartner
                      resource: ManagementPartner
                    name: Microsoft.ManagementPartner/partners/delete
      x-ms-pageable:
        nextLinkName: nextLink
  /providers/Microsoft.ManagementPartner/partners:
    get:
      description: Get the management partner using the objectId and tenantId.
      operationId: Partners_Get
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Get the details of the `Partner`.
          schema:
            $ref: "#/definitions/PartnerResponse"
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Get a specific `Partner`.
      tags:
        - Partners
      x-ms-examples:
        GetPartnerDetails:
          parameters:
            api-version: 2018-02-01
          responses:
            "200":
              body:
                etag: 3
                id: /providers/microsoft.managementpartner/partners
                name: "123456"
                properties:
                  createdTime: 2018-01-20T01:23:40.5280496Z
                  objectId: aa67f786-0552-423e-8849-244ed12bf581
                  partnerId: "123456"
                  partnerName: Test_jefl
                  state: Active
                  tenantId: 1b1121dd-6900-412a-af73-e8d44f81e1c1
                  updatedTime: 2018-01-20T01:52:57.9126052Z
                  version: "3"
                type: Microsoft.ManagementPartner/partner
  "/providers/Microsoft.ManagementPartner/partners/{partnerId}":
    delete:
      description: Delete the management partner for the objectId and tenantId.
      operationId: Partner_Delete
      parameters:
        - $ref: "#/parameters/PartnerIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Deleted the `Partner`.
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Delete a specific `Partner`.
      tags:
        - Partner
      x-ms-examples:
        DeletePartnerDetails:
          parameters:
            api-version: 2018-02-01
            partnerId: "123456"
          responses:
            "200":
              body: ""
    get:
      description: Get the management partner using the partnerId, objectId and tenantId.
      operationId: Partner_Get
      parameters:
        - $ref: "#/parameters/PartnerIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Get the details of the `Partner`.
          schema:
            $ref: "#/definitions/PartnerResponse"
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Get a specific `Partner`.
      tags:
        - Partner
      x-ms-examples:
        GetPartnerDetails:
          parameters:
            api-version: 2018-02-01
            partnerId: "123456"
          responses:
            "200":
              body:
                etag: 3
                id: /providers/microsoft.managementpartner/partners/123456
                name: "123456"
                properties:
                  createdTime: 2018-01-20T01:23:40.5280496Z
                  objectId: aa67f786-0552-423e-8849-244ed12bf581
                  partnerId: "123456"
                  partnerName: Test_jefl
                  state: Active
                  tenantId: 1b1121dd-6900-412a-af73-e8d44f81e1c1
                  updatedTime: 2018-01-20T01:52:57.9126052Z
                  version: "3"
                type: Microsoft.ManagementPartner/partner
    patch:
      description: Update the management partner for the objectId and tenantId.
      operationId: Partner_Update
      parameters:
        - $ref: "#/parameters/PartnerIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Get the details of the `Partner`.
          schema:
            $ref: "#/definitions/PartnerResponse"
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Update a specific `Partner`.
      tags:
        - Partner
      x-ms-examples:
        PatchPartnerDetails:
          parameters:
            api-version: 2018-02-01
            partnerId: "123456"
          responses:
            "200":
              body:
                etag: 3
                id: /providers/microsoft.managementpartner/partners/123456
                name: "123456"
                properties:
                  createdTime: 2018-01-20T01:23:40.5280496Z
                  objectId: aa67f786-0552-423e-8849-244ed12bf581
                  partnerId: "123456"
                  partnerName: Test_jefl
                  state: Active
                  tenantId: 1b1121dd-6900-412a-af73-e8d44f81e1c1
                  updatedTime: 2018-01-20T01:52:57.9126052Z
                  version: "3"
                type: Microsoft.ManagementPartner/partner
    put:
      description: Create a management partner for the objectId and tenantId.
      operationId: Partner_Create
      parameters:
        - $ref: "#/parameters/PartnerIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Get the details of the `Partner`.
          schema:
            $ref: "#/definitions/PartnerResponse"
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Create a specific `Partner`.
      tags:
        - Partner
      x-ms-examples:
        PutPartnerDetails:
          parameters:
            api-version: 2018-02-01
            partnerId: "123456"
          responses:
            "200":
              body:
                etag: 3
                id: /providers/microsoft.managementpartner/partners/123456
                name: "123456"
                properties:
                  createdTime: 2018-01-20T01:23:40.5280496Z
                  objectId: aa67f786-0552-423e-8849-244ed12bf581
                  partnerId: "123456"
                  partnerName: Test_jefl
                  state: Active
                  tenantId: 1b1121dd-6900-412a-af73-e8d44f81e1c1
                  updatedTime: 2018-01-20T01:52:57.9126052Z
                  version: "3"
                type: Microsoft.ManagementPartner/partner
definitions:
  Error:
    description: this is the management partner operations error
    properties:
      error:
        $ref: "#/definitions/ExtendedErrorInfo"
        description: this is the ExtendedErrorInfo property
    type: object
  ErrorResponseCode:
    description: this is the error response code that management partner operations may return
    enum:
      - NotFound
      - Conflict
      - BadRequest
    type: string
  ExtendedErrorInfo:
    description: this is the extended error info
    properties:
      code:
        $ref: "#/definitions/ErrorResponseCode"
        description: this is the error response code
      message:
        description: this is the extended error info message
        type: string
    type: object
  ManagementPartnerState:
    description: "this is the management partner state: Active or Deleted"
    enum:
      - Active
      - Deleted
    type: string
  OperationDisplay:
    description: this is the management partner operation
    properties:
      description:
        description: the is management partner operation description
        type: string
      operation:
        description: the is management partner operation
        type: string
      provider:
        description: the is management partner provider
        type: string
      resource:
        description: the is management partner resource
        type: string
    type: object
  OperationList:
    description: this is the management partner operations list
    properties:
      nextLink:
        description: Url to get the next page of items.
        type: string
      value:
        description: this is the operation response list
        items:
          $ref: "#/definitions/OperationResponse"
          description: this is the operation response property
        type: array
    type: object
  OperationResponse:
    description: this is the management partner operations response
    properties:
      display:
        $ref: "#/definitions/OperationDisplay"
        description: this is the operation display
      name:
        description: this is the operation response name
        type: string
      origin:
        description: the is operation response origin information
        type: string
    type: object
  PartnerProperties:
    description: this is the management partner properties
    properties:
      createdTime:
        description: This is the DateTime when the partner was created.
        format: date-time
        type: string
      objectId:
        description: This is the object id.
        type: string
      partnerId:
        description: This is the partner id
        type: string
      partnerName:
        description: This is the partner name
        type: string
      state:
        $ref: "#/definitions/ManagementPartnerState"
        description: This is the partner state
        x-ms-client-flatten: true
      tenantId:
        description: This is the tenant id.
        type: string
      updatedTime:
        description: This is the DateTime when the partner was updated.
        format: date-time
        type: string
      version:
        description: This is the version.
        type: string
    type: object
  PartnerResponse:
    description: this is the management partner operations response
    properties:
      etag:
        description: Type of the partner
        type: integer
      id:
        description: Identifier of the partner
        readOnly: true
        type: string
      name:
        description: Name of the partner
        readOnly: true
        type: string
      properties:
        $ref: "#/definitions/PartnerProperties"
        description: Properties of the partner
        x-ms-client-flatten: true
      type:
        description: Type of resource. "Microsoft.ManagementPartner/partners"
        readOnly: true
        type: string
    type: object
    x-ms-azure-resource: true
