swagger: "2.0"
schemes:
  - https
host: adminmanagement.local.azurestack.external
info:
  description: AzureBridge Admin Client.
  title: AzureBridgeAdminClient
  version: 2016-01-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/azsadmin/resource-manager/azurebridge/Microsoft.AzureBridge.Admin/preview/2016-01-01/Activation.json
      version: "2.0"
  x-providerName: azure.com
  x-serviceName: azsadmin-Activation
  x-tags:
    - Azure
    - Microsoft
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  azure_auth:
    authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
    description: Authorization uses an Azure Active Directory OAuth2 flow.
    flow: implicit
    scopes:
      user_impersonation: impersonate your user account
    type: oauth2
security:
  - azure_auth:
      - user_impersonation
parameters:
  ActivationParameter:
    description: new activation.
    in: body
    name: activation
    required: true
    schema:
      $ref: "#/definitions/Activation"
    x-ms-parameter-location: method
paths:
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroup}/providers/Microsoft.AzureBridge.Admin/activations":
    get:
      description: Returns the list of activations.
      operationId: Activations_List
      parameters:
        - description: Subscription credentials which uniquely identify Microsoft Azure subscription.The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
        - description: The resource group the resource is located under.
          in: path
          name: resourceGroup
          required: true
          type: string
          x-ms-parameter-location: method
        - default: 2016-01-01
          description: Client Api Version.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ActivationResourcesPage"
      tags:
        - Activations
      x-ms-examples:
        Return product name.:
          parameters:
            api-version: 2015-06-01-preview
            location: local
            resourceGroup: azurestack
            subscriptionId: 20ff7fc3-e762-44dd-bd96-b71116dcdc23
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/b7a57872-f429-4eb3-b26a-5108178380a5/resourceGroups/azurestack-activation/providers/Microsoft.AzureBridge.Admin/activations/default
                    location: local
                    name: default
                    properties:
                      azureRegistrationResourceIdentifier: /subscriptions/4e9319a5-1cf7-4099-80ea-9aa2f09cb1e7/resourceGroups/azurestack/providers/Microsoft.AzureStack/registrations/AzureStack-57632d6b-90c2-4280-a2cd-2c0a0cfa7d71
                      displayName: Azure Stack Activation
                      expiration: 9999-12-30T15:59:59
                      marketplaceSyndicationEnabled: true
                      provisioningState: Succeeded
                      usageReportingEnabled: true
                    type: Microsoft.AzureBridge.Admin/activations
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroup}/providers/Microsoft.AzureBridge.Admin/activations/{activationName}":
    delete:
      description: Delete an activation.
      operationId: Activations_Delete
      parameters:
        - description: Subscription credentials which uniquely identify Microsoft Azure subscription.The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
        - description: The resource group the resource is located under.
          in: path
          name: resourceGroup
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Name of the activation.
          in: path
          name: activationName
          required: true
          type: string
          x-ms-parameter-location: method
        - default: 2016-01-01
          description: Client Api Version.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ActivationResource"
      tags:
        - Activations
      x-ms-examples:
        Delete an activation.:
          parameters:
            activationName: default
            api-version: 2015-06-01-preview
            location: local
            resourceGroup: azurestack
            subscriptionId: 20ff7fc3-e762-44dd-bd96-b71116dcdc23
          responses:
            "200":
              body:
                id: /subscriptions/b6a34e73-810f-4564-881a-8434c6c2e5c8/resourceGroups/azurestack-activation/providers/Microsoft.AzureBridge.Admin/activations/default
                name: default
    get:
      description: Returns activation name.
      operationId: Activations_Get
      parameters:
        - description: Subscription credentials which uniquely identify Microsoft Azure subscription.The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
        - description: The resource group the resource is located under.
          in: path
          name: resourceGroup
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Name of the activation.
          in: path
          name: activationName
          required: true
          type: string
          x-ms-parameter-location: method
        - default: 2016-01-01
          description: Client Api Version.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ActivationResource"
        "404":
          description: Not Found
      tags:
        - Activations
      x-ms-examples:
        Return activation name.:
          parameters:
            activationName: default
            api-version: 2015-06-01-preview
            location: local
            resourceGroup: azurestack
            subscriptionId: 20ff7fc3-e762-44dd-bd96-b71116dcdc23
          responses:
            "200":
              body:
                id: /subscriptions/b6a34e73-810f-4564-881a-8434c6c2e5c8/resourceGroups/azurestack-activation/providers/Microsoft.AzureBridge.Admin/activations/default
                location: local
                name: default
                properties:
                  azureRegistrationResourceIdentifier: /subscriptions/4e9319a5-1cf7-4099-80ea-9aa2f09cb1e7/resourceGroups/azurestack/providers/Microsoft.AzureStack/registrations/AzureStack-e6135d07-4efa-439c-b899-24e03cbac5f9
                  displayName: Azure Stack Activation
                  expiration: 9999-12-30T15:59:59
                  marketplaceSyndicationEnabled: true
                  provisioningState: Succeeded
                  usageReportingEnabled: true
                type: Microsoft.AzureBridge.Admin/activations
            "404": {}
    put:
      description: Create a new activation.
      operationId: Activations_CreateOrUpdate
      parameters:
        - description: Subscription credentials which uniquely identify Microsoft Azure subscription.The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
        - description: The resource group the resource is located under.
          in: path
          name: resourceGroup
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Name of the activation.
          in: path
          name: activationName
          required: true
          type: string
          x-ms-parameter-location: method
        - default: 2016-01-01
          description: Client Api Version.
          in: query
          name: api-version
          required: true
          type: string
        - $ref: "#/parameters/ActivationParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ActivationResource"
      tags:
        - Activations
      x-ms-examples:
        Return product name.:
          parameters:
            activation: default
            activationName: default
            api-version: 2015-06-01-preview
            location: local
            resourceGroup: azurestack
            subscriptionId: 20ff7fc3-e762-44dd-bd96-b71116dcdc23
          responses:
            "200":
              body:
                id: /subscriptions/b6a34e73-810f-4564-881a-8434c6c2e5c8/resourceGroups/azurestack-activation/providers/Microsoft.AzureBridge.Admin/activations/default
                location: local
                name: default
                properties:
                  azureRegistrationResourceIdentifier: /subscriptions/4e9319a5-1cf7-4099-80ea-9aa2f09cb1e7/resourceGroups/azurestack/providers/Microsoft.AzureStack/registrations/AzureStack-e6135d07-4efa-439c-b899-24e03cbac5f9
                  displayName: Azure Stack Activation
                  expiration: 9999-12-30T15:59:59
                  marketplaceSyndicationEnabled: true
                  provisioningState: Succeeded
                  usageReportingEnabled: true
                type: Microsoft.AzureBridge.Admin/activations
definitions:
  Activation:
    description: Holds properties related to activation.
    properties:
      azureRegistrationResourceIdentifier:
        description: Azure registration resource identifier.
        type: string
      displayName:
        description: Name displayed for the product.
        type: string
      expiration:
        description: The activation expiration.
        type: string
      marketplaceSyndicationEnabled:
        description: Value indicating whether the marketplace syndication feature is enabled.
        type: boolean
      provisioningState:
        description: The provisioning state of the resource.
        enum:
          - Stopped
          - Starting
          - Running
          - Stopping
          - Succeeded
          - Downloading
        type: string
        x-ms-enum:
          modelAsString: true
          name: ProvisioningState
      usageReportingEnabled:
        description: Value indicating whether the usage reporting feature is enabled.
        type: boolean
    type: object
  ActivationResource:
    allOf:
      - description: Base Resource Object
        properties:
          id:
            description: URI of the resource.
            readOnly: true
            type: string
          location:
            description: Location of the resource
            readOnly: true
            type: string
          name:
            description: Name of the resource.
            readOnly: true
            type: string
          tags:
            additionalProperties:
              type: string
            description: List of key value pairs.
            readOnly: true
            type: object
          type:
            description: Type of resource.
            readOnly: true
            type: string
        type: object
        x-ms-azure-resource: true
    description: Published activation resource.
    properties:
      properties:
        $ref: "#/definitions/Activation"
        description: Properties of the resource.
        x-ms-client-flatten: true
    type: object
  ActivationResourcesPage:
    description: Holds an array of activation resources and the next link.
    properties:
      nextLink:
        description: URI to the next page.
        type: string
      value:
        description: List of activation resources.
        items:
          $ref: "#/definitions/ActivationResource"
        type: array
