def METHOD_NAME():
    argument_spec = dict(connection_id=dict(), name=dict())
    module = AnsibleAWSModule(
        argument_spec=argument_spec,
        mutually_exclusive=[["connection_id", "name"]],
        required_one_of=[["connection_id", "name"]],
    )
    client = module.client("directconnect")
    connection_id = module.params["connection_id"]
    connection_name = module.params["name"]
    changed = False
    connection_state = None
    try:
        connection_id = find_connection_id(client, connection_id, connection_name)
        connection_state = get_connection_state(client, connection_id)
        if connection_state == "ordering":
            client.confirm_connection(connectionId=connection_id)
            changed = True
            connection_state = get_connection_state(client, connection_id)
    except DirectConnectError as e:
        if e.last_traceback:
            module.fail_json(msg=e.msg, exception=e.last_traceback, **camel_dict_to_snake_dict(e.exception.response))
        else:
            module.fail_json(msg=e.msg)
    module.exit_json(changed=changed, connection_state=connection_state)