Application Research Environments API

Environment resource operations

Documentation

Specifications

Code Examples

Schemas & Data

OpenAPI Specification

application-research-environments-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Application Research CNAB Bundle API Resources Environments API
  version: 1.0.0
  description: 'API for managing Cloud Native Application Bundles (CNAB).


    This API provides endpoints for managing CNAB bundles, claims, claim results,

    dependencies, parameter sources, relocation mappings, and installation status.

    '
  contact:
    name: CNAB Specification
    url: https://cnab.io
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://api.example.com/v1
  description: Production server
- url: https://staging-api.example.com/v1
  description: Staging server
security:
- bearerAuth: []
- apiKey: []
tags:
- name: Environments
  description: Environment resource operations
paths:
  /planes/radius/{planeName}/resourceGroups/{resourceGroupName}/providers/Applications.Core/environments:
    get:
      tags:
      - Environments
      summary: Application Research List environments
      operationId: Environments_List
      parameters:
      - $ref: '#/components/parameters/PlaneNameParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentResourceListResult'
              examples:
                environmentList:
                  $ref: '#/components/examples/EnvironmentListExample'
        default:
          $ref: '#/components/responses/ErrorResponse'
  /planes/radius/{planeName}/resourceGroups/{resourceGroupName}/providers/Applications.Core/environments/{environmentName}:
    get:
      tags:
      - Environments
      summary: Application Research Get environment
      operationId: Environments_Get
      parameters:
      - $ref: '#/components/parameters/PlaneNameParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - $ref: '#/components/parameters/EnvironmentNameParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentResource'
              examples:
                kubernetesEnvironment:
                  $ref: '#/components/examples/KubernetesEnvironmentExample'
        default:
          $ref: '#/components/responses/ErrorResponse'
    put:
      tags:
      - Environments
      summary: Application Research Create or update environment
      operationId: Environments_CreateOrUpdate
      parameters:
      - $ref: '#/components/parameters/PlaneNameParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - $ref: '#/components/parameters/EnvironmentNameParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnvironmentResource'
            examples:
              kubernetesEnvironment:
                $ref: '#/components/examples/KubernetesEnvironmentExample'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentResource'
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentResource'
        default:
          $ref: '#/components/responses/ErrorResponse'
    delete:
      tags:
      - Environments
      summary: Application Research Delete environment
      operationId: Environments_Delete
      parameters:
      - $ref: '#/components/parameters/PlaneNameParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - $ref: '#/components/parameters/EnvironmentNameParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Success
        '204':
          description: No Content
        default:
          $ref: '#/components/responses/ErrorResponse'
components:
  parameters:
    ApiVersionParameter:
      name: api-version
      in: query
      required: true
      description: The API version to use for this operation
      schema:
        type: string
        default: 2023-10-01-preview
    EnvironmentNameParameter:
      name: environmentName
      in: path
      required: true
      description: The name of the environment
      schema:
        type: string
    PlaneNameParameter:
      name: planeName
      in: path
      required: true
      description: The name of the plane
      schema:
        type: string
        pattern: ^[A-Za-z]([-A-Za-z0-9]*[A-Za-z0-9])?$
        maxLength: 63
    ResourceGroupNameParameter:
      name: resourceGroupName
      in: path
      required: true
      description: The name of the resource group
      schema:
        type: string
        pattern: ^[A-Za-z]([-A-Za-z0-9]*[A-Za-z0-9])?$
        maxLength: 63
  schemas:
    ProvidersAzure:
      type: object
      properties:
        scope:
          type: string
          description: Target scope for Azure resources
      required:
      - scope
    EnvironmentResource:
      type: object
      properties:
        properties:
          $ref: '#/components/schemas/EnvironmentProperties'
        id:
          type: string
          readOnly: true
        name:
          type: string
          readOnly: true
        type:
          type: string
          readOnly: true
        systemData:
          type: object
          readOnly: true
        tags:
          type: object
          additionalProperties:
            type: string
        location:
          type: string
      required:
      - properties
      - location
    RecipeConfigProperties:
      type: object
      properties:
        terraform:
          $ref: '#/components/schemas/TerraformConfigProperties'
        bicep:
          $ref: '#/components/schemas/BicepConfigProperties'
        env:
          type: object
          additionalProperties:
            type: string
        envSecrets:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SecretReference'
    EnvironmentCompute:
      type: object
      description: Represents backing compute resource
      properties:
        kind:
          type: string
        resourceId:
          type: string
        identity:
          $ref: '#/components/schemas/IdentitySettings'
      required:
      - kind
      discriminator:
        propertyName: kind
        mapping:
          kubernetes: '#/components/schemas/KubernetesCompute'
          aci: '#/components/schemas/AzureContainerInstanceCompute'
    ProvisioningState:
      type: string
      description: Provisioning state of the resource at the time the operation was called
      enum:
      - Creating
      - Updating
      - Deleting
      - Accepted
      - Provisioning
      - Succeeded
      - Failed
      - Canceled
      readOnly: true
    RegistrySecretConfig:
      type: object
      properties:
        secret:
          type: string
    Extension:
      type: object
      description: Extension of a environment/application resource
      properties:
        kind:
          type: string
      required:
      - kind
      discriminator:
        propertyName: kind
        mapping:
          kubernetesMetadata: '#/components/schemas/KubernetesMetadataExtension'
          kubernetesNamespace: '#/components/schemas/KubernetesNamespaceExtension'
          manualScaling: '#/components/schemas/ManualScalingExtension'
          daprSidecar: '#/components/schemas/DaprSidecarExtension'
          aci: '#/components/schemas/AzureContainerInstanceExtension'
    ProvidersAws:
      type: object
      properties:
        scope:
          type: string
          description: Target scope for AWS resources
      required:
      - scope
    IdentitySettingKind:
      type: string
      description: IdentitySettingKind is the kind of supported external identity setting
      enum:
      - undefined
      - azure.com.workload
      - aws.com.irsa
      - userAssigned
      - systemAssigned
      - systemAssignedUserAssigned
    AuthConfig:
      type: object
      properties:
        git:
          $ref: '#/components/schemas/GitAuthConfig'
    TerraformConfigProperties:
      type: object
      properties:
        authentication:
          $ref: '#/components/schemas/AuthConfig'
        providers:
          type: object
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/ProviderConfigProperties'
    SecretConfig:
      type: object
      properties:
        secret:
          type: string
    IdentitySettings:
      type: object
      description: IdentitySettings is the external identity setting
      properties:
        kind:
          $ref: '#/components/schemas/IdentitySettingKind'
        oidcIssuer:
          type: string
          description: The URI for your compute platform's OIDC issuer
        resource:
          type: string
          description: The resource ID of the provisioned identity
        managedIdentity:
          type: array
          items:
            type: string
      required:
      - kind
    SecretReference:
      type: object
      description: Reference to a secret in a secret store
      properties:
        source:
          type: string
          description: The ID of an Applications.Core/SecretStore resource
        key:
          type: string
          description: The key for the secret in the secret store
      required:
      - source
      - key
    Providers:
      type: object
      description: The Cloud providers configuration
      properties:
        azure:
          $ref: '#/components/schemas/ProvidersAzure'
        aws:
          $ref: '#/components/schemas/ProvidersAws'
    ProviderConfigProperties:
      type: object
      properties:
        secrets:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SecretReference'
      additionalProperties: true
    BicepConfigProperties:
      type: object
      properties:
        authentication:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/RegistrySecretConfig'
    EnvironmentProperties:
      type: object
      properties:
        provisioningState:
          $ref: '#/components/schemas/ProvisioningState'
          readOnly: true
        compute:
          $ref: '#/components/schemas/EnvironmentCompute'
        providers:
          $ref: '#/components/schemas/Providers'
        simulated:
          type: boolean
        recipes:
          type: object
          additionalProperties:
            type: object
            additionalProperties:
              $ref: '#/components/schemas/RecipeProperties'
        recipeConfig:
          $ref: '#/components/schemas/RecipeConfigProperties'
        extensions:
          type: array
          items:
            $ref: '#/components/schemas/Extension'
      required:
      - compute
    RecipeProperties:
      type: object
      description: Recipe properties
      properties:
        templateKind:
          type: string
        templatePath:
          type: string
        parameters:
          type: object
      required:
      - templateKind
      - templatePath
    EnvironmentResourceListResult:
      type: object
      properties:
        value:
          type: array
          items:
            $ref: '#/components/schemas/EnvironmentResource'
        nextLink:
          type: string
          format: uri
      required:
      - value
    GitAuthConfig:
      type: object
      properties:
        pat:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SecretConfig'
  examples:
    KubernetesEnvironmentExample:
      summary: Kubernetes environment with Azure and AWS providers
      value:
        properties:
          compute:
            kind: kubernetes
            namespace: ecommerce-prod
            identity:
              kind: azure.com.workload
              oidcIssuer: https://eastus.oic.prod-aks.azure.com/00000000-0000-0000-0000-000000000000/
              resource: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ecommerce-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ecommerce-identity
          providers:
            azure:
              scope: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ecommerce-rg
            aws:
              scope: /planes/aws/aws/accounts/123456789012/regions/us-east-1
          recipes:
            Applications.Datastores/redisCaches:
              default:
                templateKind: bicep
                templatePath: ghcr.io/myorg/recipes/redis:1.0.0
                parameters:
                  sku: Premium
                  capacity: 2
            Applications.Datastores/mongoDatabases:
              default:
                templateKind: terraform
                templatePath: Azure/cosmosdb/azurerm
                templateVersion: 3.0.0
                parameters:
                  consistency_level: Session
          recipeConfig:
            terraform:
              authentication:
                git:
                  pat:
                    github.com:
                      secret: /planes/radius/local/resourceGroups/ecommerce-rg/providers/Applications.Core/secretStores/git-credentials
            env:
              TF_LOG: INFO
          extensions:
          - kind: kubernetesMetadata
            annotations:
              prometheus.io/scrape: 'true'
              prometheus.io/port: '9090'
            labels:
              team: platform
          simulated: false
        location: eastus
        tags:
          environment: production
          project: ecommerce
    EnvironmentListExample:
      summary: List of environments
      value:
        value:
        - properties:
            compute:
              kind: kubernetes
              namespace: ecommerce-prod
            provisioningState: Succeeded
          location: eastus
          tags:
            environment: production
          id: /planes/radius/local/resourceGroups/ecommerce-rg/providers/Applications.Core/environments/prod
          name: prod
          type: Applications.Core/environments
  responses:
    ErrorResponse:
      description: Error response
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    description: Error code
                  message:
                    type: string
                    description: Error message
                  target:
                    type: string
                    description: Error target
                required:
                - code
                - message
            required:
            - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT-based authentication
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key authentication