openapi: 3.1.0
info:
  title: Service provision management
  description: >-
    The API reference documentation for endpoints related to service provision
    management.
  version: v1beta1
  license:
    name: HPE End User License Agreement
    url: https://www.hpe.com/us/en/software/licensing.html
servers:
  - url: https://global.api.greenlake.hpe.com
security:
  - bearerAuth: []
paths:
  /service-catalog/v1beta1/service-provisions:
    get:
      tags:
        - Service Provision
      summary: Get service provisions
      description: >
        Retrieve a list of service provisions by applying filters.

        A service offer provides a distinct set of functionalities that can be
        independently identified and assigned access. Service offers are
        typically associated with roles and permissions, commerce, metering,
        quote-to-cash, and trial evaluations.

        A service provision occurs when a service offer is provisioned (added)
        to a workspace.

        <br><br>**Pagination**: This endpoint supports cursor-based pagination
        using the `next` query parameter. Provide the cursor in the `next` query
        parameter to retrieve the next page. 
      operationId: getServiceProvisions
      parameters:
        - name: Hpe-workspace-id
          in: header
          description: The workspace ID. Required if the "view all" parameter is false.
          schema:
            title: Workspace ID
            format: uuid
            type: string
            default: Id
        - name: next
          description: Specify the start ID for the next page of service offers.
          required: false
          in: query
          schema:
            title: Pagination cursor
            type: string
            description: Specifies the start ID for the next page of service offers.
        - name: limit
          description: Specify the number of results to be returned.
          required: false
          in: query
          schema:
            title: Pagination limit
            maximum: 2000
            minimum: 1
            type: integer
            description: Number of entries per page
            default: 2000
        - name: filter
          in: query
          required: false
          description: >-
            Limit the entities operated on by this endpoint by returning only
            the subset of entities that match the filter. The filter grammar is
            a subset of OData 4.0. <br> **Supported Fields:** `id`,
            `ServiceOfferId`, `workspaceId`, `serviceManagerProvisionId`,
            `serviceManagerId`, `serviceManagerInstanceId`, `status`,
            `organizationId`, `slug`. <br> **Supported operand:** `eq` <br>
            **Supported operations:** `and`
          style: deepObject
          examples:
            filter-example1:
              $ref: '#/components/examples/filter-example1'
            filter-example2:
              $ref: '#/components/examples/filter-example2'
            filter-example3:
              $ref: '#/components/examples/filter-example3'
            filter-example4:
              $ref: '#/components/examples/filter-example4'
            filter-example5:
              $ref: '#/components/examples/filter-example5'
            filter-example6:
              $ref: '#/components/examples/filter-example6'
            filter-example7:
              $ref: '#/components/examples/filter-example7'
            filter-example8:
              $ref: '#/components/examples/filter-example8'
          schema:
            type: string
        - name: unredacted
          description: If true, returns the complete entry including sensitive fields.
          required: false
          allowEmptyValue: true
          in: query
          schema:
            title: unredacted
            type: boolean
            description: Request the complete entry along with the sensitive fields.
            example: true
            default: false
        - name: all
          description: >-
            If true, returns unredacted entries for all workspaces, including
            all provisioned service offers and their sensitive fields.
          required: false
          allowEmptyValue: true
          in: query
          schema:
            title: all
            type: boolean
            description: >-
              Request unredacted entries for all workspaces. This displays all
              the service offers that are provisioned under all workspaces,
              along with their sensitive fields.
            example: true
            default: false
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceProvisionList'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/ValidationError'
        '500':
          $ref: '#/components/responses/InternalServerError'
    post:
      tags:
        - Service Provision
      summary: Create a service provision
      description: >-
        The initial step to provision a service offer in a region. A service
        offer provides a distinct set of functionalities that can be
        independently identified and assigned access. Service offers are
        typically associated with roles and permissions, commerce, metering,
        quote-to-cash, and trial evaluations.<br><br>You need to supply the
        following in the request body. <p><ul><li>`serviceOfferId`-From
        <b>Service offer management</b> use the `Get service offers` endpoint to
        find service offer IDs.</li><li>`region`-From <b>Service offer
        management</b> use the `Get service offer regions` endpoint to find
        region codes.</li></ul></p>
      operationId: postServiceProvision
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServiceProvisionCreateBase'
        required: true
      responses:
        '201':
          $ref: '#/components/responses/ServiceProvisionCreated'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '412':
          $ref: '#/components/responses/PreConditionFailed'
        '422':
          $ref: '#/components/responses/ValidationError'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /service-catalog/v1beta1/service-provisions/{id}:
    get:
      tags:
        - Service Provision
      summary: Get service provision
      description: Fetch service provision details for an ID.
      operationId: getServiceProvision
      parameters:
        - name: id
          description: >-
            The unique identifier of a service provision. The ID is returned by
            the `Get service provisions` endpoint.
          required: true
          in: path
          schema:
            title: Id
            format: uuid
            type: string
            description: The unique identifier for the service provision.
        - name: unredacted
          description: If set to true, get the entire entry along with sensitive fields.
          required: false
          allowEmptyValue: true
          in: query
          schema:
            title: unredacted
            type: boolean
            description: >-
              Request the complete entry along with the sensitive fields for
              user workspace
            example: true
            default: false
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceProvision'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationError'
        '500':
          $ref: '#/components/responses/InternalServerError'
    delete:
      tags:
        - Service Provision
      summary: Delete a service provision
      description: Delete a specific service provision.
      operationId: deleteServiceProvision
      parameters:
        - name: id
          description: >-
            The unique identifier of a service offer. The ID is returned by the
            `Get service provisions` endpoint.
          required: true
          in: path
          schema:
            title: Id
            format: uuid
            type: string
            description: >-
              The unique identifier for the service offer. The ID is returned by
              the `Get service provisions` endpoint.
        - name: force
          description: >-
            Specifies the force-delete action, regardless of the provision
            status.
          required: false
          allowEmptyValue: true
          in: query
          schema:
            title: Force-flag
            type: boolean
            description: >-
              If set to true, specifies the force delete action (irrespective of
              provision status).
            example: true
            default: false
        - name: If-Match
          description: >-
            Generation version match. To avoid unintended deletions, the
            generation version must match. This value is incremented whenever
            the record is updated.
          required: true
          in: header
          schema:
            title: If-Match
            type: integer
            description: >-
              Generation version match. To avoid unintended deletions, the
              generation version must match. This value is incremented whenever
              the record is updated.
            example: 1
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '412':
          $ref: '#/components/responses/PreConditionFailed'
        '422':
          $ref: '#/components/responses/ValidationError'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /service-catalog/v1beta1/service-provisions/{id}/retry:
    post:
      tags:
        - Service Provision
      summary: Retrigger service provisioning
      description: Retrigger service provisioning if it has failed.
      operationId: retryServiceProvision
      parameters:
        - name: id
          description: >-
            The unique identifier for the service provision. The ID is returned
            by the `Get service provisions` endpoint.
          required: true
          in: path
          schema:
            title: Id
            format: uuid
            type: string
            description: The unique identifier for the service provision.
      responses:
        '202':
          $ref: '#/components/responses/ServiceProvisionCreated'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '412':
          $ref: '#/components/responses/PreConditionFailed'
        '422':
          $ref: '#/components/responses/ValidationError'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /service-catalog/v1beta1/service-provisions/{id}/retry-unprovision:
    post:
      tags:
        - Service Provision
      summary: Retrigger service deletion
      description: Retrigger service deletion in case it failed.
      operationId: retryServiceUnprovision
      parameters:
        - name: id
          description: >-
            The unique identifier for the service provision. The ID is returned
            by the `Get service provisions` endpoint.
          required: true
          in: path
          schema:
            title: Id
            format: uuid
            type: string
            description: Service provision ID
      responses:
        '202':
          $ref: '#/components/responses/ServiceProvisionCreated'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '412':
          $ref: '#/components/responses/PreConditionFailed'
        '422':
          $ref: '#/components/responses/ValidationError'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  examples:
    filter-example1:
      summary: Filter by service provision ID
      description: Return the service provision with a given ID.
      value: id eq '767c0c92-5ecc-4952-85d6-06d2bcaaf050'
    filter-example2:
      summary: Filter by workspace ID
      description: Return service provisions for a given workspace ID.
      value: workspaceId eq '767c0c92-5ecc-4952-85d6-06d2bcaaf050'
    filter-example3:
      summary: Filter by service manager provision ID
      description: Return service provisions for a given Application Customer ID.
      value: serviceManagerProvisionId eq '767c0c92-5ecc-4952-85d6-06d2bcaaf050'
    filter-example4:
      summary: Filter by service offer ID and region.
      description: Return service provisions for a given service offer ID and region.
      value: >-
        ServiceOfferId eq '767c0c92-5ecc-4952-85d6-06d2bcaaf050' and region eq
        'us-west'
    filter-example5:
      summary: Filter by service manager and service manager instance ID.
      description: >-
        Return service provision for a given application ID and application
        instance ID.
      value: >-
        serviceManagerId eq '767c0c92-5ecc-4952-85d6-06d2bcaaf050' and
        serviceManagerInstanceId eq '62d242c7-7d53-448d-b7d0-baf0c591f024'
    filter-example6:
      summary: Filter by status
      description: Return service provisions with a given status.
      value: status eq 'PROVISION_INITIATED'
    filter-example7:
      summary: Filter by organization ID
      description: Return service provisions with a given organization ID.
      value: organizationId eq '767c0c92-5ecc-4952-85d6-06d2bcaaf050'
    filter-example8:
      summary: Filter by slug
      description: Return service provisions with a given slug.
      value: slug eq 'AC'
  securitySchemes:
    bearerAuth:
      name: Authorization
      in: header
      type: apiKey
  responses:
    NotFound:
      description: 404 Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NotFoundError'
    BadRequest:
      description: 400 Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BadRequestError'
    Unauthorized:
      description: 401 Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UnauthorizedError'
    NoContent:
      description: NoContent
    Forbidden:
      description: 403 Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ForbiddenError'
    Conflict:
      description: 409 Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ConflictError'
    PreConditionFailed:
      description: 412 PreCondition Failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PreConditionFailedError'
    InternalServerError:
      description: 500 Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InternalError'
    ValidationError:
      description: 422 Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationError'
    ServiceProvisionCreated:
      description: 201 ServiceProvision Created Response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ServiceProvision'
      headers:
        Location:
          description: URL of the created workspace.
          schema:
            type: string
  schemas:
    Status:
      title: status
      enum:
        - HEALTHY
        - UNHEALTHY
      type: string
      example: HEALTHY
    ServiceStatus:
      title: ServiceStatus
      type: object
      properties:
        status:
          title: status
          type: string
          allOf:
            - $ref: '#/components/schemas/Status'
          example: HEALTHY
        summary:
          title: summary
          type: string
          example: HEALTHY
    BaseError:
      type: object
      required:
        - httpStatusCode
        - errorCode
        - message
        - debugId
      properties:
        httpStatusCode:
          type: integer
          description: The HTTP equivalent status code
          example: 401
        errorCode:
          type: string
          description: >-
            A unique machine-friendly identifier for the error from a global
            list of enumerated identifier strings
          example: HPE_GL_ERROR_EXPIRED_TOKEN
        message:
          type: string
          description: A user-friendly error message
          example: Authentication error - token expired
        debugId:
          type: string
          description: >-
            A unique identifier for the instance of this error. Maybe same as
            trace ID.
          example: 64136af7-cd64-4b4e-88a8-150ab51a969d
    Error:
      allOf:
        - $ref: '#/components/schemas/BaseError'
        - type: object
          properties:
            errorDetails:
              type: array
              description: Additional detailed information about the error
              items:
                type: object
                required:
                  - type
                  - source
                  - metadata
                properties:
                  type:
                    type: string
                    description: The type of error details
                    example: hpe.greenlake.metadata
                  source:
                    type: string
                    description: The source of the error. Typically a registered API group
                    example: hpe.greenlake.organizations
                  metadata:
                    type: object
                    description: Any additional key value pairs that the service defines
                    properties:
                      recommendedActions:
                        type: array
                        items:
                          type: string
                          description: Action recommended to the user
                          example: Contact admin to perform operation
    UnauthorizedError:
      allOf:
        - type: object
          required:
            - httpStatusCode
            - errorCode
            - message
            - debugId
          properties:
            httpStatusCode:
              type: integer
              description: The HTTP equivalent status code
              example: 401
            errorCode:
              type: string
              description: >-
                A unique machine-friendly identifier for the error from a global
                list of enumerated identifier strings
              example: HPE_GL_ERROR_UNAUTHORIZED
            message:
              type: string
              description: A user-friendly error message
              example: Authentication error - token expired
            debugId:
              type: string
              description: >-
                A unique identifier for the instance of this error. Maybe same
                as trace ID.
              example: 64136af7-cd64-4b4e-88a8-150ab51a920d
    ForbiddenError:
      allOf:
        - type: object
          required:
            - httpStatusCode
            - errorCode
            - message
            - debugId
          properties:
            httpStatusCode:
              type: integer
              description: The HTTP equivalent status code
              example: 403
            errorCode:
              type: string
              description: >-
                A unique machine-friendly identifier for the error from a global
                list of enumerated identifier strings
              example: HPE_GL_ERROR_FORBIDDEN
            message:
              type: string
              description: A user-friendly error message
              example: UI Authorization Failed for current Route
            debugId:
              type: string
              description: >-
                A unique identifier for the instance of this error. Maybe same
                as trace ID.
              example: 8567e466-7322-414a-b7d4-6832c3ce8f47
    NotFoundError:
      allOf:
        - type: object
          required:
            - httpStatusCode
            - errorCode
            - message
            - debugId
          properties:
            httpStatusCode:
              type: integer
              description: The HTTP equivalent status code
              example: 404
            errorCode:
              type: string
              description: >-
                A unique machine-friendly identifier for the error from a global
                list of enumerated identifier strings
              example: HPE_GL_ERROR_NOT_FOUND
            message:
              type: string
              description: A user-friendly error message
              example: >-
                No service provision found for ID:
                64136af7-cd64-4b4e-88a8-150ab51a920d
            debugId:
              type: string
              description: >-
                A unique identifier for the instance of this error. Maybe same
                as trace ID.
              example: 64136af7-cd64-4b4e-88a8-150ab51a920d
    ConflictError:
      allOf:
        - type: object
          required:
            - httpStatusCode
            - errorCode
            - message
            - debugId
          properties:
            httpStatusCode:
              type: integer
              description: The HTTP equivalent status code
              example: 409
            errorCode:
              type: string
              description: >-
                A unique machine-friendly identifier for the error from a global
                list of enumerated identifier strings
              example: HPE_GL_ERROR_CONFLICT
            message:
              type: string
              description: A user-friendly error message
              example: Duplicate Service Provision.
            debugId:
              type: string
              description: >-
                A unique identifier for the instance of this error. Maybe same
                as trace ID.
              example: 64136af7-cd64-4b4e-88a8-150ab51a920d
    ValidationError:
      allOf:
        - type: object
          required:
            - httpStatusCode
            - errorCode
            - message
            - debugId
          properties:
            httpStatusCode:
              type: integer
              description: The HTTP equivalent status code
              example: 422
            errorCode:
              type: string
              description: >-
                A unique machine-friendly identifier for the error from a global
                list of enumerated identifier strings
              example: HPE_GL_ERROR_UNPROCESSABLE_ENTITY
            message:
              type: string
              description: A user-friendly error message
              example: 'Invalid UUID: 5221850a-dae8-4bdf-ae69-021e3bbf80a'
            debugId:
              type: string
              description: >-
                A unique identifier for the instance of this error. Maybe same
                as trace ID.
              example: 64136af7-cd64-4b4e-88a8-150ab51a920d
    BadRequestError:
      allOf:
        - type: object
          required:
            - httpStatusCode
            - errorCode
            - message
            - debugId
            - errorDetails
          properties:
            httpStatusCode:
              type: integer
              description: The HTTP equivalent status code
              example: 400
            errorCode:
              type: string
              description: >-
                A unique machine-friendly identifier for the error from a global
                list of enumerated identifier strings
              example: HPE_GL_ERROR_BAD_REQUEST
            message:
              type: string
              description: A user-friendly error message
              example: >-
                Service Offer 6c4ec6df-1c23-460f-aece-34573e88de19 does not
                exist
            debugId:
              type: string
              description: >-
                A unique identifier for the instance of this error. Maybe same
                as trace ID.
              example: 64136af7-cd64-4b4e-88a8-150ab51a920d
            errorDetails:
              type: array
              description: Additional detailed information about the error
              items:
                type: object
                required:
                  - type
                  - issues
                properties:
                  type:
                    type: string
                    description: The type of error details.
                    example: hpe.greenlake.bad_request
                  issues:
                    type: array
                    description: Array of bad request issues.
                    items:
                      type: object
                      required:
                        - source
                        - subject
                        - description
                      properties:
                        source:
                          type: string
                          description: The part of the request with an issue.
                          enum:
                            - field
                            - header
                            - query.parameter
                          example: field
                        subject:
                          type: string
                          description: The specific issue key.
                          example: id
                        description:
                          type: string
                          description: >-
                            An elaborate description of issue. This can be used
                            by developers to understand how the failure can be
                            addressed.
                          example: Invalid format.
    PreConditionFailedError:
      allOf:
        - type: object
          required:
            - httpStatusCode
            - errorCode
            - message
            - debugId
          properties:
            httpStatusCode:
              type: integer
              description: The HTTP equivalent status code
              example: 412
            errorCode:
              type: string
              description: >-
                A unique machine-friendly identifier for the error from a global
                list of enumerated identifier strings
              example: HPE_GL_ERROR_PRECONDITION_FAILED
            message:
              type: string
              description: A user-friendly error message
              example: Server preconditions; missing request headers
            debugId:
              type: string
              description: >-
                A unique identifier for the instance of this error. Maybe same
                as trace ID.
              example: 64136af7-cd64-4b4e-88a8-150ab51a969d
    InternalError:
      allOf:
        - type: object
          required:
            - httpStatusCode
            - errorCode
            - message
            - debugId
            - errDetails
          properties:
            httpStatusCode:
              type: integer
              description: The HTTP equivalent status code
              example: 500
            errorCode:
              type: string
              description: >-
                A unique machine-friendly identifier for the error from a global
                list of enumerated identifier strings
              example: HPE_GL_ERROR_INTERNAL_SERVER_ERROR
            message:
              type: string
              description: A user-friendly error message
              example: Internal Server Error
            debugId:
              type: string
              description: >-
                A unique identifier for the instance of this error. Maybe same
                as trace ID.
              example: e0a0d57d-30cb-45f8-90cb-d6ea3501f70b
            errorDetails:
              type: array
              description: Additional detailed information about the error
              items:
                type: object
                required:
                  - type
                  - retryAfterSeconds
                properties:
                  type:
                    type: string
                    description: The type of error details.
                    example: hpe.greenlake.retry_info
                  retryAfterSeconds:
                    type: integer
                    description: Seconds to wait before retrying.
                    example: 30
    AccountType:
      title: AccountType
      description: The type of workspace associated with the account.
      enum:
        - BASIC_ORGANIZATION
        - STANDALONE
        - MSP
        - TENANT
      type: string
    OperationalMode:
      title: OperationalMode
      description: Indicates where the service offer can be viewed or provisioned.
      enum:
        - DEFAULT
        - MSP_OWNED_INVENTORY
        - CUSTOMER_OWNED_INVENTORY
      type: string
    ProvisionStatus:
      title: ProvisionStatus
      description: The current status of provisioning.
      enum:
        - PROVISION_INITIATED
        - PROVISIONED
        - PROVISION_FAILED
        - UNPROVISION_INITIATED
        - UNPROVISIONED
        - UNPROVISION_FAILED
      type: string
    MspConversionStatus:
      title: MspConversionStatus
      description: >-
        The current status of MSP conversion. Indicates whether a workspace has
        been converted to MSP.
      enum:
        - MSP_CONVERSION_INITIATED
        - MSP_CONVERTED
        - MSP_CONVERSION_FAILED
      type: string
    WorkspaceTransferStatus:
      title: WorkspaceTransferStatus
      description: The status of a workspace transfer from one type to another.
      enum:
        - TRANSFER_INITIATED
        - TRANSFER_COMPLETED
        - TRANSFER_FAILED
      type: string
    ServiceManagerResourceLink:
      title: ServiceManagerResourceLink
      type: object
      properties:
        id:
          example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
          title: ServiceManagerId
          description: The unique identifier for the service manager.
          type: string
          format: uuid
        resourceUri:
          title: Resource URI
          type: string
          description: The URI of the resource.
          example: >-
            /service-catalog/v1beta1/service-managers/3fa85f64-5717-4562-b3fc-2c963f66afa6
    ServiceManagerProvisionResourceLink:
      title: ServiceManagerProvisionResourceLink
      type: object
      properties:
        id:
          format: uuid
          description: The unique identifier for the provisioned service manager.
          example: 2fb85f64-5717-4562-b3fc-2c963f66afa2
          title: ServiceManagerProvisionId
          type: string
        resourceUri:
          title: Resource URI
          type: string
          description: The URI of the resource.
          example: >-
            /service-catalog/v1beta1/service-manager-provisions/2fb85f64-5717-4562-b3fc-2c963f66afa2
        accountType:
          $ref: '#/components/schemas/AccountType'
        operationalMode:
          $ref: '#/components/schemas/OperationalMode'
        provisionStatus:
          $ref: '#/components/schemas/ProvisionStatus'
        mspConversionStatus:
          $ref: '#/components/schemas/MspConversionStatus'
    ServiceOfferResourceLink:
      title: ServiceOfferResourceLink
      type: object
      properties:
        id:
          format: uuid
          example: 4ab85f64-5717-4562-b3fc-2c963f66afa6
          description: The unique identifier of a service offer.
          title: ServiceOfferId
          type: string
        name:
          example: Aruba Central
          title: Name
          type: string
          description: The name of the service offer
        resourceUri:
          title: Resource URI
          type: string
          description: The URI of the resource.
          example: >-
            /service-catalog/v1alpha1/service-offers/4ab85f64-5717-4562-b3fc-2c963f66afa6
    WorkspaceResourceLink:
      title: WorkspaceResourceLink
      type: object
      properties:
        id:
          format: uuid
          example: 4ab85f64-5717-4562-b3fc-2c963f66afa6
          description: The workspace ID.
          title: WorkspaceId
          type: string
        resourceUri:
          title: Resource URI
          type: string
          description: The URI of the resource.
          example: /workspaces/v1/workspaces/{workspaceId}
        name:
          title: Workspace name
          type: string
          description: The workspace name.
          example: Hewlett Packard Enterprise
        organizationId:
          format: uuid
          description: >-
            The organization ID. Each HPE GreenLake Organization operates as a
            distinct tenant with its own identity directory and unique
            organization ID.
          example: 5ab85f64-6717-5562-c3fc-3c963f66afa6
          title: OrganizationId
          type: string
        workspaceTransferStatus:
          $ref: '#/components/schemas/WorkspaceTransferStatus'
        mspId:
          description: The unique identifier of an MSP tenant account.
          example: 3ca24f18-5013-4562-b3fc-2d992f22ade2
          title: MspId
          type: string
    ServiceProvisionCreateBase:
      title: ServiceProvisionCreateBase
      required:
        - serviceOfferId
        - region
      type: object
      properties:
        serviceOfferId:
          title: ServiceOfferId
          format: uuid
          type: string
          description: The unique identifier for the service offer.
          example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
          x-oapi-codegen-extra-tags:
            validate: required,uuid
        region:
          title: RegionCode
          type: string
          description: The HPE GreenLake-defined region code.
          example: us-west
          x-oapi-codegen-extra-tags:
            validate: required
    ServiceProvision:
      title: ServiceProvision
      required:
        - id
        - resourceUri
        - serviceOffer
        - region
        - workspace
        - retryCount
        - type
        - createdAt
        - updatedAt
        - generation
      properties:
        id:
          title: Id
          format: uuid
          description: The unique service provision identifier.
          type: string
          example: 2fa85f64-5717-4562-b3fc-2c963f66afa9
        resourceUri:
          title: ResourceUri
          type: string
          description: The URI of the resource.
          example: >-
            /service-catalog/{version}/service-provisions/2fa85f64-5717-4562-b3fc-2c963f66afa9
        serviceOffer:
          description: Information about the associated service offer.
          $ref: '#/components/schemas/ServiceOfferResourceLink'
        region:
          title: Region
          description: The HPE GreenLake-defined region code.
          type: string
          example: us-west
        serviceManager:
          description: >-
            Information about the associated service manager, including its ID
            and resource URI.
          $ref: '#/components/schemas/ServiceManagerResourceLink'
        serviceManagerProvision:
          description: >-
            Details of the provisioned service manager, including its ID,
            resource URI, account type, operational mode, provision status, and
            MSP conversion status.
          $ref: '#/components/schemas/ServiceManagerProvisionResourceLink'
        workspace:
          description: >-
            Information about the associated workspace. In HPE GreenLake, a
            workspace is a secure, dedicated environment for managing resources.
          $ref: '#/components/schemas/WorkspaceResourceLink'
        serviceManagerInstanceId:
          title: ServiceManagerInstanceId
          description: >-
            The unique identifier of a service manager instance. This is the
            application instance ID of an application related to a service
            offer.
          example: 2fc85f64-5717-4562-b3fc-2c963f66afa3
        provisionStatus:
          description: The provisioning status of the service in the workspace.
          $ref: '#/components/schemas/ProvisionStatus'
        reason:
          title: Reason
          description: The reason the service provision creation failed.
          type: string
          example: Failed to configure IDP.
        retryCount:
          title: RetryCount
          description: The number of times the operation has been retried.
          type: integer
          example: 0
        createdBy:
          title: CreatedBy
          description: The email address of the user who created the service provision.
          type: string
          example: user@company.com
        createdAt:
          title: CreatedAt
          type: string
          description: Date and time at which the service offer was created.
          format: date-time
          example: '2021-04-23T10:20:30.400+02:30'
        updatedAt:
          title: UpdatedAt
          type: string
          description: Date and time at which the service offer was updated.
          format: date-time
          example: '2021-04-29T10:20:30.400+02:30'
        generation:
          title: Generation
          type: integer
          description: A monotonically increasing update counter.
          example: 1
        type:
          title: ResourceType
          type: string
          description: The type of the resource.
          example: /service-catalog/service-provision
    ServiceProvisionList:
      title: ServiceProvisionList
      required:
        - items
        - count
        - next
        - total
      type: object
      properties:
        items:
          title: Service provision list
          type: array
          items:
            $ref: '#/components/schemas/ServiceProvision'
        next:
          title: Next
          description: Cursor for the next page of resources.
          type: string
          example: 64136af7-cd64-4b4e-88a8-150ab51a920d
        count:
          title: Count per page
          description: The number of items returned.
          default: 1
          type: integer
        total:
          title: Total count
          description: Total number of items in the result set.
          default: 10
          type: integer
    NotificationServiceProvisionResponse:
      title: NotificationServiceProvisionResponse
      required:
        - serviceProvisionId
        - result
      example:
        serviceProvisionId: 3fa85f64-5717-4562-b3fc-2c963f66afa6
        result: FAILURE
        reason: Failed to configure IDP.
      properties:
        serviceProvisionId:
          title: serviceProvisionId
          format: uuid
          description: The unique identifier for the service provision.
          type: string
          example: 2fa85f64-5717-4562-b3fc-2c963f66afa9
        result:
          $ref: '#/components/schemas/Result'
        reason:
          title: reason
          description: The reason the service provision creation failed.
          type: string
    Result:
      title: Result
      description: >-
        The result of the notification response, indicating whether the
        operation was successful (`SUCCESS`) or failed (`FAILURE`).
      enum:
        - SUCCESS
        - FAILURE
      type: string
