swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  title: StreamAnalyticsManagementClient
  version: 2016-03-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/streamanalytics/resource-manager/Microsoft.StreamAnalytics/stable/2016-03-01/transformations.json
      version: "2.0"
  x-providerName: azure.com
  x-serviceName: streamanalytics-transformations
  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: Client Api Version.
    in: query
    name: api-version
    required: true
    type: string
  ResourceGroupNameParameter:
    description: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    in: path
    name: resourceGroupName
    required: true
    type: string
    x-ms-parameter-location: method
  StreamingJobNameParameter:
    description: The name of the streaming job.
    in: path
    name: jobName
    required: true
    type: string
    x-ms-parameter-location: method
  SubscriptionIdParameter:
    description: GUID 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
  TransformationNameParameter:
    description: The name of the transformation.
    in: path
    name: transformationName
    required: true
    type: string
    x-ms-parameter-location: method
paths:
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}":
    get:
      description: Gets details about the specified transformation.
      operationId: Transformations_Get
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/StreamingJobNameParameter"
        - $ref: "#/parameters/TransformationNameParameter"
      responses:
        "200":
          description: Successfully retrieved the specified transformation.
          headers:
            ETag:
              description: The current entity tag for the transformation. This is an opaque string. You can use it to detect whether the resource has changed between requests. You can also use it in the If-Match or If-None-Match headers for write operations for optimistic concurrency.
              type: string
          schema:
            $ref: "#/definitions/Transformation"
      tags:
        - Transformations
      x-ms-examples:
        Get a transformation:
          parameters:
            api-version: 2016-03-01
            jobName: sj8374
            resourceGroupName: sjrg4423
            subscriptionId: 56b5e0a9-b645-407d-99b0-c64f86013e3d
            transformationName: transformation952
          responses:
            "200":
              body:
                id: /subscriptions/56b5e0a9-b645-407d-99b0-c64f86013e3d/resourceGroups/sjrg4423/providers/Microsoft.StreamAnalytics/streamingjobs/sj8374/transformations/transformation952
                name: transformation952
                properties:
                  query: Select Id, Name from inputtest
                  streamingUnits: 6
                type: Microsoft.StreamAnalytics/streamingjobs/transformations
              headers:
                ETag: be3cfaa2-3d02-4624-92d7-a26766306c8b
    patch:
      description: Updates an existing transformation under an existing streaming job. This can be used to partially update (ie. update one or two properties) a transformation without affecting the rest the job or transformation definition.
      operationId: Transformations_Update
      parameters:
        - description: A Transformation object. The properties specified here will overwrite the corresponding properties in the existing transformation (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing transformation will remain the same and not change as a result of this PATCH operation.
          in: body
          name: transformation
          required: true
          schema:
            $ref: "#/definitions/Transformation"
        - description: The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.
          in: header
          name: If-Match
          required: false
          type: string
          x-ms-client-name: IfMatch
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/StreamingJobNameParameter"
        - $ref: "#/parameters/TransformationNameParameter"
      responses:
        "200":
          description: The transformation was successfully updated.
          headers:
            ETag:
              description: The current entity tag for the transformation. This is an opaque string. You can use it to detect whether the resource has changed between requests. You can also use it in the If-Match or If-None-Match headers for write operations for optimistic concurrency.
              type: string
          schema:
            $ref: "#/definitions/Transformation"
      tags:
        - Transformations
      x-ms-examples:
        Update a transformation:
          parameters:
            api-version: 2016-03-01
            jobName: sj8374
            resourceGroupName: sjrg4423
            subscriptionId: 56b5e0a9-b645-407d-99b0-c64f86013e3d
            transformation:
              properties:
                query: New query
            transformationName: transformation952
          responses:
            "200":
              body:
                id: /subscriptions/56b5e0a9-b645-407d-99b0-c64f86013e3d/resourceGroups/sjrg4423/providers/Microsoft.StreamAnalytics/streamingjobs/sj8374/transformations/transformation952
                name: transformation952
                properties:
                  query: New query
                  streamingUnits: 6
                type: Microsoft.StreamAnalytics/streamingjobs/transformations
              headers:
                ETag: fc6f7a9b-3eea-4589-8265-cc854ec25f5a
    put:
      description: Creates a transformation or replaces an already existing transformation under an existing streaming job.
      operationId: Transformations_CreateOrReplace
      parameters:
        - description: The definition of the transformation that will be used to create a new transformation or replace the existing one under the streaming job.
          in: body
          name: transformation
          required: true
          schema:
            $ref: "#/definitions/Transformation"
        - description: The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.
          in: header
          name: If-Match
          required: false
          type: string
          x-ms-client-name: IfMatch
        - description: Set to '*' to allow a new transformation to be created, but to prevent updating an existing transformation. Other values will result in a 412 Pre-condition Failed response.
          in: header
          name: If-None-Match
          required: false
          type: string
          x-ms-client-name: IfNoneMatch
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/StreamingJobNameParameter"
        - $ref: "#/parameters/TransformationNameParameter"
      responses:
        "200":
          description: The transformation was successfully created or replaced.
          headers:
            ETag:
              description: The current entity tag for the transformation. This is an opaque string. You can use it to detect whether the resource has changed between requests. You can also use it in the If-Match or If-None-Match headers for write operations for optimistic concurrency.
              type: string
          schema:
            $ref: "#/definitions/Transformation"
        "201":
          description: The transformation was successfully created or replaced.
          headers:
            ETag:
              description: The current entity tag for the transformation. This is an opaque string. You can use it to detect whether the resource has changed between requests. You can also use it in the If-Match or If-None-Match headers for write operations for optimistic concurrency.
              type: string
          schema:
            $ref: "#/definitions/Transformation"
      tags:
        - Transformations
      x-ms-examples:
        Create a transformation:
          parameters:
            api-version: 2016-03-01
            jobName: sj8374
            resourceGroupName: sjrg4423
            subscriptionId: 56b5e0a9-b645-407d-99b0-c64f86013e3d
            transformation:
              properties:
                query: Select Id, Name from inputtest
                streamingUnits: 6
            transformationName: transformation952
          responses:
            "200":
              body:
                id: /subscriptions/56b5e0a9-b645-407d-99b0-c64f86013e3d/resourceGroups/sjrg4423/providers/Microsoft.StreamAnalytics/streamingjobs/sj8374/transformations/transformation952
                name: transformation952
                properties:
                  query: Select Id, Name from inputtest
                  streamingUnits: 6
                type: Microsoft.StreamAnalytics/streamingjobs/transformations
              headers:
                ETag: be3cfaa2-3d02-4624-92d7-a26766306c8b
            "201":
              body:
                id: /subscriptions/56b5e0a9-b645-407d-99b0-c64f86013e3d/resourceGroups/sjrg4423/providers/Microsoft.StreamAnalytics/streamingjobs/sj8374/transformations/transformation952
                name: transformation952
                properties:
                  query: Select Id, Name from inputtest
                  streamingUnits: 6
                type: Microsoft.StreamAnalytics/streamingjobs/transformations
              headers:
                ETag: be3cfaa2-3d02-4624-92d7-a26766306c8b
definitions:
  SubResource:
    description: The base sub-resource model definition.
    properties:
      id:
        description: Resource Id
        readOnly: true
        type: string
      name:
        description: Resource name
        type: string
      type:
        description: Resource type
        readOnly: true
        type: string
    x-ms-azure-resource: true
  Transformation:
    allOf:
      - $ref: "#/definitions/SubResource"
    description: A transformation object, containing all information associated with the named transformation. All transformations are contained under a streaming job.
    properties:
      properties:
        $ref: "#/definitions/TransformationProperties"
        description: The properties that are associated with a transformation. Required on PUT (CreateOrReplace) requests.
        x-ms-client-flatten: true
  TransformationProperties:
    description: The properties that are associated with a transformation.
    properties:
      etag:
        description: The current entity tag for the transformation. This is an opaque string. You can use it to detect whether the resource has changed between requests. You can also use it in the If-Match or If-None-Match headers for write operations for optimistic concurrency.
        readOnly: true
        type: string
      query:
        description: "Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests."
        type: string
      streamingUnits:
        description: Specifies the number of streaming units that the streaming job uses.
        format: int32
        type: integer
