Class: SemgrepWebApp::MiscServiceApi
- Defined in:
- lib/semgrep_web_app/apis/misc_service_api.rb
Overview
MiscServiceApi
Constant Summary
Constants inherited from BaseApi
Instance Attribute Summary
Attributes inherited from BaseApi
Instance Method Summary collapse
-
#misc_service_get_bootstrap_sms_vpc ⇒ ApiResponse
VPC support for Managed Scans is in private beta.
-
#misc_service_ping ⇒ ApiResponse
Use to ping the server and assert liveness.
Methods inherited from BaseApi
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent, user_agent_parameters
Constructor Details
This class inherits a constructor from SemgrepWebApp::BaseApi
Instance Method Details
#misc_service_get_bootstrap_sms_vpc ⇒ ApiResponse
VPC support for Managed Scans is in private beta. Returns the Managed Scans VPC Bootstrap CloudFormation template in JSON format for setting up cross-account infrastructure. This template creates IAM roles and policies needed for Semgrep Managed Scanning (SMS) VPC infrastructure automation, including the semgrep-sms-vpc-automation role and EC2 Image Builder distribution roles for gVisor container runtime. See the original AWS cloudformation template format at https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-fo rmats.html
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/semgrep_web_app/apis/misc_service_api.rb', line 20 def misc_service_get_bootstrap_sms_vpc @api_call .request(new_request_builder(HttpMethodEnum::GET, '/api/v1/bootstrap-sms-vpc', Server::SEMGREP) .header_param(new_parameter('application/json', key: 'accept'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(ProtosOpenapiV1GetBootstrapSmsVpcResponse.method(:from_hash)) .is_api_response(true)) .execute end |
#misc_service_ping ⇒ ApiResponse
Use to ping the server and assert liveness.
35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/semgrep_web_app/apis/misc_service_api.rb', line 35 def misc_service_ping @api_call .request(new_request_builder(HttpMethodEnum::GET, '/api/v1/ping', Server::SEMGREP) .header_param(new_parameter('application/json', key: 'accept'))) .response(new_response_handler .deserializer(APIHelper.method(:json_deserialize)) .is_api_response(true)) .execute end |