{"type":"api","title":"Create CLI Macro","meta":{"id":"/apps/pubhub/media/cdo-api-documentation/ee9bdf946673e45c4f256a22e0a754e29a9b2098/9b0e4c9a-48cb-3530-a00a-1f32fbf2438c","info":{"title":"Cisco Security Cloud Control Firewall Manager API","version":"1.15.0","description":"Use the documentation to explore the endpoints Security Cloud Control Firewall Manager has to offer","contact":{"name":"Cisco Security Cloud Control TAC","email":"cdo.tac@cisco.com"}},"openapi":"3.0.1","servers":[{"url":"https://api.us.security.cisco.com/firewall","description":"US"},{"url":"https://api.eu.security.cisco.com/firewall","description":"EU"},{"url":"https://api.apj.security.cisco.com/firewall","description":"APJ"},{"url":"https://api.au.security.cisco.com/firewall","description":"AUS"},{"url":"https://api.in.security.cisco.com/firewall","description":"IN"},{"url":"https://api.int.security.cisco.com/firewall","description":"Staging"},{"url":"https://scale.manage.security.cisco.com/api/rest","description":"Scale"},{"url":"https://ci.manage.security.cisco.com/api/rest","description":"CI"},{"url":"https://manage.stg.secure.cisco/api/rest","description":"Stgf9"}],"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","scheme":"bearer","type":"http"}}},"spec":{"description":"Create a CLI macro, which is a fully-formed CLI command ready to use or a template of a CLI command you can modify before you run it.","operationId":"createCliMacro","requestBody":{"content":{"application/json":{"schema":{"properties":{"description":{"description":"A detailed description of what the CLI Macro does.","example":"This macro defines a network object in a firewall configuration.","type":"string"},"deviceType":{"description":"The type of device the CLI Macro is intended for.","enum":["ASA","IOS"],"example":"IOS","type":"string"},"name":{"description":"A human-readable name for the CLI Macro.","example":"My Network Object","type":"string"},"script":{"description":"The script content of the CLI Macro that will be executed on the device.","example":"object network obj-192.168.1.0","type":"string"}},"type":"object","$$ref":"#/components/schemas/CliMacroCreateInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"deviceType":{"description":"The type of the device.","example":"ASA","enum":["ASA","CDFMC_MANAGED_FTD","ONPREM_FMC_MANAGED_FTD","ONPREM_FMC_MANAGED_FIREPOWER","ONPREM_FMC_NGIPS","FDM_MANAGED_FTD","IOS","ISR","SSH_DEVICE","GENERIC_DEVICE","MERAKI_MX","CLOUD_DNG","SFCN","SFCN_DNG","SFCN_STS","ONPREM_FMC","CDFMC","AWS_VPC","AZURE_VNET","DUO_ADMIN_PANEL","UMBRELLA_ORGANIZATION"],"type":"string","$$ref":"#/components/schemas/EntityType"},"name":{"description":"The name of the CLI macro.","example":"Disconnect VPN User","type":"string"},"parameters":{"description":"A set of parameters provided in the script","example":["USER"],"items":{"type":"string"},"type":"array","uniqueItems":true},"script":{"description":"The script executed to generate the CLI result.","example":"vpn-sessiondb logoff name {{USER}} noconfirm","type":"string"},"systemDefined":{"description":"Indicating whether this CLI macro is system-defined.","example":true,"type":"boolean"},"uid":{"description":"The unique identifier, represented as a UUID, of the CLI macro.","example":"7131daad-e813-4b8f-8f42-be1e241e8cdb","format":"uuid","type":"string"}},"required":["deviceType","uid"],"type":"object","$$ref":"#/components/schemas/CdoCliMacro"}}},"description":"Security Cloud Control CLI macro"},"400":{"content":{"application/json":{"schema":{"properties":{"details":{"additionalProperties":{"description":"Additional details, if any, about the error.","example":{},"type":"object"},"description":"Additional details, if any, about the error.","example":{},"type":"object"},"errorCode":{"description":"Unique code that describes the error.","enum":["INVALID_INPUT","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","METHOD_NOT_ALLOWED","CONFLICT","TOO_MANY_REQUESTS","SERVER_ERROR","PROXY_ERROR","BAD_REQUEST","UNPROCESSABLE_ENTITY"],"example":"INVALID_INPUT","type":"string"},"errorMsg":{"description":"Human-readable error description in English.","example":"sample error","type":"string"}},"$$ref":"#/components/schemas/CommonApiError"}}},"description":"Invalid input provided. Check the response for details.","$$ref":"#/components/responses/http400BadRequest"},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"description":"A human-readable error description in English.","example":"invalid_token","type":"string"},"errorDescription":{"description":"A human-readable error description in English.","example":"Your token is invalid","type":"string"}},"$$ref":"#/components/schemas/AuthenticationError"}}},"description":"Request not authorized.","$$ref":"#/components/responses/http401Unauthorised"},"403":{"content":{"application/json":{"schema":{"properties":{"details":{"additionalProperties":{"description":"Additional details, if any, about the error.","example":{},"type":"object"},"description":"Additional details, if any, about the error.","example":{},"type":"object"},"errorCode":{"description":"Unique code that describes the error.","enum":["INVALID_INPUT","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","METHOD_NOT_ALLOWED","CONFLICT","TOO_MANY_REQUESTS","SERVER_ERROR","PROXY_ERROR","BAD_REQUEST","UNPROCESSABLE_ENTITY"],"example":"INVALID_INPUT","type":"string"},"errorMsg":{"description":"Human-readable error description in English.","example":"sample error","type":"string"}},"$$ref":"#/components/schemas/CommonApiError"}}},"description":"User does not have sufficient privileges to perform this operation.","$$ref":"#/components/responses/http403Forbidden"},"405":{"content":{"application/json":{"schema":{"properties":{"details":{"additionalProperties":{"description":"Additional details, if any, about the error.","example":{},"type":"object"},"description":"Additional details, if any, about the error.","example":{},"type":"object"},"errorCode":{"description":"Unique code that describes the error.","enum":["INVALID_INPUT","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","METHOD_NOT_ALLOWED","CONFLICT","TOO_MANY_REQUESTS","SERVER_ERROR","PROXY_ERROR","BAD_REQUEST","UNPROCESSABLE_ENTITY"],"example":"INVALID_INPUT","type":"string"},"errorMsg":{"description":"Human-readable error description in English.","example":"sample error","type":"string"}},"$$ref":"#/components/schemas/CommonApiError"}}},"description":"Method not allowed.","$$ref":"#/components/responses/http405MethodNotAllowed"},"500":{"content":{"application/json":{"schema":{"properties":{"details":{"additionalProperties":{"description":"Additional details, if any, about the error.","example":{},"type":"object"},"description":"Additional details, if any, about the error.","example":{},"type":"object"},"errorCode":{"description":"Unique code that describes the error.","enum":["INVALID_INPUT","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","METHOD_NOT_ALLOWED","CONFLICT","TOO_MANY_REQUESTS","SERVER_ERROR","PROXY_ERROR","BAD_REQUEST","UNPROCESSABLE_ENTITY"],"example":"INVALID_INPUT","type":"string"},"errorMsg":{"description":"Human-readable error description in English.","example":"sample error","type":"string"}},"$$ref":"#/components/schemas/CommonApiError"}}},"description":"Internal server error."}},"security":[{"bearerAuth":[]}],"summary":"Create CLI Macro","tags":["Command Line Interface"],"__originalOperationId":"createCliMacro","method":"post","path":"/v1/cli/macros"}}