openapi: 3.2.0 info: title: Fluence Security Group API description: '# Introduction The Fluence API gives programmatic access to the decentralized Fluence compute marketplace, letting you find, rent, and manage compute resources without the web UI.' contact: name: Cloudless Labs license: name: AGPL-3 identifier: AGPL-3 version: 0.10.0 security: - api_key: [] tags: - name: Security Group description: Endpoints to create, view, update and delete security groups paths: /v1/security_groups: get: tags: - Security Group operationId: get_user_security_groups parameters: - name: ids in: query required: false schema: type: array items: $ref: '#/components/schemas/UserSecurityGroupId' - name: clusterId in: query required: false schema: $ref: '#/components/schemas/ClusterId' - name: vpcId in: query required: false schema: $ref: '#/components/schemas/UserVpcId' - name: name in: query required: false schema: type: string - name: status in: query required: false schema: $ref: '#/components/schemas/UserSecurityGroupStatusDto' - name: page in: query required: false schema: type: integer format: u-int64 minimum: 0 - name: perPage in: query required: false schema: type: integer format: u-int64 minimum: 0 responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/PaginatedResponse_UserSecurityGroupDto' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorBody' example: code: bad_request error: Wrong parameters '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorBody' example: code: unauthorized error: Auth token invalid or missing '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ErrorBody' example: code: forbidden error: Not allowed to call this endpoint '422': description: Unprocessable Entity content: application/json: schema: $ref: '#/components/schemas/ErrorBody' example: code: unprocessable_entity error: Unable to process the entity '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorBody' example: code: internal_server_error error: Unexpected server error security: - access_jwt_token: - security_group:read - api_key: - security_group:read summary: Get user security groups x-summary-source: derived post: tags: - Security Group operationId: create_user_security_group requestBody: description: Create a new user security group content: application/json: schema: $ref: '#/components/schemas/CreateUserSecurityGroupRequest' required: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/UserSecurityGroupDto' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorBody' example: code: bad_request error: Wrong parameters '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorBody' example: code: unauthorized error: Auth token invalid or missing '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ErrorBody' example: code: forbidden error: Not allowed to call this endpoint '422': description: Unprocessable Entity content: application/json: schema: $ref: '#/components/schemas/ErrorBody' example: code: unprocessable_entity error: Unable to process the entity '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorBody' example: code: internal_server_error error: Unexpected server error security: - access_jwt_token: - security_group:write - api_key: - security_group:write summary: Create user security group x-summary-source: derived /v1/security_groups/delete: post: tags: - Security Group operationId: delete_user_security_groups requestBody: description: Security group IDs to remove content: application/json: schema: $ref: '#/components/schemas/UserSecurityGroupIdsDto' required: true responses: '200': description: '' content: application/json: schema: type: array items: $ref: '#/components/schemas/UserSecurityGroupDto' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorBody' example: code: bad_request error: Wrong parameters '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorBody' example: code: unauthorized error: Auth token invalid or missing '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ErrorBody' example: code: forbidden error: Not allowed to call this endpoint '422': description: Unprocessable Entity content: application/json: schema: $ref: '#/components/schemas/ErrorBody' example: code: unprocessable_entity error: Unable to process the entity '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorBody' example: code: internal_server_error error: Unexpected server error security: - access_jwt_token: - security_group:write - api_key: - security_group:write summary: Delete user security groups x-summary-source: derived /v1/security_groups/{security_group_id}: delete: tags: - Security Group operationId: delete_user_security_group parameters: - name: security_group_id in: path description: The ID of the security group to remove required: true schema: type: string format: uuid responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/UserSecurityGroupDto' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorBody' example: code: bad_request error: Wrong parameters '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorBody' example: code: unauthorized error: Auth token invalid or missing '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ErrorBody' example: code: forbidden error: Not allowed to call this endpoint '422': description: Unprocessable Entity content: application/json: schema: $ref: '#/components/schemas/ErrorBody' example: code: unprocessable_entity error: Unable to process the entity '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorBody' example: code: internal_server_error error: Unexpected server error security: - access_jwt_token: - security_group:write - api_key: - security_group:write summary: Delete user security group x-summary-source: derived patch: tags: - Security Group operationId: update_user_security_group parameters: - name: security_group_id in: path description: The ID of the security group to update required: true schema: type: string format: uuid requestBody: description: Update an existing user security group content: application/json: schema: $ref: '#/components/schemas/UpdateUserSecurityGroupRequest' required: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/UserSecurityGroupDto' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorBody' example: code: bad_request error: Wrong parameters '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorBody' example: code: unauthorized error: Auth token invalid or missing '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ErrorBody' example: code: forbidden error: Not allowed to call this endpoint '422': description: Unprocessable Entity content: application/json: schema: $ref: '#/components/schemas/ErrorBody' example: code: unprocessable_entity error: Unable to process the entity '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorBody' example: code: internal_server_error error: Unexpected server error security: - access_jwt_token: - security_group:write - api_key: - security_group:write summary: Update user security group x-summary-source: derived components: schemas: UserVmNetworkInterfaceId: type: string format: uuid CreateUserSecurityGroupRequest: type: object required: - clusterId - name properties: clusterId: $ref: '#/components/schemas/ClusterId' egressRules: type: - array - 'null' items: $ref: '#/components/schemas/SecurityGroupRuleDto' ingressRules: type: - array - 'null' items: $ref: '#/components/schemas/SecurityGroupRuleDto' name: type: string SecurityGroupRulesDto: oneOf: - type: object required: - type properties: type: type: string enum: - allowAll - type: object required: - rules - type properties: rules: type: array items: $ref: '#/components/schemas/SecurityGroupRuleDto' type: type: string enum: - allow UserVpcId: type: string format: uuid ErrorBody: type: object required: - error - code properties: code: $ref: '#/components/schemas/ErrorCode' description: The stable, machine-readable error code. error: type: string description: The human-readable error message. UserId: type: string format: uuid UserSecurityGroupId: type: string format: uuid SecurityGroupRuleDto: oneOf: - allOf: - $ref: '#/components/schemas/SecurityGroupRuleKindDto' - type: object required: - type properties: type: type: string enum: - ipv4 - allOf: - $ref: '#/components/schemas/SecurityGroupRuleKindDto' - type: object required: - type properties: type: type: string enum: - ipv6 SecurityGroupRuleKindDto: type: object required: - protocolKind - remote properties: protocolKind: $ref: '#/components/schemas/SgProtocolKindDto' remote: $ref: '#/components/schemas/SgRemoteDto' UserSecurityGroupDto: type: object required: - id - userId - clusterId - vpcId - name - status - ingressRules - egressRules - createdAt - attachedTo properties: attachedTo: type: array items: $ref: '#/components/schemas/UserVmNetworkInterfaceId' clusterId: $ref: '#/components/schemas/ClusterId' createdAt: type: string format: date-time egressRules: $ref: '#/components/schemas/SecurityGroupRulesDto' id: $ref: '#/components/schemas/UserSecurityGroupId' ingressRules: $ref: '#/components/schemas/SecurityGroupRulesDto' name: type: string readySince: type: - string - 'null' format: date-time removedAt: type: - string - 'null' format: date-time status: $ref: '#/components/schemas/UserSecurityGroupStatusDto' userId: $ref: '#/components/schemas/UserId' vpcId: $ref: '#/components/schemas/UserVpcId' UserSecurityGroupIdsDto: type: object required: - ids properties: ids: type: array items: $ref: '#/components/schemas/UserSecurityGroupId' PaginationInfo: type: object required: - totalRecords - filteredRecords - totalPages - currentPage - perPage properties: currentPage: type: integer format: u-int64 minimum: 0 filteredRecords: type: integer format: u-int64 minimum: 0 perPage: type: integer format: u-int64 minimum: 0 totalPages: type: integer format: u-int32 minimum: 0 totalRecords: type: integer format: u-int64 minimum: 0 ErrorCode: type: string description: 'Stable, machine-readable error code carried by every non-2xx response. Clients should branch on `code` rather than parsing the human-readable `error` string. Status-derived variants cover any error that does not supply a more specific code; semantic variants are set explicitly at the construction site (see `VodopadError::code`).' enum: - bad_request - unauthorized - forbidden - not_found - conflict - unprocessable_entity - not_acceptable - insufficient_balance - service_unavailable - internal_server_error PortsDto: oneOf: - type: string enum: - all - type: object required: - exact properties: exact: type: object required: - value properties: value: type: integer format: u-int16 minimum: 0 - type: object required: - range properties: range: type: object required: - min - max properties: max: type: integer format: u-int16 minimum: 0 min: type: integer format: u-int16 minimum: 0 ClusterId: type: string format: uuid SgProtocolKindDto: oneOf: - type: string enum: - all - type: string enum: - icmp - type: object required: - tcp properties: tcp: type: object required: - ports properties: ports: $ref: '#/components/schemas/PortsDto' - type: object required: - udp properties: udp: type: object required: - ports properties: ports: $ref: '#/components/schemas/PortsDto' UpdateUserSecurityGroupRequest: type: object properties: egressRules: oneOf: - type: 'null' - $ref: '#/components/schemas/SecurityGroupRulesDto' ingressRules: oneOf: - type: 'null' - $ref: '#/components/schemas/SecurityGroupRulesDto' description: '`absent` — не менять; `null` — сбросить к дефолту (`AllowAll`); объект — установить конкретные правила.' name: type: - string - 'null' UserSecurityGroupStatusDto: type: string enum: - new - created - ready - updating - failed - removing - removed SgRemoteDto: oneOf: - type: object required: - address properties: address: type: string example: 127.0.0.1/32 - type: object required: - securityGroup properties: securityGroup: $ref: '#/components/schemas/UserSecurityGroupId' PaginatedResponse_UserSecurityGroupDto: type: object required: - items - pagination properties: items: type: array items: type: object required: - id - userId - clusterId - vpcId - name - status - ingressRules - egressRules - createdAt - attachedTo properties: attachedTo: type: array items: $ref: '#/components/schemas/UserVmNetworkInterfaceId' clusterId: $ref: '#/components/schemas/ClusterId' createdAt: type: string format: date-time egressRules: $ref: '#/components/schemas/SecurityGroupRulesDto' id: $ref: '#/components/schemas/UserSecurityGroupId' ingressRules: $ref: '#/components/schemas/SecurityGroupRulesDto' name: type: string readySince: type: - string - 'null' format: date-time removedAt: type: - string - 'null' format: date-time status: $ref: '#/components/schemas/UserSecurityGroupStatusDto' userId: $ref: '#/components/schemas/UserId' vpcId: $ref: '#/components/schemas/UserVpcId' pagination: $ref: '#/components/schemas/PaginationInfo' securitySchemes: access_jwt_token: type: http scheme: bearer bearerFormat: JWT description: JWT token issued by Fluence api_key: type: apiKey in: header name: X-API-KEY