def _options_method_response_for_cors(self, allowed_origins, allowed_headers=None, allowed_methods=None,<EOL>max_age=None, allow_credentials=None):
ALLOW_ORIGIN = "<STR_LIT>"<EOL>ALLOW_HEADERS = "<STR_LIT>"<EOL>ALLOW_METHODS = "<STR_LIT>"<EOL>MAX_AGE = "<STR_LIT>"<EOL>ALLOW_CREDENTIALS = "<STR_LIT>"<EOL>HEADER_RESPONSE = (lambda x: "<STR_LIT>" + x)<EOL>response_parameters = {<EOL>HEADER_RESPONSE(ALLOW_ORIGIN): allowed_origins<EOL>}<EOL>response_headers = {<EOL>ALLOW_ORIGIN: {<EOL>"<STR_LIT:type>": "<STR_LIT:string>"<EOL>}<EOL>}<EOL>if allowed_headers:<EOL><INDENT>response_parameters[HEADER_RESPONSE(ALLOW_HEADERS)] = allowed_headers<EOL>response_headers[ALLOW_HEADERS] = {"<STR_LIT:type>": "<STR_LIT:string>"}<EOL><DEDENT>if allowed_methods:<EOL><INDENT>response_parameters[HEADER_RESPONSE(ALLOW_METHODS)] = allowed_methods<EOL>response_headers[ALLOW_METHODS] = {"<STR_LIT:type>": "<STR_LIT:string>"}<EOL><DEDENT>if max_age is not None:<EOL><INDENT>response_parameters[HEADER_RESPONSE(MAX_AGE)] = max_age<EOL>response_headers[MAX_AGE] = {"<STR_LIT:type>": "<STR_LIT>"}<EOL><DEDENT>if allow_credentials is True:<EOL><INDENT>response_parameters[HEADER_RESPONSE(ALLOW_CREDENTIALS)] = "<STR_LIT>"<EOL>response_headers[ALLOW_CREDENTIALS] = {"<STR_LIT:type>": "<STR_LIT:string>"}<EOL><DEDENT>return {<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT>": ["<STR_LIT:application/json>"],<EOL>"<STR_LIT:produces>": ["<STR_LIT:application/json>"],<EOL>self._X_APIGW_INTEGRATION: {<EOL>"<STR_LIT:type>": "<STR_LIT>",<EOL>"<STR_LIT>": {<EOL>"<STR_LIT:application/json>": "<STR_LIT>"<EOL>},<EOL>"<STR_LIT>": {<EOL>"<STR_LIT:default>": {<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT>": response_parameters,<EOL>"<STR_LIT>": {<EOL>"<STR_LIT:application/json>": "<STR_LIT>"<EOL>}<EOL>}<EOL>}<EOL>},<EOL>"<STR_LIT>": {<EOL>"<STR_LIT>": {<EOL>"<STR_LIT:description>": "<STR_LIT>",<EOL>"<STR_LIT>": response_headers<EOL>}<EOL>}<EOL>}<EOL>
Returns a Swagger snippet containing configuration for OPTIONS HTTP Method to configure CORS.

This snippet is taken from public documentation:
https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-cors.html#enable-cors-for-resource-using-swagger-importer-tool

:param string/dict allowed_origins: Comma separate list of allowed origins.
    Value can also be an intrinsic function dict.
:param string/dict allowed_headers: Comma separated list of allowed headers.
    Value can also be an intrinsic function dict.
:param string/dict allowed_methods: Comma separated list of allowed methods.
    Value can also be an intrinsic function dict.
:param integer/dict max_age: Maximum duration to cache the CORS Preflight request. Value is set on
    Access-Control-Max-Age header. Value can also be an intrinsic function dict.
:param bool allow_credentials: Flags whether request is allowed to contain credentials.

:return dict: Dictionary containing Options method configuration for CORS