{
  "version": "2.0",
  "metadata": {
    "apiVersion": "2019-07-18",
    "endpointPrefix": "codeguru-profiler",
    "jsonVersion": "1.1",
    "protocol": "rest-json",
    "serviceFullName": "Amazon CodeGuru Profiler",
    "serviceId": "CodeGuruProfiler",
    "signatureVersion": "v4",
    "signingName": "codeguru-profiler",
    "uid": "codeguruprofiler-2019-07-18"
  },
  "operations": {
    "ConfigureAgent": {
      "http": {
        "requestUri": "/profilingGroups/{profilingGroupName}/configureAgent",
        "responseCode": 200
      },
      "input": {
        "type": "structure",
        "required": [
          "profilingGroupName"
        ],
        "members": {
          "fleetInstanceId": {},
          "profilingGroupName": {
            "location": "uri",
            "locationName": "profilingGroupName"
          }
        }
      },
      "output": {
        "type": "structure",
        "required": [
          "configuration"
        ],
        "members": {
          "configuration": {
            "type": "structure",
            "required": [
              "periodInSeconds",
              "shouldProfile"
            ],
            "members": {
              "periodInSeconds": {
                "type": "integer"
              },
              "shouldProfile": {
                "type": "boolean"
              }
            }
          }
        },
        "payload": "configuration"
      }
    },
    "CreateProfilingGroup": {
      "http": {
        "requestUri": "/profilingGroups",
        "responseCode": 201
      },
      "input": {
        "type": "structure",
        "required": [
          "clientToken",
          "profilingGroupName"
        ],
        "members": {
          "agentOrchestrationConfig": {
            "shape": "S9"
          },
          "clientToken": {
            "idempotencyToken": true,
            "location": "querystring",
            "locationName": "clientToken"
          },
          "profilingGroupName": {}
        }
      },
      "output": {
        "type": "structure",
        "required": [
          "profilingGroup"
        ],
        "members": {
          "profilingGroup": {
            "shape": "Sc"
          }
        },
        "payload": "profilingGroup"
      },
      "idempotent": true
    },
    "DeleteProfilingGroup": {
      "http": {
        "method": "DELETE",
        "requestUri": "/profilingGroups/{profilingGroupName}",
        "responseCode": 204
      },
      "input": {
        "type": "structure",
        "required": [
          "profilingGroupName"
        ],
        "members": {
          "profilingGroupName": {
            "location": "uri",
            "locationName": "profilingGroupName"
          }
        }
      },
      "output": {
        "type": "structure",
        "members": {}
      },
      "idempotent": true
    },
    "DescribeProfilingGroup": {
      "http": {
        "method": "GET",
        "requestUri": "/profilingGroups/{profilingGroupName}",
        "responseCode": 200
      },
      "input": {
        "type": "structure",
        "required": [
          "profilingGroupName"
        ],
        "members": {
          "profilingGroupName": {
            "location": "uri",
            "locationName": "profilingGroupName"
          }
        }
      },
      "output": {
        "type": "structure",
        "required": [
          "profilingGroup"
        ],
        "members": {
          "profilingGroup": {
            "shape": "Sc"
          }
        },
        "payload": "profilingGroup"
      }
    },
    "GetPolicy": {
      "http": {
        "method": "GET",
        "requestUri": "/profilingGroups/{profilingGroupName}/policy",
        "responseCode": 200
      },
      "input": {
        "type": "structure",
        "required": [
          "profilingGroupName"
        ],
        "members": {
          "profilingGroupName": {
            "location": "uri",
            "locationName": "profilingGroupName"
          }
        }
      },
      "output": {
        "type": "structure",
        "required": [
          "policy",
          "revisionId"
        ],
        "members": {
          "policy": {},
          "revisionId": {}
        }
      }
    },
    "GetProfile": {
      "http": {
        "method": "GET",
        "requestUri": "/profilingGroups/{profilingGroupName}/profile",
        "responseCode": 200
      },
      "input": {
        "type": "structure",
        "required": [
          "profilingGroupName"
        ],
        "members": {
          "accept": {
            "location": "header",
            "locationName": "Accept"
          },
          "endTime": {
            "shape": "Se",
            "location": "querystring",
            "locationName": "endTime"
          },
          "maxDepth": {
            "location": "querystring",
            "locationName": "maxDepth",
            "type": "integer"
          },
          "period": {
            "location": "querystring",
            "locationName": "period"
          },
          "profilingGroupName": {
            "location": "uri",
            "locationName": "profilingGroupName"
          },
          "startTime": {
            "shape": "Se",
            "location": "querystring",
            "locationName": "startTime"
          }
        }
      },
      "output": {
        "type": "structure",
        "required": [
          "contentType",
          "profile"
        ],
        "members": {
          "contentEncoding": {
            "location": "header",
            "locationName": "Content-Encoding"
          },
          "contentType": {
            "location": "header",
            "locationName": "Content-Type"
          },
          "profile": {
            "type": "blob"
          }
        },
        "payload": "profile"
      }
    },
    "ListProfileTimes": {
      "http": {
        "method": "GET",
        "requestUri": "/profilingGroups/{profilingGroupName}/profileTimes",
        "responseCode": 200
      },
      "input": {
        "type": "structure",
        "required": [
          "endTime",
          "period",
          "profilingGroupName",
          "startTime"
        ],
        "members": {
          "endTime": {
            "shape": "Se",
            "location": "querystring",
            "locationName": "endTime"
          },
          "maxResults": {
            "location": "querystring",
            "locationName": "maxResults",
            "type": "integer"
          },
          "nextToken": {
            "location": "querystring",
            "locationName": "nextToken"
          },
          "orderBy": {
            "location": "querystring",
            "locationName": "orderBy"
          },
          "period": {
            "location": "querystring",
            "locationName": "period"
          },
          "profilingGroupName": {
            "location": "uri",
            "locationName": "profilingGroupName"
          },
          "startTime": {
            "shape": "Se",
            "location": "querystring",
            "locationName": "startTime"
          }
        }
      },
      "output": {
        "type": "structure",
        "required": [
          "profileTimes"
        ],
        "members": {
          "nextToken": {},
          "profileTimes": {
            "type": "list",
            "member": {
              "type": "structure",
              "members": {
                "start": {
                  "shape": "Se"
                }
              }
            }
          }
        }
      }
    },
    "ListProfilingGroups": {
      "http": {
        "method": "GET",
        "requestUri": "/profilingGroups",
        "responseCode": 200
      },
      "input": {
        "type": "structure",
        "members": {
          "includeDescription": {
            "location": "querystring",
            "locationName": "includeDescription",
            "type": "boolean"
          },
          "maxResults": {
            "location": "querystring",
            "locationName": "maxResults",
            "type": "integer"
          },
          "nextToken": {
            "location": "querystring",
            "locationName": "nextToken"
          }
        }
      },
      "output": {
        "type": "structure",
        "required": [
          "profilingGroupNames"
        ],
        "members": {
          "nextToken": {},
          "profilingGroupNames": {
            "type": "list",
            "member": {}
          },
          "profilingGroups": {
            "type": "list",
            "member": {
              "shape": "Sc"
            }
          }
        }
      }
    },
    "PostAgentProfile": {
      "http": {
        "requestUri": "/profilingGroups/{profilingGroupName}/agentProfile",
        "responseCode": 204
      },
      "input": {
        "type": "structure",
        "required": [
          "agentProfile",
          "contentType",
          "profilingGroupName"
        ],
        "members": {
          "agentProfile": {
            "type": "blob"
          },
          "contentType": {
            "location": "header",
            "locationName": "Content-Type"
          },
          "profileToken": {
            "idempotencyToken": true,
            "location": "querystring",
            "locationName": "profileToken"
          },
          "profilingGroupName": {
            "location": "uri",
            "locationName": "profilingGroupName"
          }
        },
        "payload": "agentProfile"
      },
      "output": {
        "type": "structure",
        "members": {}
      }
    },
    "PutPermission": {
      "http": {
        "method": "PUT",
        "requestUri": "/profilingGroups/{profilingGroupName}/policy/{actionGroup}",
        "responseCode": 200
      },
      "input": {
        "type": "structure",
        "required": [
          "actionGroup",
          "principals",
          "profilingGroupName"
        ],
        "members": {
          "actionGroup": {
            "location": "uri",
            "locationName": "actionGroup"
          },
          "principals": {
            "type": "list",
            "member": {}
          },
          "profilingGroupName": {
            "location": "uri",
            "locationName": "profilingGroupName"
          },
          "revisionId": {}
        }
      },
      "output": {
        "type": "structure",
        "required": [
          "policy",
          "revisionId"
        ],
        "members": {
          "policy": {},
          "revisionId": {}
        }
      },
      "idempotent": true
    },
    "RemovePermission": {
      "http": {
        "method": "DELETE",
        "requestUri": "/profilingGroups/{profilingGroupName}/policy/{actionGroup}",
        "responseCode": 200
      },
      "input": {
        "type": "structure",
        "required": [
          "actionGroup",
          "profilingGroupName",
          "revisionId"
        ],
        "members": {
          "actionGroup": {
            "location": "uri",
            "locationName": "actionGroup"
          },
          "profilingGroupName": {
            "location": "uri",
            "locationName": "profilingGroupName"
          },
          "revisionId": {
            "location": "querystring",
            "locationName": "revisionId"
          }
        }
      },
      "output": {
        "type": "structure",
        "required": [
          "policy",
          "revisionId"
        ],
        "members": {
          "policy": {},
          "revisionId": {}
        }
      }
    },
    "UpdateProfilingGroup": {
      "http": {
        "method": "PUT",
        "requestUri": "/profilingGroups/{profilingGroupName}",
        "responseCode": 200
      },
      "input": {
        "type": "structure",
        "required": [
          "agentOrchestrationConfig",
          "profilingGroupName"
        ],
        "members": {
          "agentOrchestrationConfig": {
            "shape": "S9"
          },
          "profilingGroupName": {
            "location": "uri",
            "locationName": "profilingGroupName"
          }
        }
      },
      "output": {
        "type": "structure",
        "required": [
          "profilingGroup"
        ],
        "members": {
          "profilingGroup": {
            "shape": "Sc"
          }
        },
        "payload": "profilingGroup"
      },
      "idempotent": true
    }
  },
  "shapes": {
    "S9": {
      "type": "structure",
      "required": [
        "profilingEnabled"
      ],
      "members": {
        "profilingEnabled": {
          "type": "boolean"
        }
      }
    },
    "Sc": {
      "type": "structure",
      "members": {
        "agentOrchestrationConfig": {
          "shape": "S9"
        },
        "arn": {},
        "createdAt": {
          "shape": "Se"
        },
        "name": {},
        "profilingStatus": {
          "type": "structure",
          "members": {
            "latestAgentOrchestratedAt": {
              "shape": "Se"
            },
            "latestAgentProfileReportedAt": {
              "shape": "Se"
            },
            "latestAggregatedProfile": {
              "type": "structure",
              "members": {
                "period": {},
                "start": {
                  "shape": "Se"
                }
              }
            }
          }
        },
        "updatedAt": {
          "shape": "Se"
        }
      }
    },
    "Se": {
      "type": "timestamp",
      "timestampFormat": "iso8601"
    }
  }
}