swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  description: Azure Customer Lockbox API Reference
  title: Customer Lockbox
  version: 2018-02-28-preview
  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/customerlockbox/resource-manager/Microsoft.CustomerLockbox/preview/2018-02-28-preview/customerlockbox.json
      version: "2.0"
  x-providerName: azure.com
  x-serviceName: customerlockbox
  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
security:
  - azure_auth:
      - user_impersonation
parameters:
  ApiVersionParameter:
    description: The API version to be used with the HTTP request.
    in: query
    name: api-version
    required: true
    type: string
    x-ms-parameter-location: method
  RequestIdParameter:
    description: The Lockbox request ID.
    in: path
    name: requestId
    required: true
    type: string
    x-ms-parameter-location: method
  SubscriptionIdParameter:
    description: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
    in: path
    name: subscriptionId
    required: true
    type: string
    x-ms-parameter-location: method
paths:
  /providers/Microsoft.CustomerLockbox/operations:
    get:
      description: Lists all the available REST API operations.
      operationId: Operations_List
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK. Successfully retrieved operation list.
          schema:
            $ref: "#/definitions/OperationListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Operations
      x-ms-examples:
        List available operations for the Customer Lockbox resource provider:
          parameters:
            api-version: 2018-02-28-preview
          responses:
            "200":
              body:
                value:
                  - display:
                      description: Register Provider Microsoft.CustomerLockbox
                      operation: Register Provider Microsoft.CustomerLockboxx
                      provider: Microsoft Customer Lockbox
                      resource: Microsoft Customer Lockbox
                    isDataAction: "false"
                    name: Microsoft.CustomerLockbox/register/action
                    origin: user,system
                  - display:
                      description: Read Lockbox Operations
                      operation: Read Lockbox Operations
                      provider: Microsoft Customer Lockbox
                      resource: Lockbox Operations
                    isDataAction: "false"
                    name: Microsoft.CustomerLockbox/operations/read
                    origin: user,system
                  - display:
                      description: Read Lockbox Request
                      operation: Read Lockbox Request
                      provider: Microsoft Customer Lockbox
                      resource: Customer Lockbox Request
                    isDataAction: "false"
                    name: Microsoft.CustomerLockbox/requests/read
                    origin: user,system
                  - display:
                      description: Create Lockbox Request
                      operation: Create Lockbox Request
                      provider: Microsoft Customer Lockbox
                      resource: Customer Lockbox Request
                    isDataAction: "false"
                    name: Microsoft.CustomerLockbox/requests/activitylog/CreateLockboxRequest/action
                    origin: user,system
                  - display:
                      description: Approve Lockbox Request
                      operation: Approve Lockbox Request
                      provider: Microsoft Customer Lockbox
                      resource: Customer Lockbox Request
                    isDataAction: "false"
                    name: Microsoft.CustomerLockbox/requests/activitylog/ApproveLockboxRequest/action
                    origin: user,system
                  - display:
                      description: Deny Lockbox Request
                      operation: Deny Lockbox Request
                      provider: Microsoft Customer Lockbox
                      resource: Customer Lockbox Request
                    isDataAction: "false"
                    name: Microsoft.CustomerLockbox/requests/activitylog/DenyLockboxRequest/action
                    origin: user,system
                  - display:
                      description: Expire Lockbox Request
                      operation: Expire Lockbox Request
                      provider: Microsoft Customer Lockbox
                      resource: Customer Lockbox Request
                    isDataAction: "false"
                    name: Microsoft.CustomerLockbox/requests/activitylog/ExpireLockboxRequest/action
                    origin: user,system
                  - display:
                      description: Cancel Lockbox Request
                      operation: Cancel Lockbox Request
                      provider: Microsoft Customer Lockbox
                      resource: Customer Lockbox Request
                    isDataAction: "false"
                    name: Microsoft.CustomerLockbox/requests/activitylog/CancelLockboxRequest/action
                    origin: user,system
                  - display:
                      description: AutoApprove Lockbox Request
                      operation: AutoApprove Lockbox Request
                      provider: Microsoft Customer Lockbox
                      resource: Customer Lockbox Request
                    isDataAction: "false"
                    name: Microsoft.CustomerLockbox/requests/activitylog/AutoApproveLockboxRequest/action
                    origin: user,system
                  - display:
                      description: AutoDeny Lockbox Request
                      operation: AutoDeny Lockbox Request
                      provider: Microsoft Customer Lockbox
                      resource: Customer Lockbox Request
                    isDataAction: "false"
                    name: Microsoft.CustomerLockbox/requests/activitylog/AutoDenyLockboxRequest/action
                    origin: user,system
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/providers/Microsoft.CustomerLockbox/requests":
    get:
      description: Lists all of the Lockbox requests in the given subscription.
      operationId: Requests_List
      parameters:
        - description: The $filter OData query parameter. Only filter by request status is supported, e.g $filter=properties/status eq 'Pending'
          in: query
          name: $filter
          required: false
          type: string
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Successfully listed the Lockbox requests under the given subscription.
          schema:
            $ref: "#/definitions/RequestListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Requests
      x-ms-examples:
        List lockbox requests in a subscription with filter by request status (eg. $filter=properties/status eq 'Pending'):
          parameters:
            $filter: properties/status eq 'Pending'
            api-version: 2018-02-28-preview
            requestId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
            subscriptionId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.CustomerLockbox/requests/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                    name: LockboxRequest_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                    properties:
                      createdDateTime: 2019-10-07T16:52:33.47Z
                      duration: 8
                      expirationDateTime: 2019-10-11T16:52:33.47Z
                      justification: Microsoft Support Team is requesting access to your resource temporarily for troubleshooting.
                      requestId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                      requestedResourceIds:
                        - SUBSCRIPTIONS/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/RESOURCEGROUPS/DEMO/PROVIDERS/MICROSOFT.COMPUTE/VIRTUALMACHINES/DEMO
                        - SUBSCRIPTIONS/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/RESOURCEGROUPS/DEMO/PROVIDERS/MICROSOFT.COMPUTE/VIRTUALMACHINES/DEMO2
                      resourceType: Virtual Machine
                      status: Pending
                      subscriptionId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                      supportCaseUrl: https://portal.azure.com/#resource/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/microsoft.support/supporttickets/123
                      supportRequest: "123"
                    type: requests
                  - id: /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.CustomerLockbox/requests/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                    name: LockboxRequest_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                    properties:
                      createdDateTime: 2019-10-07T16:52:33.47Z
                      duration: 8
                      expirationDateTime: 2019-10-11T16:52:33.47Z
                      justification: Microsoft Support Team is requesting access to your resource temporarily for troubleshooting.
                      requestId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                      requestedResourceIds:
                        - SUBSCRIPTIONS/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/RESOURCEGROUPS/DEMO/PROVIDERS/MICROSOFT.COMPUTE/VIRTUALMACHINES/DEMO
                        - SUBSCRIPTIONS/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/RESOURCEGROUPS/DEMO/PROVIDERS/MICROSOFT.COMPUTE/VIRTUALMACHINES/DEMO2
                      resourceType: Virtual Machine
                      status: Pending
                      subscriptionId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                      supportCaseUrl: https://portal.azure.com/#resource/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/microsoft.support/supporttickets/123
                      supportRequest: "123"
                    type: requests
        List lockbox requests with no filters:
          parameters:
            $expand: properties
            api-version: 2018-02-28-preview
            requestId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
            subscriptionId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.CustomerLockbox/requests/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                    name: LockboxRequest_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                    properties:
                      createdDateTime: 2019-10-07T16:52:33.47Z
                      duration: 8
                      expirationDateTime: 2019-10-11T16:52:33.47Z
                      justification: Microsoft Support Team is requesting access to your resource temporarily for troubleshooting.
                      requestId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                      requestedResourceIds:
                        - SUBSCRIPTIONS/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/RESOURCEGROUPS/DEMO/PROVIDERS/MICROSOFT.COMPUTE/VIRTUALMACHINES/DEMO
                        - SUBSCRIPTIONS/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/RESOURCEGROUPS/DEMO/PROVIDERS/MICROSOFT.COMPUTE/VIRTUALMACHINES/DEMO2
                      resourceType: Virtual Machine
                      status: Pending
                      subscriptionId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                      supportCaseUrl: https://portal.azure.com/#resource/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/microsoft.support/supporttickets/123
                      supportRequest: "123"
                    type: requests
                  - id: /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.CustomerLockbox/requests/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                    name: LockboxRequest_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                    properties:
                      createdDateTime: 2019-10-07T16:52:33.47Z
                      duration: 8
                      expirationDateTime: 2019-10-11T16:52:33.47Z
                      justification: Microsoft Support Team is requesting access to your resource temporarily for troubleshooting.
                      requestId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                      requestedResourceIds:
                        - SUBSCRIPTIONS/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/RESOURCEGROUPS/DEMO/PROVIDERS/MICROSOFT.COMPUTE/VIRTUALMACHINES/DEMO
                        - SUBSCRIPTIONS/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/RESOURCEGROUPS/DEMO/PROVIDERS/MICROSOFT.COMPUTE/VIRTUALMACHINES/DEMO2
                      resourceType: Virtual Machine
                      status: Denied
                      subscriptionId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                      supportCaseUrl: https://portal.azure.com/#resource/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/microsoft.support/supporttickets/123
                      supportRequest: "123"
                    type: requests
                  - id: /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.CustomerLockbox/requests/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                    name: LockboxRequest_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                    properties:
                      createdDateTime: 2019-10-07T16:52:33.47Z
                      duration: 8
                      expirationDateTime: 2019-10-11T16:52:33.47Z
                      justification: Microsoft Support Team is requesting access to your resource temporarily for troubleshooting.
                      requestId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                      requestedResourceIds:
                        - SUBSCRIPTIONS/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/RESOURCEGROUPS/DEMO/PROVIDERS/MICROSOFT.COMPUTE/VIRTUALMACHINES/DEMO
                        - SUBSCRIPTIONS/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/RESOURCEGROUPS/DEMO/PROVIDERS/MICROSOFT.COMPUTE/VIRTUALMACHINES/DEMO2
                      resourceType: Virtual Machine
                      status: Approved
                      subscriptionId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                      supportCaseUrl: https://portal.azure.com/#resource/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/microsoft.support/supporttickets/123
                      supportRequest: "123"
                    type: requests
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/providers/Microsoft.CustomerLockbox/requests/{requestId}":
    get:
      description: Get Customer Lockbox request
      operationId: Requests_Get
      parameters:
        - $ref: "#/parameters/RequestIdParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Retrieval of Customer Lockbox request successful.
          schema:
            $ref: "#/definitions/LockboxRequestResponse"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Requests
      x-ms-examples:
        Get a lockbox request in subscription scope:
          parameters:
            api-version: 2018-02-28-preview
            requestId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
            subscriptionId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
          responses:
            "200":
              body:
                id: /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.CustomerLockbox/requests/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                name: LockboxRequest_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                properties:
                  createdDateTime: 2019-10-07T16:52:33.47Z
                  duration: 8
                  expirationDateTime: 2019-10-11T16:52:33.47Z
                  justification: Microsoft Support Team is requesting access to your resource temporarily for troubleshooting.
                  requestId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                  requestedResourceIds:
                    - SUBSCRIPTIONS/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/RESOURCEGROUPS/DEMO/PROVIDERS/MICROSOFT.COMPUTE/VIRTUALMACHINES/DEMO
                    - SUBSCRIPTIONS/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/RESOURCEGROUPS/DEMO/PROVIDERS/MICROSOFT.COMPUTE/VIRTUALMACHINES/DEMO2
                  resourceType: Virtual Machine
                  status: Pending
                  subscriptionId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                  supportCaseUrl: https://portal.azure.com/#resource/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/microsoft.support/supporttickets/123
                  supportRequest: "123"
                type: requests
  "/subscriptions/{subscriptionId}/providers/Microsoft.CustomerLockbox/requests/{requestId}/UpdateApproval":
    post:
      description: Update Customer Lockbox request approval status API
      operationId: Requests_UpdateStatus
      parameters:
        - description: The approval object to update request status.
          in: body
          name: approval
          required: true
          schema:
            $ref: "#/definitions/Approval"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/RequestIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Update of Request Status successful
          schema:
            $ref: "#/definitions/Approval"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Requests
      x-ms-examples:
        Update a lockbox request status:
          parameters:
            api-version: 2018-10-11-preview
            approval:
              decision: Approve
              reason: Customer approve
            requestId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
            subscriptionId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
          responses:
            "200":
              body:
                decision: Approve
                reason: Customer approve
definitions:
  Approval:
    description: Request content object, in the use of Approve or Deny a Lockbox request.
    properties:
      decision:
        description: Approval decision to the Lockbox request.
        enum:
          - Approve
          - Deny
        type: string
        x-ms-enum:
          modelAsString: true
          name: Decision
      reason:
        description: Reason of the decision
        type: string
    type: object
  ErrorAdditionalInfo:
    description: An error additional info for the Lockbox service.
    properties:
      info:
        properties:
          currentStatus:
            $ref: "#/definitions/LockboxRequestStatus"
            description: The current status/state of the request quired.
        type: object
      type:
        description: The type of error info.
        type: string
    x-ms-external: true
  ErrorBody:
    description: An error response body from the Lockbox service.
    properties:
      additionalInfo:
        description: A list of error details about the error.
        items:
          $ref: "#/definitions/ErrorAdditionalInfo"
        type: array
      code:
        description: An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
        type: string
      message:
        description: A message describing the error, intended to be suitable for display in a user interface.
        type: string
      target:
        description: The target of the particular error. For example, the name of the property in error.
        type: string
    x-ms-external: true
  ErrorResponse:
    description: An error response from the Lockbox service.
    properties:
      error:
        $ref: "#/definitions/ErrorBody"
    x-ms-external: true
  LockboxRequestResponse:
    description: A Lockbox request response object, containing all information associated with the request.
    properties:
      id:
        description: The Arm resource id of the Lockbox request.
        readOnly: true
        type: string
      name:
        description: The name of the Lockbox request.
        readOnly: true
        type: string
      properties:
        $ref: "#/definitions/LockboxRequestResponseProperties"
        description: The properties that are associated with a lockbox request.
      type:
        description: The type of the Lockbox request.
        readOnly: true
        type: string
    type: object
  LockboxRequestResponseProperties:
    description: The properties that are associated with a lockbox request.
    properties:
      createdDateTime:
        description: The creation time of the request.
        format: date-time
        readOnly: true
        type: string
      duration:
        description: The duration of the request in hours.
        format: int32
        readOnly: true
        type: integer
      expirationDateTime:
        description: The expiration time of the request.
        format: date-time
        readOnly: true
        type: string
      justification:
        description: The justification of the requestor.
        readOnly: true
        type: string
      requestId:
        description: The Lockbox request ID.
        readOnly: true
        type: string
      requestedResourceIds:
        description: A list of resource IDs associated with the Lockbox request separated by ','.
        items:
          type: string
        readOnly: true
        type: array
      resourceType:
        description: The resource type of the requested resources.
        readOnly: true
        type: string
      status:
        $ref: "#/definitions/LockboxRequestStatus"
        description: The status of the request.
      subscriptionId:
        description: The subscription ID.
        readOnly: true
        type: string
      supportCaseUrl:
        description: The url of the support case.
        readOnly: true
        type: string
      supportRequest:
        description: The id of the support request associated.
        readOnly: true
        type: string
    type: object
  LockboxRequestStatus:
    description: The status of the request.
    enum:
      - Initializing
      - Pending
      - Approving
      - Denying
      - Approved
      - Denied
      - Expired
      - Revoking
      - Revoked
      - Error
      - Unknown
      - Completed
      - Completing
    type: string
    x-ms-enum:
      modelAsString: true
      name: Status
  Operation:
    description: Operation result model for ARM RP
    properties:
      display:
        description: Contains the localized display information for this particular operation / action.
        properties:
          description:
            description: The localized friendly description for the operation.
            readOnly: true
            type: string
          operation:
            description: The localized friendly name for the operation.
            readOnly: true
            type: string
          provider:
            description: The localized friendly form of the resource provider name.
            readOnly: true
            type: string
          resource:
            description: The localized friendly form of the resource type related to this action/operation.
            readOnly: true
            type: string
        readOnly: true
      isDataAction:
        description: Gets or sets a value indicating whether it is a data plane action
        readOnly: true
        type: string
      name:
        description: Gets or sets action name
        readOnly: true
        type: string
      origin:
        description: Gets or sets origin
        readOnly: true
        type: string
      properties:
        description: Gets or sets properties
        readOnly: true
        type: string
    readOnly: true
    type: object
  OperationListResult:
    description: Result of the request to list Customer Lockbox operations. It contains a list of operations.
    properties:
      nextLink:
        description: URL to get the next set of operation list results if there are any.
        readOnly: true
        type: string
      value:
        description: List of Customer Lockbox operations supported by the Microsoft.StreamAnalytics resource provider.
        items:
          $ref: "#/definitions/Operation"
        readOnly: true
        type: array
  RequestListResult:
    description: Object containing a list of streaming jobs.
    properties:
      nextLink:
        description: URL to get the next set of operation list results if there are any.
        readOnly: true
        type: string
      value:
        description: A list of Lockbox requests. Populated by a 'List' operation.
        items:
          $ref: "#/definitions/LockboxRequestResponse"
        readOnly: true
        type: array
