thousandeyes-sdk-python/thousandeyes-sdk-cloud-insights-integrations/test/mock_manifest.py
api-team-automation[bot] d4b7ca82b7
Some checks failed
Python CI / build (push) Has been cancelled
[GitHub Bot] Generated python SDK (#193)
Co-authored-by: API Team <api-team@thousandeyes.com>
2026-09-08 13:15:25 +01:00

2013 lines
68 KiB
Python

# coding: utf-8
"""
Cloud Insights Integrations API
**Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights).
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import json
from sdk_test_support.mock_server_types import ErrorResponseExpectation, OperationExpectation
OPERATION_MANIFEST = {
"get_aws_integration_policy_settings": OperationExpectation(
operation_id="get_aws_integration_policy_settings",
method="GET",
path="/cloud-insights/integration/aws/policy/settings",
path_param_examples={
},
success_status=200,
success_body=json.loads("""
{
"enabledRegions" : [ "us-east-1", "eu-west-1", "ap-southeast-2" ],
"enabledResourceGroupTypes" : [ "ec2", "s3-bucket", "global-network" ],
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"enabledCloudtrail" : true
}
"""),
success_content_type="application/json",
request_body_example=None,
error_responses={
"401": ErrorResponseExpectation(
status=401,
body=json.loads("""
{
"error_description" : "Invalid access token",
"error" : "invalid_token"
}"""),
content_type="application/json",
),
"403": ErrorResponseExpectation(
status=403,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"404": ErrorResponseExpectation(
status=404,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"429": ErrorResponseExpectation(
status=429,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"500": ErrorResponseExpectation(
status=500,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
},
),
"get_azure_integration_policy_settings": OperationExpectation(
operation_id="get_azure_integration_policy_settings",
method="GET",
path="/cloud-insights/integration/azure/policy/settings",
path_param_examples={
},
success_status=200,
success_body=json.loads("""
{
"enabledResourceGroupTypes" : [ "networking", "virtual-wan", "traffic-manager" ],
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"subscriptionsPolicy" : {
"rules" : [ {
"field" : "subscription-name",
"pattern" : "^prod-.*$",
"action" : "include"
}, {
"field" : "subscription-id",
"pattern" : "3145d332-e1c9-4670-a672-12e17d4f627e",
"action" : "exclude"
} ],
"defaultAction" : "exclude"
}
}
"""),
success_content_type="application/json",
request_body_example=None,
error_responses={
"401": ErrorResponseExpectation(
status=401,
body=json.loads("""
{
"error_description" : "Invalid access token",
"error" : "invalid_token"
}"""),
content_type="application/json",
),
"403": ErrorResponseExpectation(
status=403,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"404": ErrorResponseExpectation(
status=404,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"429": ErrorResponseExpectation(
status=429,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"500": ErrorResponseExpectation(
status=500,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
},
),
"update_aws_integration_policy_settings": OperationExpectation(
operation_id="update_aws_integration_policy_settings",
method="PUT",
path="/cloud-insights/integration/aws/policy/settings",
path_param_examples={
},
success_status=200,
success_body=json.loads("""
{
"enabledRegions" : [ "us-east-1", "eu-west-1", "ap-southeast-2" ],
"enabledResourceGroupTypes" : [ "ec2", "s3-bucket", "global-network" ],
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"enabledCloudtrail" : true
}
"""),
success_content_type="application/json",
request_body_example=json.loads("""
{
"enabledRegions" : [ "us-east-1", "eu-west-1", "ap-southeast-2" ],
"enabledResourceGroupTypes" : [ "ec2", "s3-bucket", "global-network" ],
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"enabledCloudtrail" : true
}
"""),
error_responses={
"400": ErrorResponseExpectation(
status=400,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"errors" : [ {
"code" : "code",
"field" : "field",
"message" : "message"
}, {
"code" : "code",
"field" : "field",
"message" : "message"
} ],
"status" : 0
}"""),
content_type="application/json",
),
"401": ErrorResponseExpectation(
status=401,
body=json.loads("""
{
"error_description" : "Invalid access token",
"error" : "invalid_token"
}"""),
content_type="application/json",
),
"403": ErrorResponseExpectation(
status=403,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"404": ErrorResponseExpectation(
status=404,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"429": ErrorResponseExpectation(
status=429,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"500": ErrorResponseExpectation(
status=500,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
},
),
"update_azure_integration_policy_settings": OperationExpectation(
operation_id="update_azure_integration_policy_settings",
method="PUT",
path="/cloud-insights/integration/azure/policy/settings",
path_param_examples={
},
success_status=200,
success_body=json.loads("""
{
"enabledResourceGroupTypes" : [ "networking", "virtual-wan", "traffic-manager" ],
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"subscriptionsPolicy" : {
"rules" : [ {
"field" : "subscription-name",
"pattern" : "^prod-.*$",
"action" : "include"
}, {
"field" : "subscription-id",
"pattern" : "3145d332-e1c9-4670-a672-12e17d4f627e",
"action" : "exclude"
} ],
"defaultAction" : "exclude"
}
}
"""),
success_content_type="application/json",
request_body_example=json.loads("""
{
"enabledResourceGroupTypes" : [ "networking", "virtual-wan", "traffic-manager" ],
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"subscriptionsPolicy" : {
"rules" : [ {
"field" : "subscription-name",
"pattern" : "^prod-.*$",
"action" : "include"
}, {
"field" : "subscription-id",
"pattern" : "3145d332-e1c9-4670-a672-12e17d4f627e",
"action" : "exclude"
} ],
"defaultAction" : "exclude"
}
}
"""),
error_responses={
"400": ErrorResponseExpectation(
status=400,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"errors" : [ {
"code" : "code",
"field" : "field",
"message" : "message"
}, {
"code" : "code",
"field" : "field",
"message" : "message"
} ],
"status" : 0
}"""),
content_type="application/json",
),
"401": ErrorResponseExpectation(
status=401,
body=json.loads("""
{
"error_description" : "Invalid access token",
"error" : "invalid_token"
}"""),
content_type="application/json",
),
"403": ErrorResponseExpectation(
status=403,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"404": ErrorResponseExpectation(
status=404,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"429": ErrorResponseExpectation(
status=429,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"500": ErrorResponseExpectation(
status=500,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
},
),
"create_aws_flow_logs_monitoring_integration": OperationExpectation(
operation_id="create_aws_flow_logs_monitoring_integration",
method="POST",
path="/cloud-insights/integration/aws/flow-logs",
path_param_examples={
},
success_status=201,
success_body=json.loads("""
{
"monitoringType" : "inventory-monitoring",
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"roleArn" : "arn:aws:iam::01234567890:role/aws-monitoring-ro",
"name" : "integration name",
"externalId" : "37d8f861cffd34212b5a34466564da1f80b01a30",
"snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ],
"id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569"
}
"""),
success_content_type="application/json",
request_body_example=json.loads("""
{
"roleArn" : "arn:aws:iam::01234567890:role/aws-flow-logs-ro",
"name" : "integration name",
"snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ]
}
"""),
error_responses={
"400": ErrorResponseExpectation(
status=400,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"errors" : [ {
"code" : "code",
"field" : "field",
"message" : "message"
}, {
"code" : "code",
"field" : "field",
"message" : "message"
} ],
"status" : 0
}"""),
content_type="application/json",
),
"401": ErrorResponseExpectation(
status=401,
body=json.loads("""
{
"error_description" : "Invalid access token",
"error" : "invalid_token"
}"""),
content_type="application/json",
),
"403": ErrorResponseExpectation(
status=403,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"404": ErrorResponseExpectation(
status=404,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"429": ErrorResponseExpectation(
status=429,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"500": ErrorResponseExpectation(
status=500,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
},
),
"create_aws_inventory_monitoring_integration": OperationExpectation(
operation_id="create_aws_inventory_monitoring_integration",
method="POST",
path="/cloud-insights/integration/aws/inventory",
path_param_examples={
},
success_status=201,
success_body=json.loads("""
{
"monitoringType" : "inventory-monitoring",
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"roleArn" : "arn:aws:iam::01234567890:role/aws-monitoring-ro",
"name" : "integration name",
"externalId" : "37d8f861cffd34212b5a34466564da1f80b01a30",
"snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ],
"id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569"
}
"""),
success_content_type="application/json",
request_body_example=json.loads("""
{
"roleArn" : "arn:aws:iam::01234567890:role/aws-inventory-ro",
"name" : "integration name"
}
"""),
error_responses={
"400": ErrorResponseExpectation(
status=400,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"errors" : [ {
"code" : "code",
"field" : "field",
"message" : "message"
}, {
"code" : "code",
"field" : "field",
"message" : "message"
} ],
"status" : 0
}"""),
content_type="application/json",
),
"401": ErrorResponseExpectation(
status=401,
body=json.loads("""
{
"error_description" : "Invalid access token",
"error" : "invalid_token"
}"""),
content_type="application/json",
),
"403": ErrorResponseExpectation(
status=403,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"404": ErrorResponseExpectation(
status=404,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"429": ErrorResponseExpectation(
status=429,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"500": ErrorResponseExpectation(
status=500,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
},
),
"create_azure_flow_logs_monitoring_integration": OperationExpectation(
operation_id="create_azure_flow_logs_monitoring_integration",
method="POST",
path="/cloud-insights/integration/azure/flow-logs",
path_param_examples={
},
success_status=201,
success_body=json.loads("""
{
"password" : "********",
"monitoringType" : "azure-inventory-monitoring",
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f",
"name" : "integration name",
"id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569",
"azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44",
"serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name"
}
"""),
success_content_type="application/json",
request_body_example=json.loads("""
{
"password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw",
"appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f",
"name" : "integration name",
"azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44",
"serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name"
}
"""),
error_responses={
"400": ErrorResponseExpectation(
status=400,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"errors" : [ {
"code" : "code",
"field" : "field",
"message" : "message"
}, {
"code" : "code",
"field" : "field",
"message" : "message"
} ],
"status" : 0
}"""),
content_type="application/json",
),
"401": ErrorResponseExpectation(
status=401,
body=json.loads("""
{
"error_description" : "Invalid access token",
"error" : "invalid_token"
}"""),
content_type="application/json",
),
"403": ErrorResponseExpectation(
status=403,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"404": ErrorResponseExpectation(
status=404,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"429": ErrorResponseExpectation(
status=429,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"500": ErrorResponseExpectation(
status=500,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
},
),
"create_azure_inventory_monitoring_integration": OperationExpectation(
operation_id="create_azure_inventory_monitoring_integration",
method="POST",
path="/cloud-insights/integration/azure/inventory",
path_param_examples={
},
success_status=201,
success_body=json.loads("""
{
"password" : "********",
"monitoringType" : "azure-inventory-monitoring",
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f",
"name" : "integration name",
"id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569",
"azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44",
"serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name"
}
"""),
success_content_type="application/json",
request_body_example=json.loads("""
{
"password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw",
"appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f",
"name" : "integration name",
"azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44"
}
"""),
error_responses={
"400": ErrorResponseExpectation(
status=400,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"errors" : [ {
"code" : "code",
"field" : "field",
"message" : "message"
}, {
"code" : "code",
"field" : "field",
"message" : "message"
} ],
"status" : 0
}"""),
content_type="application/json",
),
"401": ErrorResponseExpectation(
status=401,
body=json.loads("""
{
"error_description" : "Invalid access token",
"error" : "invalid_token"
}"""),
content_type="application/json",
),
"403": ErrorResponseExpectation(
status=403,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"404": ErrorResponseExpectation(
status=404,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"429": ErrorResponseExpectation(
status=429,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"500": ErrorResponseExpectation(
status=500,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
},
),
"delete_aws_monitoring_integration": OperationExpectation(
operation_id="delete_aws_monitoring_integration",
method="DELETE",
path="/cloud-insights/integration/aws/{integrationId}",
path_param_examples={
"integrationId": 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569',
},
success_status=204,
success_body=None,
success_content_type="application/json",
request_body_example=None,
error_responses={
"400": ErrorResponseExpectation(
status=400,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"errors" : [ {
"code" : "code",
"field" : "field",
"message" : "message"
}, {
"code" : "code",
"field" : "field",
"message" : "message"
} ],
"status" : 0
}"""),
content_type="application/json",
),
"401": ErrorResponseExpectation(
status=401,
body=json.loads("""
{
"error_description" : "Invalid access token",
"error" : "invalid_token"
}"""),
content_type="application/json",
),
"403": ErrorResponseExpectation(
status=403,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"404": ErrorResponseExpectation(
status=404,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"429": ErrorResponseExpectation(
status=429,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"500": ErrorResponseExpectation(
status=500,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
},
),
"delete_azure_monitoring_integration": OperationExpectation(
operation_id="delete_azure_monitoring_integration",
method="DELETE",
path="/cloud-insights/integration/azure/{integrationId}",
path_param_examples={
"integrationId": 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569',
},
success_status=204,
success_body=None,
success_content_type="application/json",
request_body_example=None,
error_responses={
"400": ErrorResponseExpectation(
status=400,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"errors" : [ {
"code" : "code",
"field" : "field",
"message" : "message"
}, {
"code" : "code",
"field" : "field",
"message" : "message"
} ],
"status" : 0
}"""),
content_type="application/json",
),
"401": ErrorResponseExpectation(
status=401,
body=json.loads("""
{
"error_description" : "Invalid access token",
"error" : "invalid_token"
}"""),
content_type="application/json",
),
"403": ErrorResponseExpectation(
status=403,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"404": ErrorResponseExpectation(
status=404,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"429": ErrorResponseExpectation(
status=429,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"500": ErrorResponseExpectation(
status=500,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
},
),
"get_all_aws_monitoring_integrations": OperationExpectation(
operation_id="get_all_aws_monitoring_integrations",
method="GET",
path="/cloud-insights/integration/aws",
path_param_examples={
},
success_status=200,
success_body=json.loads("""
{
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"integrations" : [ {
"monitoringType" : "inventory-monitoring",
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"roleArn" : "arn:aws:iam::01234567890:role/aws-monitoring-ro",
"name" : "integration name",
"externalId" : "37d8f861cffd34212b5a34466564da1f80b01a30",
"snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ],
"id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569"
}, {
"monitoringType" : "inventory-monitoring",
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"roleArn" : "arn:aws:iam::01234567890:role/aws-monitoring-ro",
"name" : "integration name",
"externalId" : "37d8f861cffd34212b5a34466564da1f80b01a30",
"snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ],
"id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569"
} ]
}
"""),
success_content_type="application/json",
request_body_example=None,
error_responses={
"401": ErrorResponseExpectation(
status=401,
body=json.loads("""
{
"error_description" : "Invalid access token",
"error" : "invalid_token"
}"""),
content_type="application/json",
),
"403": ErrorResponseExpectation(
status=403,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"404": ErrorResponseExpectation(
status=404,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"429": ErrorResponseExpectation(
status=429,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"500": ErrorResponseExpectation(
status=500,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
},
),
"get_all_azure_monitoring_integrations": OperationExpectation(
operation_id="get_all_azure_monitoring_integrations",
method="GET",
path="/cloud-insights/integration/azure",
path_param_examples={
},
success_status=200,
success_body=json.loads("""
{
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"integrations" : [ {
"password" : "********",
"monitoringType" : "azure-inventory-monitoring",
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f",
"name" : "integration name",
"id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569",
"azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44",
"serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name"
}, {
"password" : "********",
"monitoringType" : "azure-inventory-monitoring",
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f",
"name" : "integration name",
"id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569",
"azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44",
"serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name"
} ]
}
"""),
success_content_type="application/json",
request_body_example=None,
error_responses={
"401": ErrorResponseExpectation(
status=401,
body=json.loads("""
{
"error_description" : "Invalid access token",
"error" : "invalid_token"
}"""),
content_type="application/json",
),
"403": ErrorResponseExpectation(
status=403,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"404": ErrorResponseExpectation(
status=404,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"429": ErrorResponseExpectation(
status=429,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"500": ErrorResponseExpectation(
status=500,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
},
),
"get_aws_monitoring_integration": OperationExpectation(
operation_id="get_aws_monitoring_integration",
method="GET",
path="/cloud-insights/integration/aws/{integrationId}",
path_param_examples={
"integrationId": 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569',
},
success_status=200,
success_body=json.loads("""
{
"monitoringType" : "inventory-monitoring",
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"roleArn" : "arn:aws:iam::01234567890:role/aws-monitoring-ro",
"name" : "integration name",
"externalId" : "37d8f861cffd34212b5a34466564da1f80b01a30",
"snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ],
"id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569"
}
"""),
success_content_type="application/json",
request_body_example=None,
error_responses={
"401": ErrorResponseExpectation(
status=401,
body=json.loads("""
{
"error_description" : "Invalid access token",
"error" : "invalid_token"
}"""),
content_type="application/json",
),
"403": ErrorResponseExpectation(
status=403,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"404": ErrorResponseExpectation(
status=404,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"429": ErrorResponseExpectation(
status=429,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"500": ErrorResponseExpectation(
status=500,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
},
),
"get_azure_monitoring_integration": OperationExpectation(
operation_id="get_azure_monitoring_integration",
method="GET",
path="/cloud-insights/integration/azure/{integrationId}",
path_param_examples={
"integrationId": 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569',
},
success_status=200,
success_body=json.loads("""
{
"password" : "********",
"monitoringType" : "azure-inventory-monitoring",
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f",
"name" : "integration name",
"id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569",
"azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44",
"serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name"
}
"""),
success_content_type="application/json",
request_body_example=None,
error_responses={
"401": ErrorResponseExpectation(
status=401,
body=json.loads("""
{
"error_description" : "Invalid access token",
"error" : "invalid_token"
}"""),
content_type="application/json",
),
"403": ErrorResponseExpectation(
status=403,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"404": ErrorResponseExpectation(
status=404,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"429": ErrorResponseExpectation(
status=429,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"500": ErrorResponseExpectation(
status=500,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
},
),
"update_azure_flow_logs_monitoring_integration": OperationExpectation(
operation_id="update_azure_flow_logs_monitoring_integration",
method="PUT",
path="/cloud-insights/integration/azure/flow-logs/{integrationId}",
path_param_examples={
"integrationId": 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569',
},
success_status=200,
success_body=json.loads("""
{
"password" : "********",
"monitoringType" : "azure-inventory-monitoring",
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f",
"name" : "integration name",
"id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569",
"azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44",
"serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name"
}
"""),
success_content_type="application/json",
request_body_example=json.loads("""
{
"password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw",
"appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f",
"name" : "integration name",
"azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44",
"serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name"
}
"""),
error_responses={
"400": ErrorResponseExpectation(
status=400,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"errors" : [ {
"code" : "code",
"field" : "field",
"message" : "message"
}, {
"code" : "code",
"field" : "field",
"message" : "message"
} ],
"status" : 0
}"""),
content_type="application/json",
),
"401": ErrorResponseExpectation(
status=401,
body=json.loads("""
{
"error_description" : "Invalid access token",
"error" : "invalid_token"
}"""),
content_type="application/json",
),
"403": ErrorResponseExpectation(
status=403,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"404": ErrorResponseExpectation(
status=404,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"429": ErrorResponseExpectation(
status=429,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"500": ErrorResponseExpectation(
status=500,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
},
),
"update_azure_inventory_monitoring_integration": OperationExpectation(
operation_id="update_azure_inventory_monitoring_integration",
method="PUT",
path="/cloud-insights/integration/azure/inventory/{integrationId}",
path_param_examples={
"integrationId": 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569',
},
success_status=200,
success_body=json.loads("""
{
"password" : "********",
"monitoringType" : "azure-inventory-monitoring",
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f",
"name" : "integration name",
"id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569",
"azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44",
"serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name"
}
"""),
success_content_type="application/json",
request_body_example=json.loads("""
{
"password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw",
"appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f",
"name" : "integration name",
"azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44"
}
"""),
error_responses={
"400": ErrorResponseExpectation(
status=400,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"errors" : [ {
"code" : "code",
"field" : "field",
"message" : "message"
}, {
"code" : "code",
"field" : "field",
"message" : "message"
} ],
"status" : 0
}"""),
content_type="application/json",
),
"401": ErrorResponseExpectation(
status=401,
body=json.loads("""
{
"error_description" : "Invalid access token",
"error" : "invalid_token"
}"""),
content_type="application/json",
),
"403": ErrorResponseExpectation(
status=403,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"404": ErrorResponseExpectation(
status=404,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"429": ErrorResponseExpectation(
status=429,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
"500": ErrorResponseExpectation(
status=500,
body=json.loads("""
{
"instance" : "instance",
"detail" : "detail",
"type" : "type",
"title" : "title",
"status" : 0
}"""),
content_type="application/json",
),
},
),
}